T
Terry Olsen
I pulled the following client-side script from an ASP page.
<script language="vbscript">
function doNetOp()
Dim WshShell, oExec, HostIP
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("C:\Program Files\Netop Remote
Control\GUEST\ngstw32.exe /h:MTLOGUWK0009 /c:TCP/IP")
end function
</script>
I would like to implement it in my ASP.NET WebForm. The script as is has
no arguements and the PC name is predefined. On the ASP page, the user
could click on a hyperlink:
<a href="vbscript:donetop()">netop</a>
and the Netop program will launch and connect to the specified pc.
I would like to modify the script to pass a pc name as an arguement like
so:
<script language="vbscript">
function doNetOp(hostname)
dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("C:\Program Files\Netop Remote
Control\GUEST\ngstw32.exe /h:" + hostname + " /c:TCP/IP")
end function
</script>
I have a datagrid with a listing of all the pc's on the network. I want
to be able to have the user click on a pc name and pass the pc name to
the vbscript function to launch Netop and connect to the pc.
How could I go about doing this?
<script language="vbscript">
function doNetOp()
Dim WshShell, oExec, HostIP
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("C:\Program Files\Netop Remote
Control\GUEST\ngstw32.exe /h:MTLOGUWK0009 /c:TCP/IP")
end function
</script>
I would like to implement it in my ASP.NET WebForm. The script as is has
no arguements and the PC name is predefined. On the ASP page, the user
could click on a hyperlink:
<a href="vbscript:donetop()">netop</a>
and the Netop program will launch and connect to the specified pc.
I would like to modify the script to pass a pc name as an arguement like
so:
<script language="vbscript">
function doNetOp(hostname)
dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("C:\Program Files\Netop Remote
Control\GUEST\ngstw32.exe /h:" + hostname + " /c:TCP/IP")
end function
</script>
I have a datagrid with a listing of all the pc's on the network. I want
to be able to have the user click on a pc name and pass the pc name to
the vbscript function to launch Netop and connect to the pc.
How could I go about doing this?