Windows Tip Sheet

Moving Program Files

Bad things will just happen if you decide to move the Program Files folder through some brute force method. Don't do it, and here's why.

I recently spoke with an administrator who’d relocated the Program Files folder on several client computers and a couple of servers. He’d done so using a tip from http://jsifaq.com/SUBG/tip3200/rh3236.htm that warned about potential troubles with some installation programs that don’t actually query the registry to find out where Program Files are supposed to go.

Imagine this administrator’s surprise when one of those servers was hit by a security vulnerability that he thought he’d patched. He checked his Windows Software Update Services logs and it appeared as if the patch had been approved for that server and properly deployed.

Yeah, turns out Microsoft’s own updates (the ones with names like MS05-130) don’t actually, um, check to see where Program Files is supposed to go: They assume it’s in the "Program Files" folder. So if you’ve moved that through a registry hack, the patch won’t pick up the change and will install itself in the wrong place. Oops.

The immediate workaround was to change the registry keys back prior to installing the update, manually install the update, and then re-hack the registry keys. However, long-term and as a preventative measure, don’t move Program Files this way. If Microsoft wants you to move it, they’ll give you a GUI interface through which to do so, or a Group Policy setting or something. Don’t hack it in the registry because you never know what badness will come of it.

About the Author

Don Jones is a multiple-year recipient of Microsoft’s MVP Award, and is Curriculum Director for IT Pro Content for video training company Pluralsight. Don is also a co-founder and President of PowerShell.org, a community dedicated to Microsoft’s Windows PowerShell technology. Don has more than two decades of experience in the IT industry, and specializes in the Microsoft business technology platform. He’s the author of more than 50 technology books, an accomplished IT journalist, and a sought-after speaker and instructor at conferences worldwide. Reach Don on Twitter at @concentratedDon, or on Facebook at Facebook.com/ConcentratedDon.

comments powered by Disqus
Most   Popular