Author: nextgens
Date: 2007-11-27 22:59:41 +0000 (Tue, 27 Nov 2007)
New Revision: 15996
Added:
trunk/apps/new_installer/res/windows/Uninstaller/
trunk/apps/new_installer/res/windows/Uninstaller/uninstall.cmd
Modified:
trunk/apps/new_installer/RegistrySpec.xml
trunk/apps/new_installer/Win_shortcutSpec.xml
trunk/apps/new_installer/install.xml
trunk/apps/new_installer/res/windows/bin/remove_service.bat
Log:
new_installer: a hopefully working uninstaller for windows
Modified: trunk/apps/new_installer/RegistrySpec.xml
===================================================================
--- trunk/apps/new_installer/RegistrySpec.xml 2007-11-27 20:49:43 UTC (rev
15995)
+++ trunk/apps/new_installer/RegistrySpec.xml 2007-11-27 22:59:41 UTC (rev
15996)
@@ -20,7 +20,7 @@
<value name="UninstallString"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
-
string="http://wiki.freenetproject.org/FreenetUninstall"/>
+
string=""$INSTALL_PATH\uninstaller\uninstall.cmd""/>
<value name="DisplayIcon"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
Modified: trunk/apps/new_installer/Win_shortcutSpec.xml
===================================================================
--- trunk/apps/new_installer/Win_shortcutSpec.xml 2007-11-27 20:49:43 UTC
(rev 15995)
+++ trunk/apps/new_installer/Win_shortcutSpec.xml 2007-11-27 22:59:41 UTC
(rev 15996)
@@ -13,10 +13,10 @@
applications="no"
startMenu="no"
startup="no"
- target="$INSTALL_PATH\Uninstaller\Uninstaller.jar"
+ target="$INSTALL_PATH\Uninstaller\Uninstall.cmd"
iconFile="%SystemRoot%\system32\SHELL32.dll"
iconIndex="31"
- workingDirectory="$INSTALL_PATH"
+ workingDirectory="$INSTALL_PATH\Uninstaller"
description="This uninstalls Freenet">
<createForPack name="UninstallStuff" />
Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml 2007-11-27 20:49:43 UTC (rev
15995)
+++ trunk/apps/new_installer/install.xml 2007-11-27 22:59:41 UTC (rev
15996)
@@ -231,7 +231,7 @@
<pack name="UninstallStuff" id="uninstall" required="no"
os="windows">
<description>Create uninstallation hooks in the
registry</description>
- <executable
targetfile="$INSTALL_PATH\bin\remove_service.bat" os="windows" keep="true"
stage="uninstall"/>
+ <parsable
targetfile="$INSTALL_PATH\Uninstaller\uninstall.cmd"/>
</pack>
<pack name="AutoUpdater" id="autoupdater" required="no">
Added: trunk/apps/new_installer/res/windows/Uninstaller/uninstall.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/Uninstaller/uninstall.cmd
(rev 0)
+++ trunk/apps/new_installer/res/windows/Uninstaller/uninstall.cmd
2007-11-27 22:59:41 UTC (rev 15996)
@@ -0,0 +1,30 @@
+ at set PATH=%SYSTEMROOT%\System32\;%PATH%
+ at cd "$INSTALL_PATH\Uninstaller"
+
+:ask
+ at set /P X= Do you really want to uninstall Freenet (Y/N)?
+ at if /I "%X%"=="Y" goto begin
+ at if /I "%X%"=="N" goto end
+ at goto ask
+
+:begin
+ at echo The uninstaller has been started, please hold on
+ at echo Unregistering the system service
+@"../bin/wrapper-windows-x86-32.exe" -r ../wrapper.conf
+ at echo Deleting the freenet user
+ at net user freenet /delete > NUL 2> NUL
+ at echo Cleaning up the registry
+ at echo Windows Registry Editor Version 5.00 >> fref.reg
+ at echo [-HKEY_CLASSES_ROOT\.fref] >> fref.reg
+ at echo [-HKEY_CLASSES_ROOT\fref_auto_file] >> fref.reg
+ at echo
[-HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon\SpecialAccounts\UserList\freenet]
>> fref.reg
+ at regedit /s fref.reg > NUL
+ at del /F fref.reg > NUL
+
+:: needed otherwise the directory isn't deleted
+ at cd c:\
+ at echo Actually remove the files
+ at javaw -jar "$INSTALL_PATH\Uninstaller\uninstaller.jar" -c -f
+
+:end
+ at pause
Modified: trunk/apps/new_installer/res/windows/bin/remove_service.bat
===================================================================
--- trunk/apps/new_installer/res/windows/bin/remove_service.bat 2007-11-27
20:49:43 UTC (rev 15995)
+++ trunk/apps/new_installer/res/windows/bin/remove_service.bat 2007-11-27
22:59:41 UTC (rev 15996)
@@ -4,4 +4,4 @@
@echo Cleaning up
@net stop freenet-darknet
@echo Unregistering Freenet as a system service
- at bin\wrapper-windows-x86-32.exe -r ../wrapper.conf
+ at wrapper-windows-x86-32.exe -r ../wrapper.conf