Last active
October 4, 2016 17:50
-
-
Save jpolvora/3b4be07145dcf8531345cf36793f9a0e to your computer and use it in GitHub Desktop.
Batch file which will start IISExpress in current directory with optional port argument
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
@echo off | |
@set path=%PATH%;"%PROGRAMFILES\IIS EXPRESS"; | |
:: echo current directory is: %~dp0 | |
:: echo argument 1 is: %1 | |
set "HTTPPORT=9901" | |
set "PUBLIC=%~dp0%wwwroot" | |
set "HOME=%~dp0%iishome" | |
if not [%1]==[] ( | |
set httpport=%1 | |
) | |
ECHO starting iis with path: %PUBLIC%, port: %HTTPPORT%, home: %HOME% | |
start cmd /c iisexpress /path:%PUBLIC% /port:%HTTPPORT% /trace:info /userhome:%HOME% | |
::pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment