简体   繁体   中英

Access is denied while running “System.Diagnostics.Process.Start()”

I have a windows form application(on vb.net) which can save and show files to users.

When a user clicks on the file's name, my application copies this file from the server into his personal folders. Then in order to open this file, I use:

System.Diagnostics.Process.Start(Path+Filename)

A specific user (UserA) gets an error "Access is denied".

I would like to inform you also about some test that i have done:

  • If this user (UserA) been navigated into his personal folder he can open the files.
  • This happening for every file(word, excel, .zip, .ppt, .html)
  • When this user (UserA) logged in to anther computer he hadn't got any issue.
  • When a random user tried on this user's (UserA) computer he hadn't got any issue, too.
  • This feature has been working properly for everyone for 8 years, and this issue appeared before 1 week.

Seems that there is something wrong with this user on this computer. Can someone help?

Your problem might be in user account control, or Group Policies on this PC. If you are the system administrator for this PC, try using the Group Policy console to see if anything has been applied that may restrict access. Another thing to consider is if this user has read and/or modify/write access to this file or folder. If he/she doesn't have read access, then this will stop the user from being able to run the program. The reason that it works in the user's personal folder may be that the user simply has read/write/modify access to this folder, and not the folder where your application is. If not, try clearing the user cache on the computer or simply re-imaging it (if you have an imaging process).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM