StumpedTechy
MIS
I guess I am still a little green with this tool.
Here is the code I am trying to use -
1)Set WshShell = WScript.CreateObject ("WScript.Shell")
WshShell.Run "C:\psexec.exe \\" & strDeviceName & " cmd /c ""\\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True
2)WshShell.Run "C:\psexec.exe \\" & strDeviceName & " cmd /c ""\\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True
I also get a similar error when I do -
3)WshShell.Run "C:\psexec.exe \\" & strDeviceName & " ""\\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True
The errors range from -
1)Access is denied. cmd Exited on PC with error code 1
I have full admin rights on the remote machine and access to the share I am trying to pull the information from.
2)Could not start \\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe on PC: The system cannot find the file specified.
This I know isn't true because the file is right there on the network share. I am logged in as me on both machines so its not a permissions issue.
3) PsExec could not start \\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe on PC: Access is denied.
Just an FYI I tried this on about 3 other computer and checked to make sure this PC was pingable and firewall disabled as well.
The part that is bugging me so immensly is if I do a copy of the file from the share to local and then run the file local it works fine.
E.G.
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "\\Server\share\long directory name\Window~1.exe" , "\\" & strDeviceName & "\C$\"
Set WshShell = WScript.CreateObject ("WScript.Shell")
WshShell.Run "C:\psexec.exe \\" & strDeviceName & " cmd /c ""C:\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True
What I have a problem with is why I have to copy this file locally to the PC and cannot seem to access it on the network directly using the UNC path?
Anyone care to help me with this tool and making it so I don't have to copy the files locally to run them.
Here is the code I am trying to use -
1)Set WshShell = WScript.CreateObject ("WScript.Shell")
WshShell.Run "C:\psexec.exe \\" & strDeviceName & " cmd /c ""\\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True
2)WshShell.Run "C:\psexec.exe \\" & strDeviceName & " cmd /c ""\\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True
I also get a similar error when I do -
3)WshShell.Run "C:\psexec.exe \\" & strDeviceName & " ""\\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True
The errors range from -
1)Access is denied. cmd Exited on PC with error code 1
I have full admin rights on the remote machine and access to the share I am trying to pull the information from.
2)Could not start \\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe on PC: The system cannot find the file specified.
This I know isn't true because the file is right there on the network share. I am logged in as me on both machines so its not a permissions issue.
3) PsExec could not start \\server\share\long directory name\WindowsXP-KB928388-x86-ENU.exe on PC: Access is denied.
Just an FYI I tried this on about 3 other computer and checked to make sure this PC was pingable and firewall disabled as well.
The part that is bugging me so immensly is if I do a copy of the file from the share to local and then run the file local it works fine.
E.G.
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "\\Server\share\long directory name\Window~1.exe" , "\\" & strDeviceName & "\C$\"
Set WshShell = WScript.CreateObject ("WScript.Shell")
WshShell.Run "C:\psexec.exe \\" & strDeviceName & " cmd /c ""C:\WindowsXP-KB928388-x86-ENU.exe"" /q""",1 , True
What I have a problem with is why I have to copy this file locally to the PC and cannot seem to access it on the network directly using the UNC path?
Anyone care to help me with this tool and making it so I don't have to copy the files locally to run them.