|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Calling wsh module fron web page
I try calling/running a vbs script from a web page on a
Win2K workstation with the following code: <input type="BUTTON" name="Exec1" value="Run me" language="vbs" onclick="version"> <script language="vbs"> Sub version Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "c:\WSH Script\WSHversion.vbs" Set WshShell = Nothing End Sub </script> Error returned: The system cannot find the file specified. I can put the identical code in a .vbs file and it seems to work properly, but only if the .vbs to be run (WSHversion. vbs in this case) is in the same directory as the calling .vbs. Is it impossible to run a separate vbs script from within a web browser? I have seen several examples where separate Windows programs (CMD, notepad, .bat files) are run within browser script using essentially the same code as above. I have already checked my path variable which contains a C:\ reference. I cannot think of what else might be wrong. Would I essentially have to put the actual code of the script I want run in the web page instead of trying to call it? |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > Calling wsh module fron web page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|