Process.Start - Network location

  • Thread starter Thread starter Mike McGuire
  • Start date Start date
M

Mike McGuire

Hi,
I am trying to launch a vb script from the network using Process.Start.
(VB .NET 2005)

Here's the line I'm using:
Process.Start("Wscript.exe",VBSFile,User,Pword,Domain)

"Wscript.exe" - Is the command
VBSFile - Is the Argument
User - Is the UserName
Pword - is the password
Domain - is the domain

The VBSFile resides on a server and the properties of the variable look like
\\server\share\folder1\folder2\script.vbs.

This line works perfectly when I launch notepad.exe:
Process.Start("Notepad.exe",User,Pword,Domain)
So I know that the varibles for the user, password, and domain are all
correct.

Is there a way to launch something on a server share by using Process.Start
(or something similar)?
 
Mike McGuire said:
Hi,
I am trying to launch a vb script from the network using Process.Start.
(VB .NET 2005)

Here's the line I'm using:
Process.Start("Wscript.exe",VBSFile,User,Pword,Domain)

"Wscript.exe" - Is the command
VBSFile - Is the Argument
User - Is the UserName
Pword - is the password
Domain - is the domain

The VBSFile resides on a server and the properties of the variable look
like \\server\share\folder1\folder2\script.vbs.

This line works perfectly when I launch notepad.exe:
Process.Start("Notepad.exe",User,Pword,Domain)
So I know that the varibles for the user, password, and domain are all
correct.

Is there a way to launch something on a server share by using
Process.Start (or something similar)?

Is Wscript.exe part of the path set in Environment Variables? I know
notepad.exe can be launched from the run command by just typing notepad.
 
Mike said:
Here's the line I'm using:
Process.Start("Wscript.exe",VBSFile,User,Pword,Domain)
This line works perfectly when I launch notepad.exe:
Process.Start("Notepad.exe",User,Pword,Domain)

So what does it do /differently/ when using WScript?
If you don't get a running process, Visual Basic really ought to be
telling you why not.
Is there a way to launch something on a server share by using Process.Start
(or something similar)?

BTW, /where/ are you expecting this process to execute? Just checking
that you're not expecting this to run on the file server itself.

Regards,
Phill W.
 
Back
Top