IrishQA Posted May 30, 2013 Posted May 30, 2013 I am running a C# program on one machine that launches programs on that machine and other remote machines. I am using psexec to start up the programs on the other machines. The problem is that those programs on the other machines have to access mapped drives to get infomation on how they work. I am using the following format psexec -u username -p password -i 0 -d \\remote computer - w "working directory" cmd "program name" when I use psexec -u username -p password -i 0 -d \\remote computer net use all the remote drives are unavailable. I am using the same user name and password with psexec that the drives were created under. Any suggestions?
dwhyte85 Posted May 30, 2013 Posted May 30, 2013 -e will load the user profile, this may then map the drives and be usable - worth a shot?
IrishQA Posted May 30, 2013 Author Posted May 30, 2013 The problem is the program on the other machines get data from a central point which tells them to run data on one of multiple drives. There is no possibility not to use mapped drives.
Arthur Posted May 30, 2013 Posted May 30, 2013 Any suggestions? Would symbolic links work? mklink /D "%SystemDrive%\SymLinks\PC1" "\\PC1\Share" mklink /D "%SystemDrive%\SymLinks\PC2" "\\PC2\Share" mklink /D "%SystemDrive%\SymLinks\PC3" "\\PC3\Share" psexec -d "%SystemDrive%\SymLinks\PC1\Program1.exe" psexec -d "%SystemDrive%\SymLinks\PC2\Program2.exe" psexec -d "%SystemDrive%\SymLinks\PC3\Program3.exe"
IrishQA Posted May 31, 2013 Author Posted May 31, 2013 The program that psexec is calling is in c drive. While it is working it gets paths where data is being sent to it, telling it to run data at certain locations on that computer's mapped drives.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now