
gary1.5524914836407617E12 asked a question.
Principle of Least Privilege
Now that my company is installing our programs with Windows 7 (we skipped Vista), questions arise as to the proper protocol for installations and software with regard to the Principle of Least Privilege (assuming there is one). For example, we've always created a directory for our software under C:\Program Files, but I read that writing to the Windows directory, the Program Files directory or HKEY_Local_Machine may require Administrative privileges to access:
http://www.windowsecurity.com/articles/Windows-Vista-Principle-Least-Privilege.html
But so far, my setup.exe has no problem with writing to the Program Files directory in Windows 7. Should we be installing under the Users directory? Some of our programs write to ini files in the Windows directory, which doesn't happen without specifically running the program as Administrator.
The question is, are there some general guidelines as to where and how to install software, and guidelines on writing software to conform to the POLP? Or is this not a concern?
Thanks,
Gary
If the files don't need to be permanently on the user's machine, we prefer to write them to %temp% which is the temp folder for the user (C:\Users\\AppData\Local\Temp).
However, when installing the story is a bit different as most of the programs would need elevated privileges to install.