Last active
June 20, 2017 01:08
-
-
Save thnk2wn/e476bcf8df2b57c03f2f960dfbbe8bde to your computer and use it in GitHub Desktop.
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
REM This is intended to be run only via the self-extracting zip exe created by build. | |
REM It copies extracted files to a known location in the event of an error, re-deploy, logging output etc. | |
REM It then hands off the real work to PowerShell for the deployment | |
@echo off | |
mode con cols=120 | |
echo You are here: %~dp0 | |
echo Copying extracted files to a known location | |
set targetDir=%userprofile%\Desktop\MyApp.Install | |
if exist %targetDir% rmdir /s /q %targetDir% | |
xcopy /s /i /r *.* %targetDir% | |
set deployScript="%targetDir%\deployPackage\Deploy.ps1" | |
echo Starting powershell to run the script %deployScript% | |
start powershell -file "%deployScript%" -WindowStyle Maximized | |
REM Below works but it results in powershell running in cmd.exe window, not powershell window host | |
REM powershell -file "%deployScript%" | |
REM pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment