Hi
I have build an automation remote which uses psexec underneath.
The command I am using is -
psexec.exe \\computerName -i "C:\Program Files\NUnit 2.5.10\bin\net-2.0\nunit-console.exe" /fixture:GFI.Automation.TestCases.AgentTests "C:\Documents and Settings\Administrator\Desktop\Automation build.79\GFI.Automation.exe" /process=multiple /domain=multiple
If I run this from a batch file locally (without psexec) everything works fine...If I run through psexec the tests can see the c:\ drive but not any mapped network drives. I am using the absolute path of the mapped drive for example E:\Agents
Has anyone encountered this problem before and if so, is there anything I can do to make this work?!
Thanks
Scott
PSEXEC + Shared drive access
Re: PSEXEC + Shared drive access
Oh, I've tried the -s switch too with no luck 

Re: PSEXEC + Shared drive access
PSEXEC doens't likes mapped drives. You need to use the UNC paths.
Aracknid.
Aracknid.
Re: PSEXEC + Shared drive access
You can try adding 0 to the -i switch "-i 0" to force PSEXEC to use the main console session.
Also, you are not passing any credentials with the -u -p switches. I think without the proper credentials, then when PSEXEC launches on the remote machine it may not have proper access to see all the mapped drives. I always pass the -accepteula switch as a just in case. If the remote machine may have never run PSEXEC before then the EULA will pop up requiring a manual click to close the EULA screen possibly causing issues with automation.
In summary, I always use the following switches:
-accepteula
-i 0
-s
-u
-p
Also, you are not passing any credentials with the -u -p switches. I think without the proper credentials, then when PSEXEC launches on the remote machine it may not have proper access to see all the mapped drives. I always pass the -accepteula switch as a just in case. If the remote machine may have never run PSEXEC before then the EULA will pop up requiring a manual click to close the EULA screen possibly causing issues with automation.
In summary, I always use the following switches:
-accepteula
-i 0
-s
-u
-p
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: PSEXEC + Shared drive access
Tried UNC path too but no luck, I think its prob because of the authentication....
I got it working though by calling Net Use with /user:domain\username password to map the drive first then it can be seen... I just realised that PSEXEC creates a new user session and that's why it couldn't see the mapped drives in the logged on users session
Cheers
Scott
I got it working though by calling Net Use with /user:domain\username password to map the drive first then it can be seen... I just realised that PSEXEC creates a new user session and that's why it couldn't see the mapped drives in the logged on users session

Cheers
Scott
Re: PSEXEC + Shared drive access
Just read your post there ceige...Ah I never realised you could specify the session, I will give this a shot tommorrow. Although I'm sure in OS's post vista, services run in session 0 and then logged in user sessions start from 1 so I would need to change the session depending on the OS...I might be easier just running the few Net Use commands first
I missed out the username and password as it's a VM which has no password set up...I just changed the allowblank key in the registry to 0

I missed out the username and password as it's a VM which has no password set up...I just changed the allowblank key in the registry to 0
