Skip to content

Instantly share code, notes, and snippets.

@prabirshrestha
Created June 8, 2011 08:33
Show Gist options
  • Save prabirshrestha/1014035 to your computer and use it in GitHub Desktop.
Save prabirshrestha/1014035 to your computer and use it in GitHub Desktop.
run website using iis express
@ECHO off
PUSHD "%~dp0"
SET WebsitePath="%~dp0src\WebApplication"
SET WebsitePort=5000
SET ProgRoot=%ProgramFiles%
IF NOT "%ProgramFiles(x86)%" == "" SET ProgRoot=%ProgramFiles(x86)%
SET IISExpress=%ProgRoot%\IIS Express\iisexpress.exe
IF NOT EXIST "%ProgRoot%\IIS Express\iisexpress.exe" (
ECHO Installation of IIS express is required to run the website
ECHO http://www.microsoft.com/downloads/en/details.aspx?FamilyID=abc59783-89de-4adc-b770-0a720bb21deb
START /d "~\iexplore.exe" http://www.microsoft.com/downloads/en/details.aspx?FamilyID=abc59783-89de-4adc-b770-0a720bb21deb
EXIT /b 1
GOTO END
)
@echo.
echo Running %WebsitePath%
@echo.
"%IISExpress%" /path:%WebsitePath% /port:%WebsitePort%
:END
POPD
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment