PDA

Click to See Complete Forum and Search --> : start commandline utils within vbscript


Hansz
Dec 13th, 2000, 05:06 AM
Can someone tell me how I can start different commandline tools or utilities within vbscript? Here is the source I have:

<HTML>
<HEAD><TITLE></TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Button1_OnClick

'Here I want to start different commandline utilities for
'example:
'1 net start services/net stop services
'2 c:\winnt\system32\cmd.exe cmdjob.cmd
'3 c:\program files\resource kit\resourcekittool.exe

End Sub
-->
</SCRIPT>
</HEAD>
<BODY>

<HR>
<FORM><INPUT NAME="Button1" TYPE="BUTTON" VALUE="Command"></FORM>

</BODY>
</HTML>

Dec 13th, 2000, 09:32 PM
The best way I have found to do this is use a DLL called ASPEXEC.dll goto yahoo and seach for it. It allows you to call batch files in any directory on the server. More importantly it lets you pass parameters to the batch file

Hansz
Dec 14th, 2000, 08:47 AM
Thanks, must be the solution. I'll give it a try.

greetings,
Hans

Ianpbaker
Dec 14th, 2000, 08:55 AM
You can't do it client-side though, because of security reason's as you wouldn't want to go to a page that opened your shell and typed format c:\ in it