Link to home
Start Free TrialLog in
Avatar of bmcquill
bmcquill

asked on

PSEXEC and Scripts

I have a windows server 2008 R2  machine that is in a workgroup.  I'm trying to run a vbscript I wrote and it keeps telling me it can't find the file.  I copied the file over earlier when connected to the file share.  I have enabled winrm on the machine and all firewall rules.  I also tried using psxec -c "filename" to copy the file over again and try running, same result.  I run psexec \\server-name -u user -p password cmd.exe, that works, I then say run the file and it runs it.  I have a fair number of machines and would like to just run the scripts from the command line with one psexec command not from an interactive command prompt, but it never sees the file (i've checked the name of the file and path ad nauseum, just doesn't find it).  Any one have ideas?
ASKER CERTIFIED SOLUTION
Avatar of Krzysztof Pytko
Krzysztof Pytko
Flag of Poland image

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
Avatar of bmcquill
bmcquill

ASKER

That was it, I just totally forgot the cscript parameter in the command line.  Thanks!
you're welcome :)
Not that I want to continue this thread too unnecessarily, but it's really strange to me that forgetting the cscript parameter, gave a "file not found" error, instead of a execution failure.  That's what really had me fooled, I haven't seen that before, wonder why that was the case, anyway.