Scott Hanselman

Putting (my VB6) Windows Apps in the Windows 10 Store - Project Centennial

September 14, '16 Comments [43] Posted in VB | Win10
Sponsored By

Evernote in the Windows 10 Store with Project CentennialI noticed today that Evernote was in the Windows Store. I went to the store, installed Evernote, and it ran. No nextnextnextfinish-style install, it just worked and it worked nicely. It's a Win32 app and it appears to use NodeWebKit for part of it's UI. But it's a Windows app, just like VB6 apps and just like .NET apps and just like UWP (Universal Windows Platform) apps, so I found this to be pretty cool. Now that the Evernote app is a store app it can use Windows 10 specific features like Live Tiles and Notifications and it'll be always up to date.

The Windows Store is starting (slowly) to roll out and include existing desktop apps and games by building and packaging those apps using the Universal Windows Platform. This was called "Project Centennial" when they announced it at the BUILD conference. It lets you basically put any Windows App in the Windows Store, which is cool. Apps that live there are safe, won't mess up your machine, and are quickly installed and uninstalled.

Here's some of the details about what's happening with your app behind the scenes, from this article. This is one of the main benefits of the Windows Store. Apps from the Store can't mess up your system on a global scale.

[The app] runs in a special environment where any accesses that the app makes to the file system and to the Registry are redirected. The file named Registry.dat is used for Registry redirection. It's actually a Registry hive, so you can view it in the Windows Registry Editor (Regedit). When it comes to the file system, the only thing redirected is the AppData folder, and it is redirected to the same location that app data is stored for all UWP apps. This location is known as the local app data store, and you access it by using the ApplicationData.LocalFolderproperty. This way, your code is already ported to read and write app data in the correct place without you doing anything. And you can also write there directly. One benefit of file system redirection is a cleaner uninstall experience.

The "DesktopAppConverter" is now packaged in the Windows Store as well, even though it runs at the command prompt! If your Windows Desktop app has a "silent installer" then you can run this DesktopAppConvertor on your installer to make an APPX package that you can then theoretically upload to the Store.

NOTE: This "Centennial" technology is in Windows 10 AU, so if you haven't auto-updated yet, you can get AU now.

They are also working with install vendors like InstallShield and WiX to so their installation creation apps will create Windows Store apps with the Desktop Bridge automatically. This way your existing MSIs and stuff can turn into UWP packages and live in the store.


It looks like there are a few ways to make your existing Windows apps into Windows 10 Store-ready apps. You can use this DesktopAppConverter and run it in your existing  silent installer. Once you've made your app a Store App, you can "light up" your app with Live Tiles and Notifications and  other features with code. Check out the GitHub Repro with samples that show you how to add Tiles or Background tasks. You can use [Conditional("DesktopUWP")] compilation if you have both a Windows Store and Windows desktop version of your app with a traditional installer.

If your app is a simple Xcopy-deploy app that has no installer, it's even easier. To prove this I installed Visual Basic 6 on my Windows 10 machine. OH YES I DID.

NOTE: I am using VB6 as a fun but also very cool example. VB6 is long out of support but apps created with it still run great on Windows because they are win32 apps. For me, this means that if I had a VB6 app that I wanted to move into the Store and widen my audience, I could.

I made a quick little Project1.exe in VB6 that runs on its own.

Visual Basic 6 on Windows 10

I made an AppxManifest.xml with these contents following this HelloWorld sample.

<?xml version="1.0" encoding="utf-8"?>
<Identity Name="HanselmanVB6"
Version="" />
<DisplayName>Scott Hanselman uses VB6</DisplayName>
<Description>I wish there was a description entered</Description>
<Resource Language="en-us" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.14316.0" />
<rescap:Capability Name="runFullTrust"/>
<Application Id="HanselmanVB6" Executable="Project1.exe" EntryPoint="Windows.FullTrustApplication">
DisplayName="Hey it's VB6"
Description="Hey it's VB6" />

In the folder is my Project1.exe long with an Assets folder with my logo and a few PNGs.

Now I can run the DesktopAppConverter if I have a quiet installer, but since I've just got a small xcopyable app, I'll run this to test on my local machine.

Add-AppxPackage -register .\AppxManifest.xml

And now my little VB6 app is installed locally and in my Start Menu.

VB6 as a Windows App

When I am ready to get my app ready for production and submission to the Store I'll follow the guidance and docs here and use Visual Studio, or just do the work manually at the command line with the MakeAppx and SignTool utilities.

"C:\Program Files (x86)\Windows Kits\10\bin\x86\makeappx" pack /d . /p Project1.appx

Later I'll buy a code signing cert, but for now I'll make a fake local one, trust it, and make a pfx cert.

"C:\Program Files (x86)\Windows Kits\10\bin\x86\makecert" /n "CN=HanselmanVB6" /r /pe /h /0 /eku "," /e 12/31/2016 /sv MyLocalKey1.pvk MyLocalKey1.cer
"C:\Program Files (x86)\Windows Kits\10\bin\x86\pvk2pfx" -po -pvk MyLocalKey1.pvk -spc MyLocalKey1.cer -pfx MyLocalKey1.pfx
certutil -user -addstore Root MyLocalKey1.cer

Now I'll sign my Appx.

NOTE: Make sure the Identity in the AppxManifest matches the code signing cert's CN=Identity. That's the FULL string from the cert. Otherwise you'll see weird stuff in your Event Viewer in Microsoft|Windows\AppxPackagingOM|Microsoft-Windows-AppxPackaging/Operational like "error 0x8007000B: The app manifest publisher name (CN=HanselmanVB6, O=Hanselman, L=Portland, S=OR, C=USA) must match the subject name of the signing certificate exactly (CN=HanselmanVB6)."

I'll use a command line like this. Remember that Visual Studio can hide a lot of this, but since I'm doing it manually it's good to understand the details.

"C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe" sign /debug /fd SHA256 /a /f MyLocalKey1.pfx Project1.appx

The following certificates were considered:
Issued to: HanselmanVB6
Issued by: HanselmanVB6
Expires: Sat Dec 31 00:00:00 2016
SHA1 hash: 19F384D1D0BD33F107B2D7344C4CA40F2A557749

After EKU filter, 1 certs were left.
After expiry filter, 1 certs were left.
After Private Key filter, 1 certs were left.
The following certificate was selected:
Issued to: HanselmanVB6
Issued by: HanselmanVB6
Expires: Sat Dec 31 00:00:00 2016
SHA1 hash: 19F384D1D0BD33F107B2D7344C4CA40F2A557749

The following additional certificates will be attached:
Done Adding Additional Store
Successfully signed: Project1.appx

Number of files successfully Signed: 1
Number of warnings: 0
Number of errors: 0

Now I've got a (local developer) signed, packaged Appx that has a VB6 app inside it. If I double click I'll get the Appx installer, but what I really want to do is sign it with a real cert and put it in the Windows Store!

VB6 in the Windows Store

Here's the app running. Pretty amazing UX, I know.

VB6 app as a Windows Store App

It's early days, IMHO, but I'm looking forward to a time when I can go to the Windows Store and get my favorite apps like Windows Open Live Writer, Office, Slack, and more! Now's the time for you to start exploring these tools.

Related Links

Sponsor: Big thanks to Redgate for sponsoring the feed this week. Discover the world’s most trusted SQL Server comparison tool. Enjoy a free trial of SQL Compare, the industry standard for comparing and deploying SQL Server schemas.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Collecting Windows 10 "Anniversary Edition" Keyboard Shortcuts

August 5, '16 Comments [50] Posted in Win10
Sponsored By

The new Windows 10 Calendar widget is lovelyI'm a big fan of keyboard shortcuts.

There's a fantastic list of Windows 10 shortcuts *inside* the Windows 10 Insiders "Feedback Hub" app. The in-app direct link (not a web link) is here but I think the list is too useful not to share so I don't think they will mind if I replicate the content here on the web.

There is also a nice support page that includes a near-complete list of Keyboard Shortcuts for Windows 7, 8.1 and 10.

"We asked our engineers on the team to share some of their favorite (and lesser-known) keyboard shortcuts for Windows 10. Here is the list!"

Note: [NEW] denotes a new keyboard shortcut introduced in the the Windows 10 Anniversary Update.

Quick access to basic system functions:

  • Ctrl + Shift + Esc: Opens Task Manager.
  • WIN + F: Opens the Feedback Hub with a screenshot attached to your feedback. 
  • WIN + I: Opens the Settings app. 
  • WIN + L: Will lock your PC. 
  • WIN + X: Opens a context menu of useful advanced features.
  • WIN + X and A: Opens Command Prompt with administrative rights. 
  • WIN + X and P: Opens Control Panel. 
  • WIN + X and M: Opens Device Manager.
  • WIN + X and U then S: Puts your PC to sleep. 
    • Scott: Or just push the power button on most laptops or close the lid
  • WIN + Down: Minimizes an app. 
  • WIN + Up: Maximizes an app. 

Capturing what’s on your screen:

  • Alt + PrtScrn: Takes a screenshot of open window and copies to your clipboard. 
  • WIN + PrtScrn: Takes a screenshot of your entire desktop and saves it into a Screenshots folder under Photos in your user profile. 
  • WIN + Alt + R: Start/stop recording your apps & games. 

Mastering File Explorer:

  • Alt + D in File Explorer or browser: Puts you in the address bar. 
  • F2 on a file: Renames the file. 
  • Shift + Right-click in File Explorer: Will give you option to launch Command Prompt with whatever folder you are in as the starting path. 
  • Shift + Right-click on a file: “Copy as path” is added to the context menu.
    • Scott: These two are gold. Copy as path has been around for years and is super useful.

For the taskbar:

  • WIN + <number>: Opens whatever icon (app) is in that position on the taskbar. 
  • [NEW] WIN + Alt + D: Opens date and time flyout on the taskbar.  
    • Scott: I love the new calendar stuff in Windows 10. You just click the clock in the corner and you get not only clock and calendar but also your agenda for the day from your calendar. I think Windows 10 should include more stuff like this going forward - integrating your mail, calendar, plan, trips, commutes, directly in the OS and not just in Apps. That's one of the reasons I like Live Tiles. I like to see information without launching formal apps.  I like widgets on iOS and Android.
  • WIN + S: Search for apps and files. Just type the app name (partially) or executable name (if you know it) and press Enter. Or Ctrl + Shift+ Enter if you need this elevated.
  • WIN + Shift + <number>: Opens a new window of whatever icon (app) is in that position on the taskbar (as will Shift + Click on the icon). 
  • WIN + Shift + Ctrl + <number>: Opens a new window of whatever icon (app) is in that position on the taskbar with administrative rights. 

Remote Desktop and Virtual Desktop:

  • CTRL + ALT + Left Arrow: VM change keyboard focus back to host.   
  • CTRL + ALT + HOME: Remote Desktop change keyboard focus back to host.

For example, in a VM, CTRL + ALT + Left Arrow then ALT + TAB lets you get focus back and switch to an app on your dev machine besides the VM.


  • [NEW] WIN + Shift + C: Opens Cortana to listen to an inquiry. 

Other neat keyboard shortcuts:

  • Alt + X in WordPad: Using on a selected character or word in WordPad will show/hides the Unicode.
  • Alt + Y on a UAC prompt: Automatically chooses yes and dismisses the prompt. 
  • Ctrl + mouse scroll-wheel: Scrolling will zoom and un-zoom many things across the OS. Middle clicking on the mouse scroll-wheel will dismiss tabs, open windows in taskbar, and notifications from the Action Center (new). 
  • Shift + F10: Will open the context menu for whatever is in focus. 

Here are some useful keyboard shortcuts on Surface devices: 

  • Fn + Left arrow: Home
  • Fn + Right arrow: End
  • Fn + Up arrow: Page Up
  • Fn + Down arrow: Page Down
  • Fn + Del: Increases screen brightness.
  • Fn + Backspace: Decreases screen brightness.
  • Fn + Spacebar: Takes a screenshot of the entire screen or screens and puts it into your clipboard. 
  • Fn + Alt + Spacebar: Takes a screenshot of an active window and puts it into your clipboard.

What are YOUR favorite keyboard shortcuts for Windows?

Sponsor: I want to thank Stackify for sponsoring the blog this week, and what's more for gifting the world with Prefix. It's a must have .NET profiler for your dev toolbox. Do yourselves a favor and download it now—free!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Windows 10 "Developer Mode"

July 20, '16 Comments [101] Posted in Win10
Sponsored By

imageThe new Windows 10 update coming in a few weeks. It's called Windows 10 "Anniversary Edition" (I would have just called it 10.1, because, I dunno, monotonically increasing numbers and all, but whatever) and it has a LOT of really nice refinements.

Windows 10 is continuously updated and has been a few times since release, but this most recent one adds a lot of cool stuff like support for Bash on Ubuntu for Developers. For some folks who say they "wait for version 3" - this coming update is that version 3.

One thing I've noticed - and I'm personally rooting for - is a specific section in Windows Settings that seems to be getting some more love. I'm hoping we (developers and power users) will see some real investment here. If you agree after reading this post, sound off in the comments and maybe someone at Microsoft will notice and agree.

If you go to the Settings app on these newer Windows 10 builds, you'll notice "For Developers" as a new menu item. Now, to be clear, I'm reading into this and likely adding meaning where there may not be, but I love this. It's a formal place in the operating system where I can TELL IT THAT I AM A DEVELOPER. 

I can say "I want this machine to be in developer mode."


Under Developer Mode in the Insiders' Builds there is a nice collection of developer and power-user related settings brought together under one roof. What's great about this is that you already know these settings. As a developer you likely install Windows and then immediately go around to Windows Explorer, the Registry, and a bunch of other places to tweak Windows to how you work as a developer.

For example, Windows Explorer. Non-technical parent doesn't need to see Hidden Files or have the Full Path in the Title Bar. But I DO, and those settings are all in one place.


Seriously, the "Full path in the title bar" thing is super useful. I used to say "that should be the default." Now I realize that it shouldn't be. It should be the default for Developers.


There's other options as well for Remote Desktop, PowerShell, and remote diagnostics.


Today this new Developer Mode settings page looks like a nice collection of conveniences, but I really think it's got amazing potential, again as a formal declaration that I am a developer.

In the future I'd love to see (totally brainstorming here as I am not in the Windows department) a quick way to turn on Bash on Ubuntu on Windows 10, or quickly download VSCode or Visual Studio Community, get .NET Core, install Python, install mobile device emulators, install SysInternals or prep my system for remote debugging.

What do YOU think?

Sponsor: Do you deploy the same application multiple times for each of your end customers? The team at Octopus have been trying to take the pain out of multi-tenant deployments. Check out their 3.4 beta release.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

VIDEO: How to run Linux and Bash on "Windows 10 Anniversary Update"

July 1, '16 Comments [18] Posted in Win10
Sponsored By

Ya, I'm not a fan of the name Windows 10 "Anniversary Update" but it has been a year since Windows 10 came out. It's my daily driver and it gets better every month. This year it's gonna get better (like Windows 10.1 better if you ask me) with an update that's coming August 2nd!

In that update (or in the Windows 10 Insider Builds you can get if you're a techie or adventurous) you're going to get a lot of nice polish AND the ability to optionally run Linux (ELF) Binaries on Windows 10 at the command line. The feature is the Linux Subsystem for Windows or "Bash on Windows" or sometimes "Ubuntu on Windows." Call it what you like, they're real, and they're spectacular.

We first saw Bash on Windows 10 in march of this year at the BUILD conference.

Developers can run all their Linux user-mode developer tools like Redis or even TensorFlow (without GPU support).

I went and recorded a 20 min video screencast showing what you need to do to enable and some cool stuff that just scratches the surface of this new feature. Personally, I love that I can develop with Rails on Windows and it actually works and isn't a second class citizen. If you're a developer of any kind this opens up a whole world where you can develop for Windows and Linux without compromise and without the weight of a VM.

I hope you enjoy this video! Also check out (and share) my other Windows 10 videos or my Windows 10 playlist at

Sponsor: Build servers are great at compiling code and running tests, but not so great at deployment. When you find yourself knee-deep in custom scripts trying to make your build server do something it wasn't meant to, give Octopus Deploy a try.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Installing Fish Shell on Ubuntu on Windows 10

April 9, '16 Comments [39] Posted in Linux | Open Source | Win10
Sponsored By

So hopefully by now you've heard that you can run Bash via Ubuntu on Windows...and not in a VM. You can run the Bash Shell and real ELF Linux Binaries (this is not emulation) on Windows 10.

I've recorded a 30 min video with developers from the project and there's a blog post from Dustin from Ubuntu about HOW this works if you want more technical details. You should also check out the Command Line Blog and subscribe and head over to User Voice to help pick the next features.

It's beta, but it's super fun. A common question is "hey bash is lovely but what about _____ shell." Right now as I understand it supports bash and adding other shells may not work, and if it does, you're hacking around. So, let's hack around.

I noticed this shell called Fish Shell and noticed that Ruby Nealon had Fish tweaked and running. I asked for some more detail and they were happy to oblige with a medium post. Thanks Ruby!

Let me give it a try.

Add the Fish Apt Repo and install.

I headed over to the fish site and did this.

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish

Oh, and I also changed my Console Font to use Ubuntu Mono because

Note: I'm hearing it will be WAY easier to add new fonts as the console continues improving. The conhost.exe stuff improves console for everyone, including cmd.exe, powershell.exe, and bash. That console work includes VT100, ANSI, and other stuff, and is separate, but complementary to the bash work.

Nice font.

Bash on Ubuntu on Windows - Cats and Dogs Living Together Mass Hysteria

Because we're still launching bash, we need to use the .bashrc today to launch fish, so you'll need to add ssh-agent fish, and exit to your .bashrc if you want to try this.

OK, next, kind of unrelated to fish, but still useful, I wanted to setup git and ssh-agent, so I generate a new key, add it to ssh agent, following these guides.

Theming Fish

Ruby also points out that Fish has a "Oh My Fish" framework for packages and themes. You can get it easily:

curl -L | fish
omf help

Ruby also included their own file here for the "chain" theme that I installed with "omf install chain" as some glyphs rendered weird. If you want unicode characters like → in your prompt, make sure your files are UTF-8 and not ANSI or you'll get squares!

Now my prompt uses fish, has cool auto complete, nice colors, shows the git dirty bit and branch.


Yes, I realize there are literally fiftyleven billion ways to customize bash, zsh, and lots of other shells to do much cooler stuff than this. I too, am old, and I to have used *nix for years. But it was fun and easy to get fish running on Ubuntu on Windows. Thanks Ruby!

Sponsor: Quality instrumentation is critical for modern applications. Seq helps .NET teams make sense of complex, asynchronous, and distributed apps on-premises or in the cloud. Learn more about structured logging and try Seq free for 30 days at

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Previous Page Page 2 of 5 in the Win10 category Next Page

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.