Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unc path wscript nothing happens

Status
Not open for further replies.

ramsfield

MIS
Jun 30, 2004
28
US
I have the following script, named test.vbs, it runs, but nothing happens. If I move the files locally (c drive) and change the path to c:\4.91\setupnw.exe, it works fine. Why won't it work over the network?

'Option explicit
dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
' Replace the path with the program you wish to run c:\ etc...


oShell.Run "runas /user:Administrator \\Appserv\CDROM\support\nwclient\4.91\setupnw.exe"
WScript.Sleep 100
'Replace the string yourpassword below with
'the password used on your system. Include tilde
oShell.Sendkeys "password~"
Wscript.Quit
 
When I say nothing happens I mean the program does not launch...

A new DOS window opens saying it is attempting to start \\Appserv\CDROM\support\nwclient..., another line requesting the password appears, then the window closes without any kind of message. The program never starts. The admin user has rights to the file as does the account for the user.
 
Have you tried to increase the sleep time ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I have changed one line of code

oShell.Run "cmd /k runas /user:Administrator \\Appserv\CDROM\support\nwclient\4.91\setupnw.exe"

I have also increased the sleep time to 1000.

The error noted is 67: The network name can not be found.

 
The network name can not be found
You may try to use a mapped drive instead of an UNC.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
The problem turns out to relate to the fact that the files are located on a Netware Server. Once the files were moved to a linux box and using Samba the script ran just fine.

The problem is only a handful of our 200+ machines have the microsoft client installed.

Any other ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top