Last active
August 29, 2015 14:12
-
-
Save aplocher/9a8052bd0269bc6d1696 to your computer and use it in GitHub Desktop.
Starts the ASP.NET Website Admin Tool (WSAT) and launches a web browser to it. WSAT is no longer a prominent feature in VS2013 - this BAT file will assist with easily launching it with a single command.
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 | |
:: Begin config section | |
set pathToApp=C:\SourceCode\MyApp\MyApp.Web | |
set pathToIISExpress=C:\Program Files\IIS Express\iisexpress.exe | |
set webPort=8019 | |
:: End config section | |
if not exist %pathToApp% (goto errMissingApp) | |
if not exist %pathToIISExpress% (goto errMissingIisExpress) | |
call :startWebServer | |
echo. | |
call :startWebBrowser | |
goto success | |
:errMissingApp | |
echo ERROR | |
echo Application not found in the specified path: %pathToApp% | |
echo. | |
pause | |
echo. | |
goto eof | |
:errMissingIisExpress | |
echo ERROR | |
echo IISExpress.exe not found in specified location: %pathToIISExpress% | |
echo. | |
pause | |
echo. | |
goto eof | |
:success | |
echo SUCCESS | |
echo. | |
timeout /t 2 /nobreak >nul 2>&1 | |
echo. | |
pause | |
goto eof | |
:: Helper functions | |
:startWebServer | |
start cmd "/t:0F /k echo ** LEAVE THIS WINDOW OPEN UNTIL YOU ARE DONE (PRESS 'Q' TO QUIT) ** &echo. &echo. &"%pathToIISExpress%" /path:c:\windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETWebAdminFiles /vpath:"/asp.netwebadminfiles" /port:%webPort% /clr:4.0 /ntlm" | |
echo. | |
echo Please wait... | |
timeout /t 2 /nobreak >nul 2>&1 | |
goto :eof | |
:startWebBrowser | |
echo Starting web browser... | |
start http://localhost:%webPort%/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=%pathToApp%\^&applicationUrl=/ | |
goto :eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment