Index: dev/install_python_gtk.ps1 ================================================================== --- dev/install_python_gtk.ps1 +++ dev/install_python_gtk.ps1 @@ -169,11 +169,11 @@ ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– "@ } function Ask-First { Write-Host "" - if ((Ask "Do you want install Streamtuner2 and its Python dependencies now? [Y/n] ") -notmatch "^[yY]|^$") { + if ((Ask "Do you want to install Streamtuner2 and its Python dependencies now? [Y/n] ") -notmatch "^[yY]|^$") { #$tasks = $tasks[7..($tasks.length-1)]; return 0,0 exit } $reuseCachedFiles = (Ask "Reuse any cached setup files or ignore them? [r/I] ") -match "^[Rr]" $optionalInstall = (Ask "Install optional components? [y/N] ") -match "^[Yy]" @@ -189,13 +189,13 @@ $MyWindow = $Host.UI.RawUI.WindowSize $MyWindow.Height = ($MaxHeight) $MyWindow.Width = (80) $MyBuffer.Height = (9999) #$MyBuffer.Width = (80) + $host.ui.RawUI.BackgroundColor = ($bckgrnd = 'Black') $host.UI.RawUI.set_bufferSize($MyBuffer) $host.UI.RawUI.set_windowSize($MyWindow) - $host.ui.RawUI.BackgroundColor = ($bckgrnd = 'Black') } } #-- create Desktop/Startmenu shortcuts function Make-Shortcut { Index: dev/uninstall.cmd ================================================================== --- dev/uninstall.cmd +++ dev/uninstall.cmd @@ -1,9 +1,9 @@ -@set installFolder=Do_not_change -@set usrFolder=Do_not_change -@set Python=Do_not_change -@set StreamripperFolder=Do_not_change +@set installFolder=Do_not_Change +@set usrFolder=Do_not_Change +@set Python=Do_not_Change +@set StreamripperFolder=Do_not_Change @echo off set ST2=Streamtuner2 >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" @@ -68,12 +68,17 @@ echo Please close all instances of %ST2% before uninstalling! pause exit - :NotRunning +if exist "%windir%\SysWOW64" ( + set RegUninstallBase="HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" +) else ( + set RegUninstallBase="HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" +) + echo | set /p=Do you want to uninstall %ST2% for Windows? [y/N] set /P INPUT=%=% If /I NOT '%INPUT%' == 'Y' exit echo | set /p=Do you want to keep your %ST2% settings? [Y/n] @@ -82,24 +87,23 @@ echo Deleting personal settings... del "%APPDATA%\streamtuner2\*.*" /F /S /Q 1>nul ) set INPUT= -if '"%StreamripperFolder%"' NEQ '' ( +if '"%StreamripperFolder%"' NEQ '""' ( echo | set /p=Do you want to uninstall Streamripper? [y/N] goto uninstallSR ) -% goto uninstallPython +goto uninstallPython :uninstallSR set /P INPUT=%=% If /I '%INPUT%' == 'Y' ( echo Uninstalling Streamripper... "%StreamripperFolder%\Uninstall.exe" /S reg delete HKCU\SOFTWARE\Streamripper /f 1>nul 2>&1 - reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Streamripper /f 1>nul 2>&1 - reg delete HKLM\SOFTWARE\WoW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Streamripper /f 1>nul 2>&1 + reg delete %RegUninstallBase%\Streamripper /f 1>nul 2>&1 ) set INPUT= :uninstallPython if '%Pythonrun%' EQU 'Y' ( @@ -121,16 +125,19 @@ echo Removing cssselect "%Python%\scripts\pip.exe" uninstall cssselect -y -q echo Removing PyGtk 2.24.2 MsiExec.exe /x{09F82967-D26B-48AC-830E-33191EC177C8} /qb-! echo Removing Python 2.7.12 + reg delete %RegUninstallBase%\{09F82967-D26B-48AC-830E-33191EC177C8} /f 1>nul 2>&1 MsiExec.exe /x{9DA28CE5-0AA5-429E-86D8-686ED898C665} /qb-! reg delete HKCU\SOFTWARE\Python\PythonCore\2.7 /f 1>nul 2>&1 + reg delete %RegUninstallBase%\{9DA28CE5-0AA5-429E-86D8-686ED898C665} /f 1>nul 2>&1 rd "%Python%" /S /Q ) -:uninstallST2 echo Removing %ST2%... +:uninstallST2 +echo Removing %ST2%... rd "%installFolder%" /S /Q echo Removing shortcuts... rd "%APPDATA%\Microsoft\Windows\Start Menu\Programs\%ST2%" /S /Q 1>nul del "%USERPROFILE%\Desktop\Streamtuner2.lnk" 1>nul