TREER
asked on
run script from vb.net
I Have a vb.net prog which contains a flie "vbscript1.vbs" simply i need to click a button and for the script to run
Dim obj as new Process
obj.start("\\server\share\ folder\vbs cript1.vbs ")
You can use obj.WaitForExit() method to wait till the process has
termintated.
obj.start("\\server\share\
You can use obj.WaitForExit() method to wait till the process has
termintated.
ASKER
unfortunately, your ideas do not work although they nearly do
the following error occurs when i attempt your code
line
char 1
error Object expected
code 800A138F
Source Microsoft jscript runtime error
so i replaced my javascript code with a simple
alert("try")
but still the same error occurs
i have increased the points to 500, many thanks for your time
the following error occurs when i attempt your code
line
char 1
error Object expected
code 800A138F
Source Microsoft jscript runtime error
so i replaced my javascript code with a simple
alert("try")
but still the same error occurs
i have increased the points to 500, many thanks for your time
This indicates that it 'is' working - but reporting back an error in the called script..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sirbounty ,
i can see your logic, and indeed that was my first thought, that is why i replaced my original script with just the one line
alert("try")
the result was the same error
graye, the script is javascript, will this be the same?
i can see your logic, and indeed that was my first thought, that is why i replaced my original script with just the one line
alert("try")
the result was the same error
graye, the script is javascript, will this be the same?
I don't know much about javascript, but that's a vb script you're trying to run and alert("try") is not a valid command...
try
wscript.echo "Hello"
instead...
try
wscript.echo "Hello"
instead...
You can run VB.Net Shell() function to execute the script as simple as possible:
http://www.dotnet247.com/247reference/msgs/57/289295.aspx
http://www.dotnet247.com/247reference/msgs/57/289295.aspx
System.Diagnostics.Process