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.
NAHDAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
"\\xxxxx.msi" is incorrect. You omitted server and share name.
NAHDAuthor 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 supportCommented:
It runs as System. I thought System doesn't have access to shares? If so, you have to copy over the .msi first.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
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.
Ram BalachandranCommented:
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 AdvisorCommented:
No, that does not work unless the mapping it's happening in the same psexec session. And it does not change anything.
NAHDAuthor 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 AdvisorCommented:
Nothing special, just make sure there are no leading spaces. And you only put in the names, no \\.
NAHDAuthor Commented:
Found the issue there was a extra space after the names in the text file.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
... and of course http:#a40690592 did not mention spaces in the file at all, did it?
NAHDAuthor Commented:
mnbv
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.