4
Answers

Set Folder Permissions To Program Files

Robert

Robert

14y
6.1k
1
I have a program that installs to a folder in "program files (x86)", but my program is not allowed to write any files there without elevated security.  I know in other deployment applications like inno script I'm able to set the folder permissions to "Everyone" and I was wondering if something like this was possible in Visual Studio 2008.
Answers (4)
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 14y
Well "users documents" is a desktop thing. Desktop applicatons by definition are not ASP.Net applications. Your logic is flawed. You are an intelligent person and you are using that intelligence in a manner that leads you to innacurate conclusions. Using your logic, all desktop applications must be services.
 
I could explain where to look for answers, but you would not look so I won't bother.
0
Robert

Robert

NA 5 0 14y
So I found a solution.  I just converted my c# console application to a windows service that logged in as "Local System" which allows full write access to program files.
0
Robert

Robert

NA 5 0 14y
I just don't believe it was Microsoft's intention for the application data of an ASP.NET program to be written to the users documents folder instead of App_Data.
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 14y

Don't change permissions. Don't assume that you know more than Microsoft about Windows. Beginners often try to solve problems in undocumented ways and in a manner that is inconsistent with the design of Windows.
 
Microsoft has designed Windows in a more logical manner than in the past. They are moving closer to the design of Unix, where the system files are in a partition separate from the data. In Windows, there are directories designated for data. Look in the .Net's Application class; it provides methods for getting the paths for data.