I am creating a menu within a batch script for users to run various scripts from. The point that I am stuck on is I need the Web Site ID from an IIS website (not the default website so it is not "1") for one of the scripts to execute.
I need to pass that Web Site ID to another script, I am hoping it is as easy as somehow setting the output of [c:> cscript.exe %systemroot%\system32\iisweb.vbs /query "testsite"] to a temporary variable using "SET". and then using a substring function to grab the Web Site ID that was returned and putting it into the options for the other script. For instance: c:> otherscript.exe /F /P:%~websiteID,15,2% (or whatever)
If there is any easier way to get the Web Site ID of IIS website I am all ears but this was the only option I could think of. Thanks-Adam