Last active
June 14, 2017 18:44
-
-
Save leekelleher/870634 to your computer and use it in GitHub Desktop.
Serve any folder in IIS Express
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Serve any folder in IIS Express | |
' http://blog.mattbrailsford.com/2011/03/14/easily-serve-any-folder-in-iis-express/ | |
' Init randomization | |
Randomize | |
' Set random port number | |
Dim port | |
port = Int(Rnd() * 8974) + 1025 | |
' Launch IIS Express / Browser | |
Set WshShell = CreateObject("WScript.Shell") | |
WshShell.Run """%ProgramFiles%\IIS Express\iisexpress.exe"" /path:""" & WScript.Arguments.Item(0) & """ /port:" & CStr(port) & " /systray:true", 0, False | |
WshShell.Run "http://localhost:" & CStr(port), 9, False | |
Set WshShell = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment