English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Trying to get my .exe file to create a .txt dump to the desktop, I have the directory correct and everything, but I can't seem to find online or offline what I need to code to make the system grant me permissions. I keep getting the error that the program doesn't have permission to create files.

2007-02-13 12:13:59 · 2 answers · asked by Simba 4 in Computers & Internet Programming & Design

Update:
My code to the desktop involves the special folders bit, and I am running it from an admin account.

2007-02-13 15:26:51 · update #1

I am *the* admin account, and thus have full permissions and it works using hard coded paths, but not special folders. That's the problem I'm having

2007-02-16 02:15:31 · update #2

2 answers

Read-write permissions to a given directory are granted on the basis of the user executing the program. If you attempt to read or write a file to a folder / share that the user's account does not have permission to use -- either explicitly on the machine itself, or via group policy, or whatever -- you will get this error.

The only effective way around that problem is either to use the SpecialFolder class to call the user's own My Documents folder / Desktop folder, or to explicitly instruct the user to change permissions on any hard-coded directory paths you supply.

2007-02-13 15:23:05 · answer #1 · answered by Anonymous · 0 0

email me the code at stultz_is@yahoo.com and hopefully i can help.

2007-02-13 20:21:24 · answer #2 · answered by stultz_is 2 · 0 1

fedest.com, questions and answers