Created
October 7, 2013 20:57
-
-
Save StefanScherer/6874808 to your computer and use it in GitHub Desktop.
This is a first try to uninstall cygwin before shutting down a windows packer VM.
This file contains hidden or 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
cd /D %SystemDrive%\ | |
rmdir /s /q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\cygwin" | |
del /F /Q C:\Users\Public\Desktop\Cygwin* | |
takeown /r /d y /f cygwin | |
icacls cygwin /t /grant Everyone:F | |
rmdir /s /q cygwin | |
rem stop sshd as late as possible | |
cygwin\bin\cygrunsrv -E sshd | |
cygwin\bin\cygrunsrv -R sshd | |
rem delete the remaining parts | |
rmdir /s /q cygwin | |
rem TODO close firewall on port 22 | |
shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment