Results 1 to 2 of 2

Thread: executing

  1. #1
    Join Date
    Dec 1969

    Default executing

    Here is some background on what I&#039;m trying to do.<BR><BR>I&#039;m trying to run a script that is contained in an ASP web page (that sits on a machine that is running Win2000, IIS5.0 and DHCP)<BR><BR>We will be having our customers go to this webpage and enter in name, city, phone...once they submit this form, I have some VBScript that grabs their MAC Address, IP Address from a "Private" scope on our DHCP server. Once I have this info, I write a series of commands to a file (range.netsh) - these commands, add IP Address, delete IP Address, add exclusion range, etc...to the DHCP server on the above machine. This file is saved on the c: drive of the above mentioned machine.<BR><BR>Here is what I&#039;m trying to run:<BR><BR>Here is what I have coded:<BR><BR>&#060;%set strSH = createobject("wscript.shell")%&#062;<BR>&#060;%str SH.run "cmd /c netsh exec range.netsh"%&#062;<BR><BR>I can run: netsh exec range.netsh in a command prompt on the above mentioned machine and all works great...but for some reason it won&#039;t work on the web page???<BR><BR>Do I have something wrong with the syntax of the .run command or is there some security settings I need to add or edit on IIS5.0?<BR><BR>Hope this extra info can shed some light on what I&#039;m needing to accomplish...<BR><BR>THANKS,<BR>kpierick

  2. #2
    Join Date
    Dec 1969

    Default RE: executing

    This is how I use the shell object to unzip a file...maybe it helps?<BR><BR>path = somewhere on my server<BR>Set objWSH = CreateObject("WScript.Shell")<BR>objWSH.Run "C:WINNTCommandpkzip25.exe -extract -path=root " & path & "zipfile.zip " & path, 0 , true<BR>Set objWSH = Nothing<BR><BR>bizz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts