A little while ago I developed a vbscript based HTA application. Works fine! Well, it works fine on XP. I tried it on my wife’ Windows 7 PC and it just does not work. The application uses the dos based FTP command and as a result needs to create several work files on the PC. Since this is all vbscript I thought the easiest and safest place to put them would be in the root of the C drive. It cleans up after itself so there’s nothing left around.
This all worked fine on every XP system it has been tried on but after some experimentation (and a dose of plain old luck) I discovered that Windoes 7 does not seem to want to allow me to create anything in the root of the drive. Apparently it’s all down to the default permissions that are set for several folders on the system including of course, the root of the C drive!
It would appear that windows has been this way for a while, even in XP, it’s just that they are now finally enforcing the rules. I suspect Vista is similar although I no longer have a Vista machine to test on.
So my choices are:
- Use the folder the app lives in. It’s just copied to the PC so the user ‘should’ have update authority, and even if not, it’s their folder, they should be able to give themselves update to it.
- Find the ‘temp’ folder on the machine and use that. If there’s an environment var for it then it’s easy. Not sure otherwise.
- Create a program to give the user access to some folder, but that will probably cause a security pop up.
- Give up. OK, not really, but I have no idea at this stage if none of the above work.
Sometimes I wonder if the role of software is to make our lives easier or to keep a lot of us in a job!