|
-
Apr 23rd, 2010, 10:11 PM
#1
Thread Starter
Frenzied Member
process.start
Hello,
I have the following line of code that simply starts explorer with some folder
System.Diagnostics.Process.Start("explorer.exe", HPGDellClientCore.Settings.LocationsSettings.Default.UnProcessedOrderFilesFolder);
This works fine on most computers.
However, i recently installed the application on a Windows 7 computer and I get Access Is Denied exception when running this line.
Any Ideas?
Thanks,
Don't anthropomorphize computers -- they hate it
-
Apr 24th, 2010, 07:23 AM
#2
Re: process.start
Well considering that HPGDellClientCore object/namespace is not part of the .NET framework as standard, I think you better tell us where this UnProcessedOrdersFilesFolder directory actually is... If you are getting access denied messages then it must be in a location that you do not have Read permissions for. Using Process.Start on Windows 7 to launch explorer and make it open a 'protected' location like C:\Windows still works fine, so I'm guessing the permissions on this folder you are trying to open are not set correctly.
-
Apr 24th, 2010, 09:28 AM
#3
Thread Starter
Frenzied Member
Re: process.start
hehe, my bad.
It always returns a string which is a location on the hard drive.
Don't anthropomorphize computers -- they hate it
-
Apr 24th, 2010, 10:36 AM
#4
Re: process.start
Yes I know that lol (well I guessed that) - I meant what location on the hard drive is it referring to
-
Apr 24th, 2010, 11:28 AM
#5
Thread Starter
Frenzied Member
Re: process.start
local folder. c:\somefolder
The folder is also shared out.
Don't anthropomorphize computers -- they hate it
-
Apr 24th, 2010, 12:51 PM
#6
Re: process.start
Is it actually directly in the root of the C drive then or are you just using that as an example? Are you trying to access it via a local path then (e.g C:\) or via the UNC path using the share name (e.g \\PCName\ShareName)?
Check the permissions on the folder by right clicking on it and going to Properties, then click the Security tab and have a look at each of the accounts listed in there and make sure the relevant ones have Read permission (at least). It might also be worth checking the share permissions, though if you are accessing it via a local path (C:\) then they should not be affecting anything. Anyway you can check them by clicking the Sharing tab in that same properties window, then clicking the Advanced Sharing button, then clicking the Permissions button.
-
Apr 26th, 2010, 05:49 AM
#7
Thread Starter
Frenzied Member
Re: process.start
Ok, this is weird.
I am running the app locally on the workstation and am getting "Access is Denied" when trying to run that line.
The folder it is trying to open is a local folder. I am logged in as the admin.
Wow.
Don't anthropomorphize computers -- they hate it
-
Apr 26th, 2010, 07:19 AM
#8
Re: process.start
See previous post about checking permissions..
-
Apr 26th, 2010, 07:21 AM
#9
Thread Starter
Frenzied Member
Re: process.start
the settings are set.
when i log in, i can navigate and modify the folder any way i wish.
When i run the .net application, however, i get access is denied when trying to open it in explorer.
Don't anthropomorphize computers -- they hate it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|