We help IT Professionals succeed at work.

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.
Comment
Watch Question

Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
"\\xxxxx.msi" is incorrect. You omitted server and share name.

Author

Commented:
"\\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
NVITEnd-user support

Commented:
It runs as System. I thought System doesn't have access to shares? If so, you have to copy over the .msi first.
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
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"
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
No, that does not work unless the mapping it's happening in the same psexec session. And it does not change anything.

Author

Commented:
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?
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Nothing special, just make sure there are no leading spaces. And you only put in the names, no \\.
Commented:
Found the issue there was a extra space after the names in the text file.
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
... and of course http:#a40690592 did not mention spaces in the file at all, did it?

Author

Commented:
mnbv