Skip to content

Instantly share code, notes, and snippets.

@jpolvora
Last active October 4, 2016 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpolvora/3b4be07145dcf8531345cf36793f9a0e to your computer and use it in GitHub Desktop.
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
@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