@echo off
REM This script expects that some of these commands may fail and will continue to execute the others even if a failure occurs

sc stop AtlassianStash
sc stop AtlassianBitbucket

sc delete AtlassianStash
sc delete AtlassianBitbucket

net user /DELETE atlstash
net user /DELETE atlbitbucket

REM There is no command to delete environment variables you have to edit the registry.

REG delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /F /V STASH_HOME
REG delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /F /V BITBUCKET_HOME
