* The Business of Software

A former community discussing the business of software, from the smallest shareware operation to Microsoft. A part of Joel on Software.

We're closed, folks!


» Business of Software FAQ
» The Business of Software Conference (held every fall, usually in Boston)
» Forum guidelines (Please read before posting!)


Andy Brice
Successful Software

Doug Nebeker ("Doug")

Jonathan Matthews
Creator of DeepTrawl, CloudTrawl, and LeapDoc

Nicholas Hebb
BreezeTree Software

Bob Walsh
host, Startup Success Podcast author of The Web Startup Success Guide and Micro-ISV: From Vision To Reality

Patrick McKenzie
Bingo Card Creator

Windows Virtualization Problem

How do you guys handle Windows Virtualization when need to store application information, such as a license key, either in the Registry or one of the Special Folders, like ApplicationData?

The problem I run into is on 32 bit Windows 7 where Virtualization is applied by default. An admin installs and then enters their license key which the application writes to HKEY_LOCAL_MACHINE.  But the admin is not the user that needs to actually use the program -when that user tries to run it, it can't find the license key so the app runs in trial mode. Same thing happens with a config file(for app data, not user data) that I store in the ApplicationData folder

When this happens I get a support email and have to tell customer to have the person that needs to use the program register it, but sometimes that user does not have admin  rights so cannot write to the Registry. Then I suggest  turning Virtualization off, but they dont like that because of side effects, like security issues.
Bill Anonomist Send private email
Friday, June 21, 2013
If your app is properly compiled (with a newish compiler and the proper manifest) then it won't use "File Virtualization" or "Registry Virtualization" at all. I can point you to a couple of links that explains this in detail, if you want.

Those 2 types of "Virtualizations" are compatibility shims written in Windows Vista specifically so poorly designed "I'm always Admin" style Windows XP apps would "just work" in the more restrictive Windows Vista+.

So don't use file/registry visualization at all. It's a bad practice.
Wyatt O'Day Send private email
Friday, June 21, 2013
I don't store anything in HKEY_LOCAL_MACHINE for this very problem.  Better to use HKEY_CURRENT_USER instead.  Problem solved!
PSB136 Send private email
Friday, June 21, 2013
Manifest is the way to go. HKEY_CURRENT_USER doesnt solve the scenario I described: user still wont find the license key because another user installed and registered it.
Bill Anonomist Send private email
Friday, June 21, 2013
Sorry, I wasn't aware that multiple users would be using it on one PC.
PSB136 Send private email
Saturday, June 22, 2013
Actually, you first post doesn't mention multiples at all... so my advice was valid for what you described.
PSB136 Send private email
Saturday, June 22, 2013

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz