You are here

Would anybody be interested in a portable Winamp?

11 posts / 0 new
Last post
nuts32605
Offline
Last seen: 14 years 8 months ago
Joined: 2008-10-29 15:44
Would anybody be interested in a portable Winamp?

I've been working with a portable launcher for winamp. If anyone's interested I can post the laucher once I make some installation instructions. I know that Winamp is NOT open-source so I will only post the launcher.

Zach Thibeau
Zach Thibeau's picture
Offline
Last seen: 1 year 5 months ago
Developer
Joined: 2006-05-26 12:08
already one here ;)

already one here Wink https://portableapps.com/node/12519 tis launcher only though

your friendly neighbourhood moderator Zach Thibeau

nuts32605
Offline
Last seen: 14 years 8 months ago
Joined: 2008-10-29 15:44
Funny...

This was devo's last post;

"I've recently run into a lot of work and haven't been able to continue the development of this. I am looking for someone to take this over. There are a few things I planned to add to the launcher but never got around to doing.

1. Backup Winamp.ini into the Data folder
2. Backup the skins directory into the Data folder
3. Backup the media library into the Data folder

There are also some reg entries that were never backed up/deleted.

If someone would like to take this over, feel free. All the files are included in the launcher at the top (Test 3). Just post a message somewhere letting me know that you will take it over so I know and I can send you any files you would like.

-Devo"

I figured I would help the guy out. Is that such a bad thing?

Devo
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-09-04 14:55
So do you want the launcher

So do you want the launcher code? Are you planning on implementing any of the above features or are you just going to put out a launcher that does the same thing mine did? I would be grateful for additional help, but if it's not going to be any different, there's no point in posting another launcher that does the same exact thing.

Wooops_Phil
Offline
Last seen: 14 years 3 months ago
Joined: 2009-06-18 23:25
I run the launcher and tested

I run the launcher and tested the portability with TotalUninstall (previously I used Winamp full 5.3.1 Installer and the extraction instructions) and it reported that there where two entries created
-> [HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable\Winamp]
-> [HKEY_USERS\S-1-5-21-1960408961-630328440-1417001333-1003\SOFTWARE\Netscape\Netscape Navigator\Viewers\interface/x-winamp-skin\REG_SZ, "E:PortableApps\WinampPortable\App\Winamp\Winamp.exe"
I guess the second one was created when it tried to connect to internet and actually it replaced my local winamp installation key.

Can I fix it by adding the entry [HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable] to the launcher files *\WinampPortable\Data\settings\winamp.reg and *\WinampPortable\App\DefaultData\settings\winamp.reg ?

The second key I have no idea how to fix it (I´m not coder expert or anything like that Sad just a simple user with hum some ideas... so that´s why I´m asking Wink

Apart from that my custom skin, equalization and other configs didn´t change my local installation so it worked well Smile One last thing is that when I followed the instruction to extract and configure the files in the installer i didn´t found the IsFirstInst=1 setting so... i created it (with value 0). Don´t know if that has some matter...

Anyway I don´t like to mess my friend computers so if you know tell me if there is a workaround or what i´m doing wrong or if those keys have actually no importance Smile

Cheers

Phil

greyfoxsylux
Offline
Last seen: 14 years 7 months ago
Joined: 2009-01-12 08:44
SanDisk U3 has an app for

SanDisk U3 has an app for Winamp, but it's designed for U3. So, having full functionality like U3's is possible.

Just as an FYI.

nuts32605
Offline
Last seen: 14 years 8 months ago
Joined: 2008-10-29 15:44
Sure,

I would appreciate the source code very much. I've managed to get the winamp.ini and media library to follow along. I'm not sure what you mean by backing up the skins directory. The skins directory belongs in the folder with winamp.exe and I've installed some extra skins to the folder and those followed along as well. I assume that's what you mean.

Devo
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-09-04 14:55
Winamp Launcher

What I meant was for the launcher to copy/move the skins directory from App/winamp to Data/skins. This way the PortableApps.com Backup Utility will backup all the settings (winamp.ini, media library, and skins). To do this I think the best way would be to have two folders within the Data folder:

1) ./Data/settings - this would contain winamp.ini and the media library
2) ./Data/skins - this could contain all the users skins

The only other thing to do would be to have the launcher update all the paths in the media library when the drive letter changes. I searched around the winamp forums for how to do this, but it seems that the library is written in a proprietary format. It is worth looking into though because if the drive letter changes, the media library is totally broken unless folders are rescanned.

Another method might be to update the winamp.ini to update the path of the Watch Folders and have them scanned on startup. This could take a really long time depending on the size of the media library though.

I have directions for portablizing winamp and installing it properly within my launcher, so if you download it, you can just use/improve those instructions if you want.

Here's the launcher I wrote:

;Copyright (C) 2004-2008 John T. Haller
;Copyright (C) 2008 Devo

;Website: http://PortableApps.com/Development/test

;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;GNU General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

!define PORTABLEAPPNAME "Winamp Portable"
!define NAME "WinampPortable"
!define APPNAME "Winamp"
!define VER "5.5.3.0"
!define WEBSITE "http://PortableApps.com/Development/test"
!define DEFAULTEXE "winamp.exe"
!define DEFAULTAPPDIR "winamp"
!define DEFAULTSETTINGSPATH "settings"

;=== Program Details
Name "${PORTABLEAPPNAME}"
OutFile "..\..\${NAME}.exe"
Caption "${PORTABLEAPPNAME} | PortableApps.com"
VIProductVersion "${VER}"
VIAddVersionKey ProductName "${PORTABLEAPPNAME}"
VIAddVersionKey Comments "Allows ${APPNAME} to be run from a removable drive.  For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "PortableApps.com"
VIAddVersionKey LegalCopyright "John T. Haller"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${NAME}.exe"
;VIAddVersionKey PrivateBuild ""
;VIAddVersionKey SpecialBuild ""

;=== Runtime Switches
CRCCheck On
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel user

; Best Compression
SetCompress Auto
SetCompressor /SOLID lzma
SetCompressorDictSize 32
SetDatablockOptimize On

;=== Include
!include "Registry.nsh"
!include "GetParameters.nsh"
!include "MUI.nsh"

;=== Program Icon
Icon "..\..\App\AppInfo\appicon.ico"

;=== Icon & Stye ===
!define MUI_ICON "..\..\App\AppInfo\appicon.ico"

;=== Languages
!insertmacro MUI_LANGUAGE "English"

LangString LauncherFileNotFound ${LANG_ENGLISH} "${PORTABLEAPPNAME} cannot be started. You may wish to re-install to fix this issue. (ERROR: $MISSINGFILEORPATH could not be found)"
LangString LauncherAlreadyRunning ${LANG_ENGLISH} "Another instance of ${APPNAME} is already running. Please close other instances of ${APPNAME} before launching ${PORTABLEAPPNAME}."
LangString LauncherAskCopyLocal ${LANG_ENGLISH} "${PORTABLEAPPNAME} appears to be running from a location that is read-only. Would you like to temporarily copy it to the local hard drive and run it from there?$\n$\nPrivacy Note: If you say Yes, your personal data within ${PORTABLEAPPNAME} will be temporarily copied to a local drive. Although this copy of your data will be deleted when you close ${PORTABLEAPPNAME}, it may be possible for someone else to access your data later."
LangString LauncherNoReadOnly ${LANG_ENGLISH} "${PORTABLEAPPNAME} can not run directly from a read-only location and will now close."

Var PROGRAMDIRECTORY
Var SETTINGSDIRECTORY
Var ADDITIONALPARAMETERS
Var EXECSTRING
Var PROGRAMEXECUTABLE
Var INIPATH
Var DISABLESPLASHSCREEN
Var ISDEFAULTDIRECTORY
Var SECONDARYLAUNCH
Var FAILEDTORESTOREKEY
Var MISSINGFILEORPATH


Section "Main"
	;=== Check if already running
	System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${NAME}2") i .r1 ?e'
	Pop $0
	StrCmp $0 0 CheckForINI
		StrCpy $SECONDARYLAUNCH "true"

	CheckForINI:
	;=== Find the INI file, if there is one
		IfFileExists "$EXEDIR\${NAME}.ini" "" NoINI
			StrCpy "$INIPATH" "$EXEDIR"
			Goto ReadINI

	ReadINI:
		;=== Read the parameters from the INI file
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "${APPNAME}Directory"
		StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "SettingsDirectory"
		StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\$0"

		;=== Check that the above required parameters are present
		IfErrors NoINI

		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "AdditionalParameters"
		StrCpy "$ADDITIONALPARAMETERS" $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "${APPNAME}Executable"
		StrCpy "$PROGRAMEXECUTABLE" $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "DisableSplashScreen"
		StrCpy "$DISABLESPLASHSCREEN" $0

	;CleanUpAnyErrors:
		;=== Any missing unrequired INI entries will be an empty string, ignore associated errors
		ClearErrors

		;=== Correct PROGRAMEXECUTABLE if blank
		StrCmp $PROGRAMEXECUTABLE "" "" CheckForProgramINI
			StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"
			Goto CheckForProgramINI
			
	CheckForProgramINI:
		IfFileExists "$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" FoundProgramEXE NoProgramEXE

	NoINI:
		;=== No INI file, so we'll use the defaults
		StrCpy "$ADDITIONALPARAMETERS" ""
		StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"
		StrCpy "$DISABLESPLASHSCREEN" "false"

		IfFileExists "$EXEDIR\App\${DEFAULTAPPDIR}\${DEFAULTEXE}" "" NoProgramEXE
			StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\App\${DEFAULTAPPDIR}"
			StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\Data\${DEFAULTSETTINGSPATH}"
			StrCpy "$ISDEFAULTDIRECTORY" "true"
			GoTo FoundProgramEXE

	NoProgramEXE:
		;=== Program executable not where expected
		StrCpy $MISSINGFILEORPATH $PROGRAMEXECUTABLE
		MessageBox MB_OK|MB_ICONEXCLAMATION `$(LauncherFileNotFound)`
		Abort
		
	FoundProgramEXE:
		;=== Check if already running
		StrCmp $SECONDARYLAUNCH "true" CheckForSettings
		FindProcDLL::FindProc "$PROGRAMEXECUTABLE"                 
		StrCmp $R0 "1" WarnAnotherInstance CheckForSettings

	WarnAnotherInstance:
		MessageBox MB_OK|MB_ICONINFORMATION `$(LauncherAlreadyRunning)`
		Abort
	
	CheckForSettings:
		IfFileExists "$SETTINGSDIRECTORY\*.*" SettingsFound
		;=== No settings found
		StrCmp $ISDEFAULTDIRECTORY "true" CopyDefaultSettings
		CreateDirectory $SETTINGSDIRECTORY
		Goto SettingsFound
	
	CopyDefaultSettings:
		CreateDirectory "$EXEDIR\Data"
		CreateDirectory "$EXEDIR\Data\settings"
		CopyFiles /SILENT $EXEDIR\App\DefaultData\settings\*.* $EXEDIR\Data\settings
		GoTo SettingsFound

	SettingsFound:
		StrCmp $DISABLESPLASHSCREEN "true" GetPassedParameters
			;=== Show the splash screen before processing the files
			InitPluginsDir
			File /oname=$PLUGINSDIR\splash.jpg "${NAME}.jpg"	
			newadvsplash::show /NOUNLOAD 1500 200 0 -1 /L $PLUGINSDIR\splash.jpg

	GetPassedParameters:
		;=== Get any passed parameters
		Call GetParameters
		Pop $0
		StrCmp "'$0'" "''" "" LaunchProgramParameters

		;=== No parameters
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE"`
		Goto AdditionalParameters

	LaunchProgramParameters:
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" $0`

	AdditionalParameters:
		StrCmp $ADDITIONALPARAMETERS "" RegistryBackup

		;=== Additional Parameters
		StrCpy $EXECSTRING `$EXECSTRING $ADDITIONALPARAMETERS`

	RegistryBackup:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndExit
		;=== Backup the registry
		${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" $R0
		StrCmp $R0 "0" RestoreTheKey
		${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		StrCmp $R0 "-1" RestoreTheKey
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" $R0
		Sleep 100
		
	RestoreTheKey:
		IfFileExists "$SETTINGSDIRECTORY\winamp.reg" "" LaunchNow
	
		IfFileExists "$WINDIR\system32\reg.exe" "" RestoreTheKey9x
			nsExec::ExecToStack `"$WINDIR\system32\reg.exe" import "$SETTINGSDIRECTORY\winamp.reg"`
			Pop $R0
			StrCmp $R0 '0' LaunchNow ;successfully restored key

	RestoreTheKey9x:
		${registry::RestoreKey} "$SETTINGSDIRECTORY\winamp.reg" $R0
		StrCmp $R0 '0' LaunchNow ;successfully restored key
		StrCpy $FAILEDTORESTOREKEY "true"
	
	LaunchNow:
		Sleep 100
		ExecWait $EXECSTRING
		
	CheckRunning:
		Sleep 1000
		FindProcDLL::FindProc "${DEFAULTEXE}"                  
		StrCmp $R0 "1" CheckRunning
		
		StrCmp $FAILEDTORESTOREKEY "true" SetOriginalKeyBack
		${registry::SaveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" "$SETTINGSDIRECTORY\winamp.reg" "" $0
		Sleep 100
	
	SetOriginalKeyBack:
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		Sleep 100
		${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" $R0
		StrCmp $R0 "-1" TheEnd
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		Sleep 100
		Goto TheEnd
		
	LaunchAndExit:
		Exec $EXECSTRING
	
	TheEnd:
		${registry::Unload}
		newadvsplash::stop /WAIT
SectionEnd

Good luck.

nuts32605
Offline
Last seen: 14 years 8 months ago
Joined: 2008-10-29 15:44
Development progresses...

I've worked around some stuff, and I've got this so far if anyone wants to try it out. It uses the root drive to save the app data instead of the application data folder. You're going to need this first. save that file as "AppDataRedirect.nsh" and put it in the same directory as the .nsi file.

Here's the code so far...

;Copyright (C) 2004-2008 John T. Haller
;Copyright (C) 2008 Devo
;Copyright (C) 2009 nuts32605 "nick C."

;Website: http://PortableApps.com/Development/test

;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;GNU General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

!define PORTABLEAPPNAME "Winamp Portable"
!define NAME "WinampPortable"
!define APPNAME "Winamp"
!define VER "5.5.4.1"
!define WEBSITE "http://PortableApps.com/Development/test"
!define DEFAULTEXE "winamp.exe"
!define DEFAULTAPPDIR "winamp"
!define DEFAULTSETTINGSPATH "settings"
!define APPDATACOMPLEXREDIRECT

;=== Program Details
Name "${PORTABLEAPPNAME}"
OutFile "..\..\${NAME}.exe"
Caption "${PORTABLEAPPNAME} | PortableApps.com"
VIProductVersion "${VER}"
VIAddVersionKey ProductName "${PORTABLEAPPNAME}"
VIAddVersionKey Comments "Allows ${APPNAME} to be run from a removable drive.  For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "PortableApps.com"
VIAddVersionKey LegalCopyright "John T. Haller"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${NAME}.exe"
;VIAddVersionKey PrivateBuild ""
;VIAddVersionKey SpecialBuild ""

;=== Runtime Switches
CRCCheck On
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel user

; Best Compression
SetCompress Auto
SetCompressor /SOLID lzma
SetCompressorDictSize 32
SetDatablockOptimize On

;=== Include
!include "FileFunc.nsh"
!include "Registry.nsh"
!include "TextFunc.nsh"
!include "GetParameters.nsh"
!include "MUI.nsh"
!insertmacro GetRoot
!include "AppDataRedirect.nsh"

;=== Program Icon
Icon "..\..\App\AppInfo\appicon.ico"

;=== Icon & Stye ===
!define MUI_ICON "..\..\App\AppInfo\appicon.ico"

;=== Languages
!insertmacro MUI_LANGUAGE "English"

LangString LauncherFileNotFound ${LANG_ENGLISH} "${PORTABLEAPPNAME} cannot be started. You may wish to re-install to fix this issue. (ERROR: $MISSINGFILEORPATH could not be found)"
LangString LauncherAlreadyRunning ${LANG_ENGLISH} "Another instance of ${APPNAME} is already running. Please close other instances of ${APPNAME} before launching ${PORTABLEAPPNAME}."
LangString LauncherAskCopyLocal ${LANG_ENGLISH} "${PORTABLEAPPNAME} appears to be running from a location that is read-only. Would you like to temporarily copy it to the local hard drive and run it from there?$\n$\nPrivacy Note: If you say Yes, your personal data within ${PORTABLEAPPNAME} will be temporarily copied to a local drive. Although this copy of your data will be deleted when you close ${PORTABLEAPPNAME}, it may be possible for someone else to access your data later."
LangString LauncherNoReadOnly ${LANG_ENGLISH} "${PORTABLEAPPNAME} can not run directly from a read-only location and will now close."

Var PROGRAMDIRECTORY
Var SETTINGSDIRECTORY
Var ADDITIONALPARAMETERS
Var EXECSTRING
Var PROGRAMEXECUTABLE
Var INIPATH
Var DISABLESPLASHSCREEN
Var ISDEFAULTDIRECTORY
Var SECONDARYLAUNCH
Var FAILEDTORESTOREKEY
Var MISSINGFILEORPATH
Var USERPROFILEPATH
Var CURRENTDRIVE


Section "Main"
        ReadEnvStr $USERPROFILEPATH "USERPROFILE"
	;=== Check if already running
	System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${NAME}2") i .r1 ?e'
	Pop $0
	StrCmp $0 0 CheckForINI
		StrCpy $SECONDARYLAUNCH "true"

	CheckForINI:
	;=== Find the INI file, if there is one
		IfFileExists "$EXEDIR\${NAME}.ini" "" NoINI
			StrCpy "$INIPATH" "$EXEDIR"
			Goto ReadINI

	ReadINI:
		;=== Read the parameters from the INI file
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "${APPNAME}Directory"
		StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "SettingsDirectory"
		StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\$0"

		;=== Check that the above required parameters are present
		IfErrors NoINI

		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "AdditionalParameters"
		StrCpy "$ADDITIONALPARAMETERS" $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "${APPNAME}Executable"
		StrCpy "$PROGRAMEXECUTABLE" $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "DisableSplashScreen"
		StrCpy "$DISABLESPLASHSCREEN" $0

	;CleanUpAnyErrors:
		;=== Any missing unrequired INI entries will be an empty string, ignore associated errors
		ClearErrors

		;=== Correct PROGRAMEXECUTABLE if blank
		StrCmp $PROGRAMEXECUTABLE "" "" CheckForProgramINI
			StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"
			Goto CheckForProgramINI

	CheckForProgramINI:
		IfFileExists "$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" FoundProgramEXE NoProgramEXE

	NoINI:
		;=== No INI file, so we'll use the defaults
		StrCpy "$ADDITIONALPARAMETERS" ""
		StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"
		StrCpy "$DISABLESPLASHSCREEN" "false"

		IfFileExists "$EXEDIR\App\${DEFAULTAPPDIR}\${DEFAULTEXE}" "" NoProgramEXE
			StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\App\${DEFAULTAPPDIR}"
			StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\Data\${DEFAULTSETTINGSPATH}"
			StrCpy "$ISDEFAULTDIRECTORY" "true"
			GoTo FoundProgramEXE

	NoProgramEXE:
		;=== Program executable not where expected
		StrCpy $MISSINGFILEORPATH $PROGRAMEXECUTABLE
		MessageBox MB_OK|MB_ICONEXCLAMATION `$(LauncherFileNotFound)`
		Abort

	FoundProgramEXE:
		;=== Check if already running
		StrCmp $SECONDARYLAUNCH "true" CheckForSettings
		FindProcDLL::FindProc "$PROGRAMEXECUTABLE"
		StrCmp $R0 "1" WarnAnotherInstance CheckForSettings

	WarnAnotherInstance:
		MessageBox MB_OK|MB_ICONINFORMATION `$(LauncherAlreadyRunning)`
		Abort

	CheckForSettings:
		;IfFileExists "$SETTINGSDIRECTORY\*.*" SettingsFound
		;=== No settings found
		;StrCmp $ISDEFAULTDIRECTORY "true" CopyDefaultSettings
		;CreateDirectory $SETTINGSDIRECTORY
		;Goto SettingsFound
		IfFileExists "$SETTINGSDIRECTORY\Winamp\Winamp.ini" SettingsFound
                StrCmp $ISDEFAULTDIRECTORY "true" CopyDefaultSettings
                CreateDirectory "$SETTINGSDIRECTORY\Winamp\"
                Goto SettingsFound

	CopyDefaultSettings:
		CreateDirectory "$EXEDIR\Data"
		CreateDirectory "$EXEDIR\Data\settings"
		CopyFiles /SILENT $EXEDIR\App\DefaultData\settings\*.* $EXEDIR\Data\settings
		GoTo SettingsFound

	SettingsFound:
                      ${RedirectAppData}
                StrCmp $DISABLESPLASHSCREEN "true" GetPassedParameters
			;=== Show the splash screen before processing the files
			InitPluginsDir
			File /oname=$PLUGINSDIR\splash.jpg "${NAME}.jpg"
			newadvsplash::show /NOUNLOAD 1500 200 0 -1 /L $PLUGINSDIR\splash.jpg
			
                ;ReadINIStr $LASTDRIVE "$SETTINGSDIRECTORY\${NAME}Settings.ini" "${NAME}Settings" "LastDrive"
		${GetRoot} $EXEDIR $CURRENTDRIVE
		;StrCmp $LASTDRIVE $CURRENTDRIVE GetPassedParameters
		;IfFileExists "$SETTINGSDIRECTORY\Winamp.ini" "" RememberPath
			;${ReplaceInFile} `$SETTINGSDIRECTORY\Winamp.ini` `=$LASTDRIVE\` `=$CURRENTDRIVE\`
			;Delete "$SETTINGSDIRECTORY\Winamp.ini.old"

	GetPassedParameters:
		;=== Get any passed parameters
		Call GetParameters
		Pop $0
		StrCmp "'$0'" "''" "" LaunchProgramParameters

		;=== No parameters
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE"`
		Goto AdditionalParameters

	LaunchProgramParameters:
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" $0`

	AdditionalParameters:
		StrCmp $ADDITIONALPARAMETERS "" RegistryBackup

		;=== Additional Parameters
		StrCpy $EXECSTRING `$EXECSTRING $ADDITIONALPARAMETERS`

	RegistryBackup:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndExit
		;=== Backup the registry
		${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" $R0
		StrCmp $R0 "0" RestoreTheKey
		${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		StrCmp $R0 "-1" RestoreTheKey
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" $R0
		Sleep 100

	RestoreTheKey:
		IfFileExists "$SETTINGSDIRECTORY\winamp.reg" "" CreateCustomDirectory

		IfFileExists "$WINDIR\system32\reg.exe" "" RestoreTheKey9x
			nsExec::ExecToStack `"$WINDIR\system32\reg.exe" import "$SETTINGSDIRECTORY\winamp.reg"`
			Pop $R0
			StrCmp $R0 '0' CreateCustomDirectory ;successfully restored key

	RestoreTheKey9x:
		${registry::RestoreKey} "$SETTINGSDIRECTORY\winamp.reg" $R0
		StrCmp $R0 '0' CreateCustomDirectory ;successfully restored key
		StrCpy $FAILEDTORESTOREKEY "true"

        CreateCustomDirectory:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndExit
		;Rename "$USERPROFILEPATH\Application Data\Winamp\" "$USERPROFILEPATH\Application Data\Winamplocal\"
		CreateDirectory "$CURRENTDRIVE\Winamp\"
		CopyFiles /SILENT "$SETTINGSDIRECTORY\*.*" "$CURRENTDRIVE\Winamp\"

        ;LaunchNow:
		Sleep 100
		ExecWait $EXECSTRING

	CheckRunning:
		Sleep 1000
		FindProcDLL::FindProc "${DEFAULTEXE}"
		StrCmp $R0 "1" CheckRunning

		StrCmp $FAILEDTORESTOREKEY "true" SetOriginalKeyBack
		${registry::SaveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" "$SETTINGSDIRECTORY\winamp.reg" "" $0
		Sleep 100

	SetOriginalKeyBack:
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		Sleep 100
		${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" $R0
		StrCmp $R0 "-1" TheEnd
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		Sleep 100
		Goto TheEnd

	LaunchAndExit:
		Exec $EXECSTRING

	TheEnd:
                CopyFiles /SILENT "$CURRENTDRIVE\Winamp\*.*" "$SETTINGSDIRECTORY\"
                ${RevertSettingsLocation}
                Delete "$CURRENTDRIVE\Winamp\*.*"
                RMDir /r "$CURRENTDRIVE\Winamp\"
                ;Rename "$USERPROFILEPATH\Application Data\Winamplocal\" "$USERPROFILEPATH\Application Data\Winamp\"
                ${registry::Unload}
		newadvsplash::stop /WAIT
SectionEnd
NathanJ79
NathanJ79's picture
Offline
Last seen: 4 years 1 month ago
Joined: 2007-07-31 15:07
No and yes

No because it's not allowed at work... I tried a portable Winamp from another site and I got a cryptic message from Windows saying "winamp*.exe cannot be executed, contact your system administrator". How about that?!? I can run VLC, MPlayer, SMPlayer, XMPlay, the system has QuickTime and Windows Media Player on it, I've run Firefox, I've even run Deus Ex (a game based on Unreal Tournament '99) and ZSNES with no problem. But Winamp*.exe is specifically blocked. C'est la vie... (is that spelled right?)

Yes because I use it at home as my primary music player, but I'd want a launcher that supports v2.91. I despise the 3.x series and the 5.x are lacking in a few areas, and they really haven't offered any killer features since they went paid. Ripping and burning? WMP can do that for free. And CDRTFE is free and open source. So, yawn. (There's actually a 2.95, but IIRC they took something out, like OGG support, something stupid, so I went back to 2.91.)

habenyamin
Offline
Last seen: 2 years 1 month ago
Joined: 2009-02-06 13:04
WinampPortable

Changing or set APPDATA\winamp folder directly to SETTINGSDIRECTORY.

;Copyright (C) 2004-2008 John T. Haller of PortableApps.com
;Copyright (C) 2008 Devo
;Copyright (c) 2009 habenyamin
;Website: http://PortableApps.com/Development/test

;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;GNU General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

!define NAME "WinampPortable"
!define PORTABLEAPPNAME "Winamp Portable"
!define APPNAME "Winamp"
!define VER "5.5.6.0"
!define WEBSITE "PortableApps.com/Development/test"
!define DEFAULTEXE "winamp.exe"
!define DEFAULTAPPDIR "winamp"
!define DEFAULTSETTINGSDIR "settings"

;=== Program Details
Name "${PORTABLEAPPNAME}"
OutFile "..\..\${NAME}.exe"
Caption "${PORTABLEAPPNAME} | PortableApps.com"
VIProductVersion "${VER}"
VIAddVersionKey ProductName "${PORTABLEAPPNAME}"
VIAddVersionKey Comments "Allows ${APPNAME} to be run from a removable drive.  For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "PortableApps.com"
VIAddVersionKey LegalCopyright "John T. Haller"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${NAME}.exe"
;VIAddVersionKey PrivateBuild ""
;VIAddVersionKey SpecialBuild ""

;=== Runtime Switches
CRCCheck On
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel user

; Best Compression
SetCompress Auto
SetCompressor /SOLID lzma
SetCompressorDictSize 32
SetDatablockOptimize On

;=== Include
!include "GetParameters.nsh"
!include "Registry.nsh"
!include "MUI.nsh"
;(NSIS Plugins)
!include TextReplace.nsh

;(Custom)

!include StrRep.nsh
;=== Program Icon
Icon "..\..\App\AppInfo\appicon.ico"

;=== Icon & Stye ===
!define MUI_ICON "..\..\App\AppInfo\appicon.ico"

;=== Languages
!insertmacro MUI_LANGUAGE "English"

LangString LauncherFileNotFound ${LANG_ENGLISH} "${PORTABLEAPPNAME} cannot be started. You may wish to re-install to fix this issue. (ERROR: $MISSINGFILEORPATH could not be found)"
LangString LauncherAlreadyRunning ${LANG_ENGLISH} "Another instance of ${APPNAME} is already running. Please close other instances of ${APPNAME} before launching ${PORTABLEAPPNAME}."
LangString LauncherAskCopyLocal ${LANG_ENGLISH} "${PORTABLEAPPNAME} appears to be running from a location that is read-only. Would you like to temporarily copy it to the local hard drive and run it from there?$\n$\nPrivacy Note: If you say Yes, your personal data within ${PORTABLEAPPNAME} will be temporarily copied to a local drive. Although this copy of your data will be deleted when you close ${PORTABLEAPPNAME}, it may be possible for someone else to access your data later."
LangString LauncherNoReadOnly ${LANG_ENGLISH} "${PORTABLEAPPNAME} can not run directly from a read-only location and will now close."


Var PROGRAMDIRECTORY
Var SETTINGSDIRECTORY
Var ADDITIONALPARAMETERS
Var EXECSTRING
Var PROGRAMEXECUTABLE
Var INIPATH
Var SECONDARYLAUNCH
Var DISABLESPLASHSCREEN
Var FAILEDTORESTOREKEY
Var USERTYPE
Var MISSINGFILEORPATH


Section "Main"
	;=== Check if already running
	System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${NAME}") i .r1 ?e'
	Pop $0
	StrCmp $0 0 CheckINI
		StrCpy $SECONDARYLAUNCH "true"

	CheckINI:
		;=== Find the INI file, if there is one
		IfFileExists "$EXEDIR\${NAME}.ini" "" NoINI
			StrCpy "$INIPATH" "$EXEDIR"
			Goto ReadINI

	ReadINI:
		;=== Read the parameters from the INI file
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "${APPNAME}Directory"
		StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "SettingsDirectory"
		StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\$0"
	

		;=== Check that the above required parameters are present
		IfErrors NoINI
		ReadINIStr $ADDITIONALPARAMETERS "$INIPATH\${NAME}.ini" "${NAME}" "AdditionalParameters"
		ReadINIStr $DISABLESPLASHSCREEN "$INIPATH\${NAME}.ini" "${NAME}" "DisableSplashScreen"

	;CleanUpAnyErrors:
		;=== Any missing unrequired INI entries will be an empty string, ignore associated errors
		ClearErrors

		;=== Correct PROGRAMEXECUTABLE if blank
		StrCmp $PROGRAMEXECUTABLE "" "" EndINI
			StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"
			Goto EndINI

	NoINI:
		;=== No INI file, so we'll use the defaults
		StrCpy "$ADDITIONALPARAMETERS" ""
		StrCpy "$PROGRAMEXECUTABLE" "${DEFAULTEXE}"

		IfFileExists "$EXEDIR\App\${DEFAULTAPPDIR}\${DEFAULTEXE}" "" NoProgramEXE
			StrCpy "$PROGRAMDIRECTORY" "$EXEDIR\App\${DEFAULTAPPDIR}"
			StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\Data\${DEFAULTSETTINGSDIR}"
			GoTo EndINI

	EndINI:
		IfFileExists "$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" FoundProgramEXE

	NoProgramEXE:
		;=== Program executable not where expected
		StrCpy $MISSINGFILEORPATH $PROGRAMEXECUTABLE
		MessageBox MB_OK|MB_ICONEXCLAMATION `$(LauncherFileNotFound)`
		Abort
		
	FoundProgramEXE:
		;=== Check if running
		StrCmp $SECONDARYLAUNCH "true" GetPassedParameters
		FindProcDLL::FindProc "eraser.exe"
		StrCmp $R0 "1" WarnAnotherInstance DisplaySplash

	WarnAnotherInstance:
		MessageBox MB_OK|MB_ICONEXCLAMATION `$(LauncherAlreadyRunning)`
		Abort
	
	DisplaySplash:
		StrCmp $DISABLESPLASHSCREEN "true" GetPassedParameters
			;=== Show the splash screen while processing registry entries
			InitPluginsDir
			File /oname=$PLUGINSDIR\splash.jpg "${NAME}.jpg"
			newadvsplash::show /NOUNLOAD 1200 0 0 -1 /L $PLUGINSDIR\splash.jpg
	
	GetPassedParameters:
		;=== Get any passed parameters
		Call GetParameters
		Pop $0
		StrCmp "'$0'" "''" "" LaunchProgramParameters

		;=== No parameters
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE"`
		Goto AdditionalParameters

	LaunchProgramParameters:
		StrCpy $EXECSTRING `"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" $0`

	AdditionalParameters:
		StrCmp $ADDITIONALPARAMETERS "" SettingsDirectory

		;=== Additional Parameters
		StrCpy $EXECSTRING `$EXECSTRING $ADDITIONALPARAMETERS`
	
	SettingsDirectory:
		;=== Set the settings directory if we have a path
                         ;IfFileExists "$SETTINGSDIRECTORY\winamp.reg" RegistryBackup
    			;CreateDirectory $SETTINGSDIRECTORY
			;CopyFiles /SILENT `$EXEDIR\App\DefaultData\settings\winamp.reg` $SETTINGSDIRECTORY
                         IfFileExists "$SETTINGSDIRECTORY\${APPNAME}\${APPNAME}.ini" LastSETTINGSDirectory
                          CreateDirectory "$SETTINGSDIRECTORY\${APPNAME}"
                          CopyFiles /SILENT "$EXEDIR\App\DefaultData\settings\*.*" "$SETTINGSDIRECTORY\"
	LastSETTINGSDirectory:
                     ; double up back slashes and store current directory in $2
		${StrReplace} '$1' '\' '??' '$SETTINGSDIRECTORY'
		${StrReplace} '$2' '??' '\\' '$1'
		;get last directory and store in $0
		ReadINIStr $0 "$SETTINGSDIRECTORY\LastDirectory" "WinampPortableSettings" "LastDirectory"
		StrCmp $0 "" StoreLastDirectory
		StrCmp $0 $2 READWinampini ; No change, so just start
		StoreLastDirectory:
		WriteINIStr "$SETTINGSDIRECTORY\${NAME}Settings.ini" "WinamportableSettings" "LastDirectory" $2
        READWinampini:
               IfFileExists "$SETTINGSDIRECTORY\${APPNAME}\Winamp.ini" "" StoreLastDirectoryToWinampini
                     
		ReadINIStr $0 "$SETTINGSDIRECTORY\Winamp.ini" "out_disk" "cfg_output_dir"
	        StrCmp $0 "" StoreLastDirectoryToWinampini
		StrCmp $0 $2 SET$APPDATAto$SETTINGSDIRECTORY ; No change, so just start

         StoreLastDirectoryToWinampini:
                WriteINIStr "$SETTINGSDIRECTORY\${APPNAME}\Winamp.ini" "out_disk" "cfg_output_dir" "$2"

                WriteINIStr "$SETTINGSDIRECTORY\${APPNAME}\Winamp.ini" "out_disk" "cfg_singlefile_output" "$2\\output.wav"

         SET$APPDATAto$SETTINGSDIRECTORY:
          ;(set saving from $APPDATA\Winamp to $SETTINGSDIRECTORY\Winamp)
                ReadINIStr $0 "$PROGRAMDIRECTORY\paths.ini" "Winamp" "inidir"
	        StrCmp $0 "" APPSATATOSETTINGSDIRECTORY
		StrCmp $0 "$SETTINGSDIRECTORY\${APPNAME}" RegistryBackup ; No change, so just start 
         APPSATATOSETTINGSDIRECTORY:
                WriteINIStr "$PROGRAMDIRECTORY\paths.ini" "Winamp" "inidir" "$SETTINGSDIRECTORY\${APPNAME}"

	 RegistryBackup:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndExit
		;=== Backup the registry
		UserInfo::GetAccountType
		Pop $USERTYPE
		${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" $R0
		StrCmp $R0 "0" RestoreSettings
		${registry::KeyExists} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		StrCmp $R0 "-1" RestoreSettings
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" $R0
				Sleep 100
	
	RestoreSettings:
		IfFileExists "$SETTINGSDIRECTORY\winamp.reg" "" BackupRun
		IfFileExists "$WINDIR\system32\reg.exe" "" RestoreTheKey9x
			nsExec::ExecToStack `"$WINDIR\system32\reg.exe" import "$SETTINGSDIRECTORY\winamp.reg"`
			Pop $R0
			StrCmp $R0 '0' BackupRun ;successfully restored key
	RestoreTheKey9x:
		${registry::RestoreKey} "$SETTINGSDIRECTORY\winamp.reg" $R0
		StrCmp $R0 '0' BackupRun ;successfully restored key
		StrCpy $FAILEDTORESTOREKEY "true"

	BackupRun:
		${registry::Read} "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" "Winamp" $0 $1
		StrCmp $0 "" BackupHCR
		${registry::MoveValue} "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" "Winamp" "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" "Winamp-BackupByWinampPortable" $R0

	BackupHCR:
		StrCmp $USERTYPE "Guest" StartProgramNow
		StrCmp $USERTYPE "User" StartProgramNow
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\Applications\winamp.exe" "HKEY_LOCAL_MACHINE\Software\Classes\Applications\winamp.exe-BackupByWinampPortable" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Nullsoft" "HKEY_LOCAL_MACHINE\Software\Nullsoft-BackupByWinampPortable" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp3-skin" "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp3-skin-BackupByWinampPortable" $R0	
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-lang" "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-lang-BackupByWinampPortable" $R0	
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-skin" "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-skin-BackupByWinampPortable" $R0	
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\.wlz" "HKEY_LOCAL_MACHINE\Software\Classes\.wlz-BackupByWinampPortable" $R0	
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\.wsz" "HKEY_LOCAL_MACHINE\Software\Classes\.wsz-BackupByWinampPortable" $R0	
			
	StartProgramNow:
		Sleep 100
		SetOutPath $PROGRAMDIRECTORY
		ExecWait $EXECSTRING
		Delete "$PROGRAMDIRECTORY\paths.ini"
		StrCmp $FAILEDTORESTOREKEY "true" SetOriginalKeyBack
		${registry::SaveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" "$SETTINGSDIRECTORY\winamp.reg" "" $R0
		Sleep 100
	
	SetOriginalKeyBack:
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\SOFTWARE\Nullsoft" $R0
		${registry::DeleteValue} "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" "Winamp" $R0
		${registry::MoveValue} "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" "Winamp-BackupByWinampPortable" "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" "Winamp" $R0
		StrCmp $USERTYPE "Guest" TheEnd
		StrCmp $USERTYPE "User" TheEnd
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\Software\Classes\Applications\winamp.exe" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\Applications\winamp.exe-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\Software\Classes\Applications\winamp.exe" $R0
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\Software\Nullsoft" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Nullsoft-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\Software\Nullsoft" $R0
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp3-skin" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp3-skin-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp3-skin" $R0		
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-lang" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-lang-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-lang" $R0
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-skin" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-skin-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\Software\Classes\MIME\Database\Content Type\interface/x-winamp-skin" $R0
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\Software\Classes\.wlz" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\.wlz-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\Software\Classes\.wlz" $R0	
		${registry::DeleteKey} "HKEY_LOCAL_MACHINE\Software\Classes\.wsz" $R0
		${registry::MoveKey} "HKEY_LOCAL_MACHINE\Software\Classes\.wsz-BackupByWinampPortable" "HKEY_LOCAL_MACHINE\Software\Classes\.wsz" $R0	
		Goto TheEnd
		
	LaunchAndExit:
		Exec $EXECSTRING

	TheEnd:
                 
		${registry::Unload}
		newadvsplash::stop /WAIT
SectionEnd


========================

Thanks

Log in or register to post comments