Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to trigger cscript from a tcl script

Status
Not open for further replies.

Canb

Programmer
May 11, 2011
1
NO
Hi all ,I am very new to tcl scripting, however I need to modify a tcl script to change the AccessSSLFlags of the IIS6 .I wrote the following code insside my tcl script ,but can't make it work.

catch { [exec cscript.exe //Nologo "%SystemDrive%\inetpub\adminscripts\adsutil.vbs" set w3svc/1/root/xxxx/AccessSSLFlags 8]}erk

I tried running 'cscript.exe //Nologo "%SystemDrive%\inetpub\adminscripts\adsutil.vbs" set w3svc/1/root/xxxx/AccessSSLFlags 8' on the server and it worked fine how ever whenever I tried to run it inside a tcl it fails.Do you have any clues about this?I thinking may be it is failing because of a timeout.May be its waiting the cscript to end? Any help will be much appreciated.

Cheers
Can
 
I think you should escape your "\" on your paths.
like this:

exec cscript.exe c:\\tcl\\sample.vbs

I made a minimal script (which just shows a MsgBox) and it works with the tcl code shown above.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top