Link to home
Start Free TrialLog in
Avatar of NAHD
NAHD

asked on

PSExec

Trying to run psexec to execute a command on multiple computers.  

psexec @xxx.txt -s msiexec.exe /i "\\xxxxx.msi"

Getting directory or volumen incorrect.
Avatar of Qlemo
Qlemo
Flag of Germany image

"\\xxxxx.msi" is incorrect. You omitted server and share name.
Avatar of NAHD
NAHD

ASKER

"\\xx.msi" is pointing to a available share containing a msi.   The script works fine if i use a single pc \\xxxx   but i am trying to execute on multiple with the @xxx command
It runs as System. I thought System doesn't have access to shares? If so, you have to copy over the .msi first.
If you obfuscate too much, it's making answering more difficult.
The point of NewVillageIT is valid, you don't have network access with the LocalSystem account. Maybe the working PC has the MSI in System32, and the installer it's falling back to that folder.
Provide a user account, or let PsExec copy the MSI to system32 with -c.
Map the share with a Drive letter and try again. You can use "net use" command for creating network drive.
So , the script will look like as below

psexec @xxx.txt -s msiexec.exe /i "K:\xxxxx.msi"
No, that does not work unless the mapping it's happening in the same psexec session. And it does not change anything.
Avatar of NAHD

ASKER

Ok i tried to use the -c command.   Same issue.    The list of test computers in the txt file are ones i was able to excute no problem with \\computer.     Is there a specified syntax for inside the .txt file?
Nothing special, just make sure there are no leading spaces. And you only put in the names, no \\.
ASKER CERTIFIED SOLUTION
Avatar of NAHD
NAHD

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
... and of course http:#a40690592 did not mention spaces in the file at all, did it?
Avatar of NAHD

ASKER

mnbv