16 Jun 2017 @ 3:43 PM 

Windows 10 introduced a new software development platform- the Universal Windows Platform, or UWP. In some respects it builds upon the earlier Windows Runtime that was introduced with Windows 8. One interesting aspect of the platform is that- properly used- it can be utilized to have software that can be built once and distributed to a number of platforms running Microsoft Operating Systems, such as the XBox One.

I’ve fiddled a bit with UWP but honestly I found it tricky to determine what it’s for; As it is, it’s API as well as set of third-party portable libraries simply isn’t anywhere near a typical Application targeting the Desktop via WPF or even Windows Forms. But I think that is intentional; these aren’t built towards the same purpose. Instead, the main advantage of UWP appears to be in being able to deploy to multiple Windows Platforms. Unfortunately that is an advantage that I don’t think I can really utilize. However, I expect it will be well used for future applications- and it has already been well used for games like Forza Horizon 3, which utilized it for “Play anywhere” so it can be played not only on the XBox console but on any capable Windows 10 system. Forza 7 will also be using it to much the same effect.

Even if I won’t utilize it, it probably makes a lot of sense to cover it. My recent coding-related posts always seem to involve Windows Forms.  Perhaps I should work instead to learn UWP and then cover that learning experience within new posts? If I an encountering these hurdles then I don’t think it is entirely unreasonable to think perhaps others are as well.

I’ve also got to thinking that perhaps I have become  stuck in my ways, as I’m not partial to the approach that appears to bring web technologies to the desktop; Even today I find web applications and UI designed around the web to have a “feel” that is behind a traditional desktop application in usability. That said, I’m also not about to quit my job just because it involves “legacy” frameworks; We’re talking about quite an old codebase- bringing it forward based on library and platform upgrades would mean no time for adding new features that customers actually want. That, and the upgrade path is incredibly murky and unclear; with about 50 different approaches  for every 50 different problems we might encounter, not to mention things like deciding on the Framework versions and editions and such.

I know I was stuck in my ways previously so it’s hardly something that isn’t worth considering- I stuck with VB6 for far too long and figured it fine and these newfangled .NET things were unnecessary and complicated. But as it happens I was wrong about that. So it’s possible I am wrong about UWP; and if so then a lot of the negative discussion about UWP may be started by the same attitude and thinking. Is it that it is something rather large and imposing that I would need to learn that results in me perceiving it so poorly? I think that is very likely.

Which is  not to suggest of course that UWP is perfect and it is I who is wrong for not recognizing it; but perhaps it is the potential of UWP as a platform that I have failed to assess. While there are many shortcomings, future revisions and additions to the Platform are likely to resolve those problems as long as enough developers hop on board. And it does make sense for there to be a reasonable Trust Model where you “Know” what information an application actually uses or requests, rather then it being pretty much either limited user accounts or Administrator accounts and you don’t know exactly what is being used.

It may be time to come up with a project idea and implement it as a UWP application to start that learning experience. I did it for C# and Windows Forms, I did it for WPF, and I don’t see how the same approach couldn’t work for UWP. Unless it’s impossible to learn new stuff after turning 30, which I’m pretty sure is not the case!) If there is a way to execute other programs from UWP, perhaps the Repeater program I’m working on could be adapted. That is a fairly straightforward program.

Posted By: BC_Programming
Last Edit: 19 Jun 2017 @ 08:59 PM

EmailPermalinkComments (0)
Tags
Tags: ,
Categories: Programming
 01 Aug 2016 @ 12:40 PM 

I like to have control over when and if my system(s) perform Update tasks. As a result, I’ve configured Windows 10 Pro via Group Policy to the option to notify that updates are available, but wait for me to install them.

For the most part, this works exactly as it did with Windows 7 and 8.1. With Win10 I sometimes get a only mildly intrusive notification which doesn’t prevent anything and just tells me  there are updates. That’s fine by me.

However, it would appear Microsoft is not in any way fine with this. At intervals, My entire screen darkens, and a single, small dialog appears stating that “Important Updates are Available”. This dialog presents one option- “Get Updates”. Pressing the button or escape has the same effect; it opens the “Windows Update” options in settings. I can only presume it tries to force the update to take place but cannot proceed because of the Group Policy settings.

This notification angers me unreasonably for some reason, though after mentally telling it off I’ve usually forgotten about it. What spurred me to look into it and try to do something about it was that I had the sheer audacity this evening to watch a movie. Right in the middle of the movie, suddenly I get the “Important updates are available” notification. It’s crossed the line and now it must die permanently.

One “rebuttal” of sorts I’ve seen to resistance to run Windows Update is that this problem can be avoided by just running it as soon as it wants to run. Aside from not wanting to wait a good 30 minutes to use my PC again, none of the updates it deems so are even important. There’s a flash player update (I’ll address this later) There’s a Windows Update which addresses a problem when a Windows 8 PC is upgraded to Windows 10, where Manufacturer bloatware is disappointingly removed, and an update to the servicing stack which applies to the creation of ISO media for Win10. “Important”? Hardly. And even if they were “important”- important to whom? If I am in the middle of, say, a work skype meeting, or I’m currently remoted in to fix a database issue on a customer server, why are the updates for my local system somehow more  important than me being productive? Fact is they are not. The FUD surrounding Windows Updates and how we should just lay down and let Microsoft handle everything for us, how we should be Happy- not annoyed- when we find our systems rebooted overnight and thus we have to re-open all our work in progress again and find out what we were doing.

Anyway enough ranting! Thankfully as noted the Group Policy generally works as intended, just with that one annoying caveat. Can we eliminate that full-screen Prompt telling us there are important updates and instructing us that we must install them like we are some sort of child?

The first obvious place was Group Policy Editor. For example, is there a setting “Present full-screen dialog to interrupt user and tell them about important updates”? No, nothing similar either. Well, so much for that approach. After some investigation,l I found that the notification itself is basically just Windows launching “MusNotification.exe” and/or “musnotificationUI.exe”, presumably at times of it’s own choosing for wholly undocumented reasons and triggers. Whenever it feels like it I guess, or Maybe once a day. Who knows. Anyway, This suggested to me that replacing those files with a do-nothing stub program might solve the problem. However, I’m sure the issue would be “fixed” in a later update- in that those files would return. So I decided to take a batch file approach. If I update later and Win10 reverts the behaviour- such as with the anniversary update- I’ll be able to run the batch file to hopefully get it back to the way I want.

I created a do-nothing stub program by basically compiling the Visual Studio default template. (And removing the window creation of course) The files in C:\Windows\System32 are set as owned by TrustedInstaller, so it was necessary to take ownership of the files, then give full control on the files to administrators. I then renamed the originals and copied the stub into their place. The  batch file I ended up creating to do this looks like this.

 

I went ahead and put this in the same directory alongside the stub program. It appears to work as intended,  though given how sporadic the original “full screen takeover” behaviour was it will be some time before I’m sufficiently convinced it has worked as intended. I’ve put this on a flash drive so I can run it on my various Windows 10 systems (excepting the one system I have running preview builds).

I mentioned  I’d talk about Flash as well. As it happens, Windows 10 apparently includes Adobe Flash Player, which was news to me. Aside from the updates failing to install anyway, I really do NOT want Adobe Flash on my system(s) in any, way, shape, or form. I was able to do something similar with it- in this case, Adobe Flash installs to the directory “C:\Windows\Syswow64\Macromed”. So I adjusted my batch file to take ownership of that folder, set security to full control on the folder, and delete it, adding these to the end of said file:

After doing that, I hid the Flash Player update using this troubleshooter. Unfortunately I suspect future updates will attempt to reinstall Flash. Best case scenario is to create the folder and deny TrustedInstaller access to it, so it cannot install the updates, but of course this will cause the update to fail all the time and may cause problems with Windows Update until it’s hidden anyway.

Posted By: BC_Programming
Last Edit: 08 Aug 2016 @ 06:47 PM

EmailPermalinkComments (0)
Tags
Tags: ,
Categories: Windows
 15 Aug 2015 @ 4:18 PM 

Windows 10 has been out for a few weeks now. I’ve upgraded one of my backup computers from 8.1 to Windows 10 (the Build I discussed a while back).

I’ve tried to like it. Really. I have. But I don’t, and I don’t see myself switching my main systems any time soon. Most of the new features I don’t like, and many of those new features that I don’t like cannot be shut off very easily. Others are QOL impacts. Not being able to customize my Title bar colour and severely removing all customization options, for example, I cannot get behind. I am not a fan of the Start Menu, nor do I like how they changed the start screen to mimick the new Start menu. I understand why these changes were made- primarily due to all the Windows 8 naysayers- but that doesn’t mean I need to like them.

Windows 10 also introduces the new Universal App Framework. This is designed to allow the creation of programs that run across Windows platforms. “Universal Windows Application” referring to the application being able to run on any system that is running Windows 10.

If I said “I really love the Windows 8 Modern UI design and Application design” I would be lying. Because I don’t. This is likely because I dislike Mobile apps in general and having that style of application not only brought to the desktop but bringing along the same type of limitations I find distasteful. I tried to create a quick Win8 style program based on one of our existing winforms programs but hit a brick wall because I would have had to extract all of our libraries and turn it into a web service, then have it running in the background of the program itself. I wasn’t able to find a way to say “I want a Windows 8 style with XAML, but I want to be able to have the same access as a desktop program”. It appears that this may have been rectified with the Windows 10 framework, as it is possible to target a Universal app and make it, errm- not universal- by setting it to be a Desktop Application. I hope- though have as of yet been unable to determine if that is possible and it is looking more and more like it isn’t. This makes my use case- to provide a Modern UI ‘App’ that makes use of my company’s established .NET Class Libraries – impossible. This is because for security reasons you cannot reference standard .NET Assemblies that are not in the GAC. I was thinking they might work if they are signed in some fashion, but I wasn’t able to find anything that would indicate that is the case.

the basic model, as I understand it, mimicks how typical Smartphone “apps” work. Typically they have restricted local access, and will access remote web services in order to perform more advanced features. This is fairly sensible since most smartphone apps are based off of web services. Of course, the issue is that this means porting any libraries that use those sorts of features to portable libraries which will access a web service for the required task. (For a desktop program, I imagine you could have the service running locally)

I’m more partial to desktop development. Heck right now, my work involves Windows Forms (beats the mainframe terminal systems the software replaces!) and even moving to WPF would be a significant engineering effort, so I keep my work with WPF and new Modern UI applications ‘off-the-clock’.

Regardless of my feelings regarding smartphone ‘apps’ or how it seems desktop has been taking a backseat or even being replaced (it’s not, it’s just not headline worthy), Microsoft has continued to provide excellent SDKs and Developer tools and documentation, and is always working to improve both. And even if there is a focus on the Universal Framework and Universal Applications, their current development tools still provide for the creation of Windows Forms applications, allowing the use of the latest C# features for those who might not have the luxury of simply jumping to new frameworks and technologies willy-nilly.

For those interested in keeping up to date who also have the luxury of time to do so (sigh!) The new Windows development Tools are available for free. One can also read about What’s New within the Windows development ecosystem with Windows 10, And there are also Online courses regarding Windows 10 at the Microsoft Virtual Academy, as well as videos and tutorials on Channel9.

Posted By: BC_Programming
Last Edit: 30 Dec 2015 @ 08:01 PM

EmailPermalinkComments (0)
Tags

 Last 50 Posts
 Back
Change Theme...
  • Users » 43538
  • Posts/Pages » 363
  • Comments » 106
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

PP



    No Child Pages.

Windows optimization tips



    No Child Pages.

Software Picks



    No Child Pages.

BC’s Todo List



    No Child Pages.