You are here

HELP WITH NSIS SCRIPT

37 posts / 0 new
Last post
Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
HELP WITH NSIS SCRIPT

Hello, im having problems with a nsis script im compiling. IM Having trouble with the "VIProductVersion", it always says "Error: invalid VIProductVersion format, should be X.X.X.X
Error - aborting creation process" and i have tried to figure out what is wrong but cant. What do u put in VIProductVersion part, i looked at another NSIS script and it had this in its place VIProductVersion "${Ver}" i put that in and i still get the same error message, also i put in my products version, which is "4.13.5" and i still get the same error message. Any help will be appreciated.

Simeon
Simeon's picture
Offline
Last seen: 9 years 6 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
X.X.X.X

means it has to have 4 digits.
If you use ${Ver} you have to specify it in advance.
In your case try 4.13.5.0 and if that doesn't work use 4.1.3.5.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
Thanks...

Thanks 4 the help, it worked now that i put 4 digits in. I feel dumb now because that seemed so simple. thanks 4 your help now im gonna test out my app and see if it runs portably.

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
How would you.....

My program im making portable made a folder in my application folder 4 my account. How would u add this in (cause i have it as the same format 4 apps found here) and would i have to add something to my script so it knows to save its data there.

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

Simeon
Simeon's picture
Offline
Last seen: 9 years 6 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
In general

there are 3 possibilities:
1) You can tell the exe via a command line switch where it should look for the data. Check the VLC launcher for an example.
2) You have to set an Environment variable pointing to the settings folder. PokerTH would be an example for that.
3) You have to backup eventually existing local settings, copy the settings to the local PC, run the Application , save the settings back to the drive and rename the local settings.

3) is the most complicated so its better to use 1 or 2.

I don't know how well you know NSIS. If all this is Greek to you, then I'd suggest you study the existing launchers (Mozillas Apps are the most complicated) to get some clues.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
hmmm.... is this right??

HERE is my script(this is my first nsis script so be nice)

!define: "APP"="Frostwire"
!define: "EXE"="Frostwire.exe"
!define: "AUTHOR"="Nathan"
!define: "VER"="4.13.5"
!define: "PNAME"="FrostwirePortable"
!define: "ICON"="Frostwire.ico"
!define: "DEFAULTDATADIR"="FrostWire"
VIAddVersionKey: "ProductName" "Frostwire Portable"
VIAddVersionKey: "Comments" "Allows Frostwire to be run from a removable drive."
VIAddVersionKey: "CompanyName" "by Nathan"
VIAddVersionKey: "LegalCopyright" "Launcher created by ${Nathan}"
VIAddVersionKey: "FileDescription" "Frostwire Portable"
VIAddVersionKey: "FileVersion" "${4.13.5}"
VIAddVersionKey: "ProductVersion" "4.13.5"
VIAddVersionKey: "OriginalFilename" "Frostwire.exe"
CRCCheck: On
WindowIcon: Off
SilentInstall: Silent
AutoCloseWindow: true
!include: "C:\Documents and Settings\Nathan\Desktop\NSISPortable\App\NSIS\Include\FileFunc.nsh"
!define: "FILEFUNC_INCLUDED"=""
!include: closed: "C:\Documents and Settings\Nathan\Desktop\NSISPortable\App\NSIS\Include\FileFunc.nsh"
!insertmacro: GetParameters
!insertmacro: end of GetParameters
!include: "C:\Documents and Settings\Nathan\Desktop\NSISPortable\App\NSIS\Include\WinMessages.nsh"
!define: "WINMESSAGES_INCLUDED"=""
!include: closed: "C:\Documents and Settings\Nathan\Desktop\NSISPortable\App\NSIS\Include\WinMessages.nsh"
SetDatablockOptimize: on
SetCompress: force
SetCompressor: /FINAL /SOLID lzma
Var: "PROGRAMEXE"
Var: "PROGRAMPATH"
Var: "PROGRAMARGS"
Var: "DATADIR"
Var: "SUBLAUNCH"
Name: "Frostwire Portable"
Icon: "Frostwire.ico"
Caption: "Frostwire Portable - 4.13.5"
OutFile: "FrostwirePortable.exe"
LoadLanguageFile: C:\Documents and Settings\Nathan\Desktop\NSISPortable\App\NSIS\Contrib\Language files\English.nlf
Section: "Main"
Call "Init"
Call "InitVars"
Call "InitINI"
Call "InitChecks"
Call "InitReg"
Call "InitFiles"
Call "InitFolders"
Call "InitApp"
Call "CleanFolders"
Call "CleanFiles"
Call "CleanReg"
Call "Clean"
SectionEnd
Function: "Init"
FunctionEnd
Function: "InitVars"
StrCpy $PROGRAMPATH "" () ()
StrCpy $PROGRAMEXE "Frostwire.exe" () ()
warning: unknown variable/constant "{DEFAULTARG}" detected, ignoring (C:\Documents and Settings\Nathan\Desktop\FrostwirePortable\Other\FrostwirePortable.nsi:106)
StrCpy $PROGRAMARGS "${DEFAULTARG}" () ()
IfFileExists: "$EXEDIR\App\Frostwire\Frostwire.exe" ? 0 : CheckAppName
StrCpy $PROGRAMPATH "$EXEDIR\App\Frostwire" () ()
StrCpy $DATADIR "$EXEDIR\Data" () ()
Goto: EndInitVar
IfFileExists: "$EXEDIR\Frostwire\Frostwire.exe" ? 0 : CheckApp
StrCpy $PROGRAMPATH "$EXEDIR\Frostwire" () ()
StrCpy $DATADIR "$EXEDIR\Data" () ()
Goto: EndInitVar
IfFileExists: "$EXEDIR\App\Frostwire.exe" ? 0 : EndInitVar
StrCpy $PROGRAMPATH "$EXEDIR\App" () ()
StrCpy $DATADIR "$EXEDIR\Data" () ()
Goto: EndInitVar
FunctionEnd
Function: "InitINI"
FunctionEnd
Function: "InitChecks"
File: "FindProcDLL.dll"->"$PLUGINSDIR\FindProcDLL.dll" 3584 bytes
Plugin Command: FindProc $PROGRAMEXE
StrCmp "$R0" "1" equal=0, nonequal=EndSubCheck
StrCpy $SUBLAUNCH "true" () ()
FunctionEnd
Function: "InitApp"
!insertmacro: GetParametersCall
!insertmacro: end of GetParametersCall
StrCmp "$R1" "" equal=0, nonequal=+2
StrCpy $R1 "$PROGRAMARGS" () ()
StrCmp "$SUBLAUNCH" "true" equal=SubsequentLaunch, nonequal=
ExecWait: ""$PROGRAMPATH\$PROGRAMEXE" $R1" (->)
Goto: EndInitApp
warning: unknown variable/constant "{ENABLEEXIT}" detected, ignoring (C:\Documents and Settings\Nathan\Desktop\FrostwirePortable\Other\FrostwirePortable.nsi:151)
StrCmp "${ENABLEEXIT}" "yes" equal=0, nonequal=InitAppKillProc
StrCmp "$R1" "-exit" equal=0, nonequal=SubsequentLaunchRun
Goto: EndInitApp
warning: unknown variable/constant "{ENABLEKILL}" detected, ignoring (C:\Documents and Settings\Nathan\Desktop\FrostwirePortable\Other\FrostwirePortable.nsi:156)
StrCmp "${ENABLEKILL}" "yes" equal=0, nonequal=SubsequentLaunchRun
StrCmp "$R1" "-exit" equal=0, nonequal=SubsequentLaunchRun
Sleep: 2000 ms
File: "KillProcDLL.dll"->"$PLUGINSDIR\KillProcDLL.dll" 4096 bytes
Plugin Command: KillProc $PROGRAMEXE
Plugin Command: FindProc $PROGRAMEXE
StrCmp "$R0" "1" equal=InitAppKillProc, nonequal=
Goto: EndInitApp
Exec: ""$PROGRAMPATH\$PROGRAMEXE" $R1" (->)
FunctionEnd
Function: "InitFolders"
FunctionEnd
Function: "CleanFolders"
FunctionEnd
Function: "InitFiles"
FunctionEnd
Function: "CleanFiles"
FunctionEnd
Function: "InitReg"
FunctionEnd
Function: "CleanReg"
FunctionEnd
Function: "Clean"
StrCmp "$SUBLAUNCH" "true" equal=EndClean, nonequal=
FunctionEnd

(P.S I want to make Frostwire for my personal use)

["pre" tags added by mod Tim]

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

wraithdu
Offline
Last seen: 10 years 10 months ago
Developer
Joined: 2007-06-27 20:22
Hmmm, that doesn't look

Hmmm, that doesn't look right. Did you copy the log window or something?

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
i need help....

it says this "StrCpy expects 2-4 parameters, got 1.
Usage: StrCpy $(user_var: output) str [maxlen] [startoffset]"

How would i fix this??

Also i took the NSIS script from Firefox and i have been changing some of it. i need to go through it and delete everything 4 firefox and add my stuff in.

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

rab040ma
Offline
Last seen: 1 week 4 days ago
Joined: 2007-08-27 13:35
Well, the answer is "do it

Well, the answer is "do it the way the example says". It says it needs two parameters, and you only gave it one.

To get more assistance, you could do two things:

  1. in plain language say what it is you want to happen (e.g. I want to store the word "juggernaut" in the variable named $SEACHANTY.)
  2. show us exactly what you have tried so far, e.g. by copying and pasting the source that you typed, as well as the error message from the compiler and a few lines before

You probably only need to post a small amount of code at a time.

If you are posting code, you should surround the code with "pre" tags, <pre> and </pre>. That sets them in a different typeface and gives the forum software a bit of control over the length.

MC

Tim Clark
Tim Clark's picture
Offline
Last seen: 13 years 2 weeks ago
Joined: 2006-06-18 13:55
I did it for him

"If you are posting code, you should surround the code with "pre" tags... That sets them in a different typeface and gives the forum software a bit of control over the length."

I did it for him, I hope I did it right.

Tim

Things have got to get better, they can't get worse, or can they?

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
Here i messed up on the top
;Copyright 2004-2007 John T. Haller
;Calendar and chrome.rdf procedures Copyright 2004 

Gerard Balagué

;Website: www.Frostwire.com

;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 "Frostwire, Portable Edition"
!define APPNAME "Frostwire"
!define NAME "FrostwirePortable"
!define VER "4.13.5.0"
!define WEBSITE "Frostwire.com"
!define DEFAULTEXE "frostwire.exe"
!define DEFAULTAPPDIR "Frostwire"

;=== 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 "Nathan"
VIAddVersionKey LegalCopyright "Nathan, portions 

Gerard Balagué"
VIAddVersionKey FileDescription "${PORTABLEAPPNAME}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
VIAddVersionKey LegalTrademarks "Frostwire is 

Opensource"
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 "Attrib.nsh"
!include "GetParameters.nsh"
!include "MUI.nsh"
!include "GetParent.nsh"
!include "Registry.nsh"
!include "ReplaceInFile.nsh"
!include "StrRep.nsh"
!include "TextFunc.nsh"
!insertmacro ConfigRead
!insertmacro ConfigWrite


;=== Program Icon
Icon "Frostwire.ico"

;=== Icon & Stye ===
!define MUI_ICON "Frostwire.ico"
BrandingText "PortableApps.com - Your Digital Life, 

Anywhere™"
MiscButtonText "" "" "" "Continue"
InstallButtonText "Continue"

;=== Pages
!define MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_PAGE_INSTFILES

;=== 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."


;=== Variables
Var PROGRAMDIRECTORY
Var FROSTWIREDIRECTORY
Var ADDITIONALPARAMETERS
Var ALLOWMULTIPLEINSTANCES
Var SKIPCHROMEFIX
Var SKIPCOMPREGFIX
Var EXECSTRING
Var PROGRAMEXECUTABLE
Var INIPATH
Var ISFILELINE
Var DISABLESPLASHSCREEN
Var DISABLEINTELLIGENTSTART
Var LOCALHOMEPAGE
Var ISDEFAULTDIRECTORY
Var RUNLOCALLY
Var WAITFORPROGRAM
Var LASTPROFILEDIRECTORY
Var APPDATAPATH
Var SECONDARYLAUNCH
Var SHOWLICENSE
Var MISSINGFILEORPATH
Var CRASHREPORTSDIREXISTS

Function .onInit
 	Call GetParameters
	Pop $0
	StrCmp "$0" "SHOWLICENSE" ShowLicense 

LicenseDone

	ShowLicense:
		StrCpy $SHOWLICENSE "true"
		Goto onInitDone

	LicenseDone:
		SetSilent silent
		Goto onInitDone

	onInitDone:
FunctionEnd


Section "Main"
	;=== Setup variables
	ReadEnvStr $APPDATAPATH "APPDATA"

	;=== Find the INI file, if there is one
		IfFileExists "$EXEDIR\${NAME}.ini" "" 

NoINI
			StrCpy "$INIPATH" "$EXEDIR"

		;=== Read the parameters from the INI 

file
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" FrostwireAME}Directory"
		StrCpy $PROGRAMDIRECTORY "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "ProfileDirectory"
		StrCpy $FrostwireDIRECTORY
"$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" 
		;=== Check that the above required 

parameters are present
		IfErrors NoINI

		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "PluginsDirectory"
		StrCpy $PLUGINSDIRECTORY "$EXEDIR\$0"
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "AdditionalParameters"
		StrCpy $ADDITIONALPARAMETERS $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "AllowMultipleInstances"
		StrCpy $ALLOWMULTIPLEINSTANCES $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "SkipChromeFix"
		StrCpy $SKIPCHROMEFIX $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "SkipCompregFix"
		StrCpy $SKIPCOMPREGFIX $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "${APPNAME}Executable"
		StrCpy $PROGRAMEXECUTABLE $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "WaitFor${APPNAME}"
		StrCpy $WAITFORPROGRAM $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "DisableSplashScreen"
		StrCpy $DISABLESPLASHSCREEN $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "DisableIntelligentStart"
		StrCpy $DISABLEINTELLIGENTSTART $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "LocalHomepage"
		StrCpy $LOCALHOMEPAGE $0
		ReadINIStr $0 "$INIPATH\${NAME}.ini" 

"${NAME}" "RunLocally"
		StrCpy $RUNLOCALLY $0
		StrCmp $RUNLOCALLY "true" "" 

CleanUpAnyErrors
		StrCpy $WAITFORPROGRAM "true"
		
	CleanUpAnyErrors:
		;=== Any missing unrequired INI 

entries will be an empty string, ignore associated 

errors
		ClearErrors

		;=== Check if default directories
		StrCmp $PROGRAMDIRECTORY 

"$EXEDIR\App\${DEFAULTAPPDIR}" "" EndINI
		StrCpy $SETTINGSDIRECTORY 

"$EXEDIR\Data\Frostwire" "" EndINI
		StrCpy $ISDEFAULTDIRECTORY "true"
	
	EndINI:
		IfFileExists 

"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" FoundProgramEXE 

NoProgramEXE

	NoINI:
		;=== No INI file, so we'll use the 

defaults
		StrCpy $ADDITIONALPARAMETERS ""
		StrCpy $ALLOWMULTIPLEINSTANCES "false"
		StrCpy $SKIPCHROMEFIX "false"
		StrCpy $SKIPCOMPREGFIX "false"
		StrCpy $WAITFORPROGRAM "false"
		StrCpy $PROGRAMEXECUTABLE 

"${DEFAULTEXE}"
		StrCpy $DISABLESPLASHSCREEN "false"
		StrCpy $DISABLEINTELLIGENTSTART 

"false"

		IfFileExists 

"$EXEDIR\App\${DEFAULTAPPDIR}\${DEFAULTEXE}" "" 

CheckPortableProgramDIR
			StrCpy $PROGRAMDIRECTORY 

"$EXEDIR\App\${DEFAULTAPPDIR}"
			StrCpy $SETTINGSDIRECTORY 

"$EXEDIR\Data\Frostwire"
			StrCpy $ISDEFAULTDIRECTORY 

"true"
			Goto FoundProgramEXE
	
	CheckPortableProgramDIR:
			IfFileExists "$EXEDIR\${NAME}

\App\${DEFAULTAPPDIR}\${DEFAULTEXE}" "" NoProgramEXE
			StrCpy $PROGRAMDIRECTORY 

"$EXEDIR\${NAME}\App\${DEFAULTAPPDIR}"
			
			StrCpy $SETTINGSDIRECTORY 

"$EXEDIR\${NAME}\Data\Frostwire"
			Goto FoundProgramEXE

	NoProgramEXE:
		;=== Program executable not where 

expected
		StrCpy $MISSINGFILEORPATH 

$PROGRAMEXECUTABLE
		MessageBox MB_OK|MB_ICONEXCLAMATION 

`$(LauncherFileNotFound)`
		Abort
		
	FoundProgramEXE:
		IfFileExists "$APPDATA\Frostwire\*.*" 

CheckForCrashReports
			StrCpy $WAITFORPROGRAM "true"
			${registry::KeyExists} 

"HKEY_CURRENT_USER\Software\mozilla.org" $R0
			StrCmp $R0 "-1" 

CheckForCrashReports ;=== If it doesn't exist, skip 

the next line
			StrCpy $MOZILLAORGKEYEXISTS 

"true"
			
	CheckForCrashReports:
		IfFileExists "$APPDATA\Frostwire\*.*" 

"" CheckIfRunning
			StrCpy $CRASHREPORTSDIREXISTS 

"true"
	
	CheckIfRunning:
		;=== Check if running
		StrCmp $ALLOWMULTIPLEINSTANCES "true" 

ProfileWork
		FindProcDLL::FindProc "Frostwire.exe"
		StrCmp $R0 "1" "" ProfileWork
			;=== Already running, check if 

it is using the portable profile
			IfFileExists 

"$PROFILEDIRECTORY\parent.lock" "" WarnAnotherInstance
				StrCpy 

$SECONDARYLAUNCH "true"
				Goto RunProgram
		
	WarnAnotherInstance:
		MessageBox MB_OK|MB_ICONINFORMATION 

`$(LauncherAlreadyRunning)`
		Abort
	
	ProfileWork:
	;=== Check for an existing profile
	IfFileExists "$PROFILEDIRECTORY\prefs.js" 

ProfileFound
		;=== No profile was found
		StrCmp $ISDEFAULTDIRECTORY "true" 

CopyDefaultProfile CreateProfile
	
	CopyDefaultProfile:
		CreateDirectory "$EXEDIR\Data"
		CreateDirectory 

"$EXEDIR\Data\settings"
		CopyFiles /SILENT 

$EXEDIR\App\DefaultData\Frostwire\*.* 

$EXEDIR\Data\Frostwire
		
		GoTo ProfileFound
	
	CreateProfile:
		IfFileExists "$PROFILEDIRECTORY\*.*" 

ProfileFound
		CreateDirectory "$PROFILEDIRECTORY"

	ProfileFound:
		IfFileExists 

"$SETTINGSDIRECTORY\FrostwirePortableSettings.ini" 

SettingsFound
			CreateDirectory 

"$SETTINGSDIRECTORY"
			FileOpen $R0 

"$SETTINGSDIRECTORY\FrostwirePortableSettings.ini" w
			FileClose $R0
			WriteINIStr 

"$SETTINGSDIRECTORY\FrostwirePortableSettings.ini" 

"FirefoxPortableSettings" "LastProfileDirectory" 

"NONE"
			
	SettingsFound:
		StrCmp $SHOWLICENSE "true" "" 

CheckForLicense
			WriteINIStr 

"$SETTINGSDIRECTORY\FrostwirePortableSettings.ini" 

"FrostwirePortableSettings" "AgreedToLicense" "YES"
			Goto TheEnd
	
	CheckForLicense:
		ReadINIStr $0 

"$SETTINGSDIRECTORY\FrostwirePortableSettings.ini" 

"FrostwirePortableSettings" "AgreedToLicense"
		StrCmp $0 "YES" LicenseAgreedTo 

RelaunchWithLicense

	RelaunchWithLicense:
		System::Call 

'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i 

r1'
		ExecWait `$R0 SHOWLICENSE`
		ReadINIStr $0 

"$SETTINGSDIRECTORY\FrostwirePortableSettings.ini" 

"FrostwirePortableSettings" "AgreedToLicense"
		StrCmp $0 "YES" LicenseAgreedTo TheEnd
	
	LicenseAgreedTo:
		;=== Check for read/write
		StrCmp $RUNLOCALLY "true" 

DisplaySplash
		ClearErrors
		FileOpen $R0 

"$PROFILEDIRECTORY\writetest.temp" w
		IfErrors "" WriteSuccessful
			;== Write failed, so we're 

read-only
			MessageBox 

MB_YESNO|MB_ICONQUESTION `$(LauncherAskCopyLocal)` 

IDYES SwitchToRunLocally
			MessageBox 

MB_OK|MB_ICONINFORMATION `$(LauncherNoReadOnly)`
			Abort
			
	SwitchToRunLocally:
		StrCpy $RUNLOCALLY "true"
		Goto DisplaySplash
	
	WriteSuccessful:
		FileClose $R0
		Delete 

"$PROFILEDIRECTORY\writetest.temp"
	
	DisplaySplash:
		StrCmp $DISABLESPLASHSCREEN "true" 

SkipSplashScreen
			;=== Show the splash screen 

before processing the files
			InitPluginsDir
			File 

/oname=$PLUGINSDIR\splash.jpg "${NAME}.jpg"
			newadvsplash::show /NOUNLOAD 

2000 200 0 -1 /L $PLUGINSDIR\splash.jpg

	SkipSplashScreen:
		;=== Run locally if needed (aka 

Portable Frostwire Live)
		StrCmp $RUNLOCALLY "true" "" 

CompareProfilePath
		RMDir /r "$TEMP\${NAME}\"
		CreateDirectory $TEMP\${NAME}\profile
		CreateDirectory $TEMP\${NAME}\plugins
		CreateDirectory $TEMP\${NAME}\program
		CopyFiles /SILENT 

$PROFILEDIRECTORY\*.* $TEMP\${NAME}\profile
		StrCpy $PROFILEDIRECTORY 

$TEMP\${NAME}\profile
		CopyFiles /SILENT 

$PLUGINSDIRECTORY\*.* $TEMP\${NAME}\plugins
		StrCpy $PROFILEDIRECTORY 

$TEMP\${NAME}\profile
		CopyFiles /SILENT 

$PROGRAMDIRECTORY\*.* $TEMP\${NAME}\program
		StrCpy $PROGRAMDIRECTORY 

$TEMP\${NAME}\program
		Push $TEMP\${NAME}
		Call Attrib

	CompareProfilePath:
		ReadINIStr $LASTPROFILEDIRECTORY 

"$SETTINGSDIRECTORY\${NAME}Settings.ini" "${NAME}

Settings" "LastProfileDirectory"
		StrCmp $PROFILEDIRECTORY 

$LASTPROFILEDIRECTORY "" AdjustChrome
			StrCmp 

$DISABLEINTELLIGENTSTART "true" AdjustChrome
				StrCpy $SKIPCHROMEFIX 

"true"
				StrCpy $SKIPCOMPREGFIX 

"true"
	
	AdjustChrome:
		WriteINIStr 

"$SETTINGSDIRECTORY\${NAME}Settings.ini" "${NAME}

Settings" "LastProfileDirectory" "$PROFILEDIRECTORY"
		
		;=== Adjust the chrome.rdf
		StrCmp $SKIPCHROMEFIX "true" 

FixCalendarManager
		IfFileExists 

"$PROFILEDIRECTORY\chrome\chrome.rdf" "" 

FixCalendarManager
		FileOpen $0 

"$PROFILEDIRECTORY\chrome\chrome.rdf" r
		FileOpen $R0 

"$PROFILEDIRECTORY\chrome\chrome.rdf.new" w
		ClearErrors ; if there's an error, 

we're done with the file
	
		NextLine:
			FileWrite $R0 $4
			FileRead $0 $4
			IfErrors NoMoreLines ;== we've 

reached the end of the file
			StrCpy $5 $4 35
			StrCmp $5 `                   

c:baseURL="jar:f` FoundJarLine
			StrCmp $5 `                   

c:baseURL="file:` FoundFileLine NextLine

		FoundJarLine:
			StrCpy $R4 40
			StrCpy $ISFILELINE "0"
			GoTo NotYet

		FoundFileLine:
			StrCpy $R4 40
			StrCpy $ISFILELINE "1"

		NotYet:
			IntOp $R4 $R4 + 1
			StrCpy $7 $4 10 $R4 ;=== 

looking for the point to strip the extension path
			StrCmp $7 "extensions" 

PathFound NotYet
	
		PathFound:
			StrCpy $5 $4 "" $R4
			StrCmp $ISFILELINE "0" 

MakeJarLine MakeFileLine

		MakeJarLine:
			StrCpy $4 `                   

c:baseURL="jar:file:///$PROFILEDIRECTORY/$5`
			GoTo NextLine

		MakeFileLine:
			StrCpy $4 `                   

c:baseURL="file:///$PROFILEDIRECTORY/$5`
			GoTo NextLine

		NoMoreLines:
			FileClose $0
			FileClose $R0

			;=== Backup the chrome.rdf
			CopyFiles /SILENT 

"$PROFILEDIRECTORY\chrome\chrome.rdf" 

"$PROFILEDIRECTORY\chrome\chrome.rdf.old"
			CopyFiles /SILENT 

"$PROFILEDIRECTORY\chrome\chrome.rdf.new" 

"$PROFILEDIRECTORY\chrome\chrome.rdf" 

	FixCalendarManager:
		IfFileExists 

"$PROFILEDIRECTORY\Calendar\CalendarManager.rdf" "" 

FixPrefsJs

		FileOpen $0 

"$PROFILEDIRECTORY\Calendar\CalendarManager.rdf" r
		FileOpen $R0 

"$PROFILEDIRECTORY\Calendar\CalendarManager.rdf.new" w
		ClearErrors ; if there's an error, 

we're done with the file
	
		CMNextLine:
			FileWrite $R0 $4
			FileRead $0 $4
			IfErrors CMNoMoreLines ;== 

we've reached the end of the file
			StrCpy $5 $4 28
			StrCmp $5 `                   

NC:path="` "" CMNextLine
			StrCpy $R4 28
	
		CMNotYet:
			IntOp $R4 $R4 + 1
			StrCpy $7 $4 9 $R4 ; looking 

for the point to strip the calendar path
			StrCmp $7 "Calendar\" "" 

CMNotYet
			StrCpy $5 $4 "" $R4
			StrCpy $4 `                   

NC:path="$PROFILEDIRECTORY\$5` ;=== the adjusted 

extension path
			GoTo CMNextLine

		CMNoMoreLines:
			FileClose $0
			FileClose $R0

			;=== Backup the 

Calendar\CalendarManager.rdf just in case
			CopyFiles /SILENT 

"$PROFILEDIRECTORY\Calendar\CalendarManager.rdf" 

"$PROFILEDIRECTORY\Calendar\CalendarManager.rdf.old"
			CopyFiles /SILENT 

"$PROFILEDIRECTORY\Calendar\CalendarManager.rdf.new" 

"$PROFILEDIRECTORY\Calendar\CalendarManager.rdf" 

	FixPrefsJs:
		IfFileExists 

"$PROFILEDIRECTORY\prefs.js" "" FixMimeTypes
		StrCmp $LASTPROFILEDIRECTORY "NONE" 

FixPrefsJsPart2
		StrCpy $2 $LASTPROFILEDIRECTORY 1 

;Last drive letter
		StrCpy $3 $PROFILEDIRECTORY 1 ;Current 

drive letter
		StrCmp $2 $3 FixPrefsJsPart2 ;If no 

change, move on
		
		;=== Fix any local bookmarks
		${ConfigRead} 

"$PROFILEDIRECTORY\prefs.js" `user_pref

("browser.startup.homepage", "` $0
		${StrReplace} $1 'file:///$2' 

'file:///$3' $0
		${ConfigWrite} 

"$PROFILEDIRECTORY\prefs.js" `user_pref

("browser.startup.homepage", "` $1 $R0
		
		;=== Replace drive letter entries 

elsewhere
		${ReplaceInFile} 

"$PROFILEDIRECTORY\prefs.js" `", "$2:\\` `", "$3:\\`
		Delete 

"$PROFILEDIRECTORY\prefs.js.old"
	
	FixPrefsJsPart2:
		;=== Be sure the default browser check 

is disabled
		FileOpen $0 

"$PROFILEDIRECTORY\prefs.js" a
		FileSeek $0 0 END
		FileWriteByte $0 "13"
		FileWriteByte $0 "10"
		FileWrite $0 `user_pref

("browser.shell.checkDefaultBrowser", false);`
		FileWriteByte $0 "13"
		FileWriteByte $0 "10"
		StrCmp "$LOCALHOMEPAGE" "" 

FixPrefsJsClose
		FileWrite $0 `user_pref

("browser.startup.homepage", "file:///$EXEDIR/

$LOCALHOMEPAGE");`
		FileWriteByte $0 "13"
		FileWriteByte $0 "10"
		
	FixPrefsJsClose:
		FileClose $0 

		
	FixMimeTypes:
		IfFileExists 

"$PROFILEDIRECTORY\mimeTypes.rdf" "" RunProgram
		StrCmp $LASTPROFILEDIRECTORY "NONE" 

RunProgram
		Push $LASTPROFILEDIRECTORY
		Call GetParent
		Call GetParent
		Call GetParent
		Pop $0 ;Last PortableApps Directory
		StrCpy $0 '$0\'
		Push $PROFILEDIRECTORY
		Call GetParent
		Call GetParent
		Call GetParent
		Pop $1 ;Current PortableApps Directory
		StrCpy $1 '$1\'
		StrCmp $0 $1 RunProgram
		${ReplaceInFile} 

"$PROFILEDIRECTORY\mimeTypes.rdf" $0 $1
		Delete 

"$PROFILEDIRECTORY\mimeTypes.rdf.old"
	
	RunProgram:
		StrCmp $SKIPCOMPREGFIX "true" 

GetPassedParameters

		;=== Delete component registry to 

ensure compatibility with all extensions
		Delete $PROFILEDIRECTORY\compreg.dat

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

LaunchProgramParameters

		;=== No parameters
		StrCpy $EXECSTRING 

`"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" -profile 

"$PROFILEDIRECTORY"`
		Goto CheckMultipleInstances

	LaunchProgramParameters:
		StrCpy $EXECSTRING 

`"$PROGRAMDIRECTORY\$PROGRAMEXECUTABLE" -profile 

"$PROFILEDIRECTORY" $0`

	CheckMultipleInstances:
		StrCmp $ALLOWMULTIPLEINSTANCES "true" 

"" AdditionalParameters
		System::Call 

'Kernel32::SetEnvironmentVariableA(t, t) i

("MOZ_NO_REMOTE", "1").r0'

	AdditionalParameters:
		StrCmp $ADDITIONALPARAMETERS "" 

PluginsEnvironment

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

$ADDITIONALPARAMETERS`

	PluginsEnvironment:
		;=== Set the plugins directory if we 

have a path
		StrCmp $PLUGINSDIRECTORY "" LaunchNow
		IfFileExists "$PLUGINSDIRECTORY\*.*" 

"" LaunchNow
		System::Call 

'Kernel32::SetEnvironmentVariableA(t, t) i

("MOZ_PLUGIN_PATH", "$PLUGINSDIRECTORY").r0'

	LaunchNow:
		StrCmp $SECONDARYLAUNCH "true" 

StartProgramAndExit
		StrCmp $WAITFORPROGRAM "true" "" 

StartProgramAndExit
		ExecWait $EXECSTRING

	CheckRunning:
		Sleep 2000
		StrCmp $ALLOWMULTIPLEINSTANCES "true" 

CheckIfRemoveLocalFiles
		FindProcDLL::FindProc "Frostwire.exe"  

                
		StrCmp $R0 "1" CheckRunning 

CleanupRunLocally
	
	StartProgramAndExit:
		Exec $EXECSTRING
		Goto TheEnd
	
	CleanupRunLocally:
		StrCmp $RUNLOCALLY "true" "" 

CheckIfRemoveLocalFiles
		RMDir /r "$TEMP\${NAME}\"

	CheckIfRemoveLocalFiles:
		FindProcDLL::FindProc "Frostwire.exe"
		Pop $R0
		StrCmp $R0 "1" TheEnd RemoveLocalFiles

	RemoveLocalFiles:
		StrCmp $CRASHREPORTSDIREXISTS "true" 

RemoveLocalFiles2
		RMDir /r "$APPDATA\Frostwire\"
		
	RemoveLocalFiles2:
		Delete "$APPDATA\Frostwire\"
		RMDir "$APPDATA\Frostwire" ;=== Will 

only delete if empty (no /r switch)
		RMDir "$APPDATA\Frostwire\" ;=== Will 

only delete if empty (no /r switch)
		StrCmp $MOZILLAORGKEYEXISTS "true" 

TheEnd
			${registry::DeleteKey} 

"HKEY_CURRENT_USER\Software\mozilla.org" $R0

	TheEnd:
		${registry::Unload}
		newadvsplash::wait
SectionEnd

["pre" tags added by mod Tim]

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
would anyone be willing to...

would anyone be willing to build a NSIS script for me cause i just dont know what to write in the script that would make it open and save its data from the "data" folder that i copied over from "my account/application data/frostwire" do u write something in the beginning like !define APPDATA "data/frostwire" cause i dont know what im doing im new at this but i though it would be fun to do. here is where i got frostwire http://www.frostwire.com/ just so u know frostwire is open source and it is hosted on sourceforge.net. here is the link to it. http://sourceforge.net/projects/frostwire/

it would be nice if john made this portable.

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

rab040ma
Offline
Last seen: 1 week 4 days ago
Joined: 2007-08-27 13:35
Hi Nathan -- Try this.

Hi Nathan --

Try this.

MC

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
Thanks....

thanks 4 making that. i really appreciate it.

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
WOW...

It runs great and so far i have had no problems with it. It also hasn't left anything on the host cpu and ive tried it on 2 computers. U should try to get John to host this cause it might be usefull to other people. Great job!!

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

rab040ma
Offline
Last seen: 1 week 4 days ago
Joined: 2007-08-27 13:35
Let me know if you want to

Let me know if you want to figure out how I did it or apply the same techniques to another program.

The IRC might be a good place to chat in closer to real time.

MC

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
Actually i was just gonna ask u that..

Did u use other programs to help you with your script?? Also how did u get Frostwire to save its appdata in the data folder, cause i kept having problems with that when i tried to do it. Oh yeah do u have to have this.....
;=== Include
;!include "GetParameters.nsh"
!include "FileFunc.nsh"
; !insertmacro GetRoot
!insertmacro GetParent
!include "ReplaceInFile.nsh"
!include "StrRep.nsh"

!include "MUI.nsh"
!insertmacro GetParent
or did u just use those when u made it??

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

rab040ma
Offline
Last seen: 1 week 4 days ago
Joined: 2007-08-27 13:35
I copied from the

I copied from the FreemindPortable launcher, which was copied (I think) from SumatraPDF launcher. But I did have to work on FreemindPortable some to get the java settings to work the way I wanted.

MC

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
oh i was trying to use firefox's script but that was hard.

Oh yeah i saw in your script that u put under the defaultexe u put "frostwire.jar"
y didnt u put the "frostwire.exe" was there a major difference if u used the exe instead?

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

rab040ma
Offline
Last seen: 1 week 4 days ago
Joined: 2007-08-27 13:35
The frostwire.exe is a

The frostwire.exe is a launcher; it activates the frostwire.jar executable. But I found (when working on Freemind) that a launcher I create (with NSIS) can do the same thing, while redirecting much of the default data storage to be on the removable drive, instead of under %appdata%. Basically I figure out what the "official" launcher is doing, then do the same thing with slightly different settings.

One way to figure it out is to see how the JAR file is launched on Linux. There is usually not an executable (like a windows .exe) but rather a shell script, which is much easier to look at. But with open source apps, the launcher itself is usually available in source code form, if you hunt for it, so you can see how it handles it on Windows.

FrostWire was a bit harder than Freemind. It kept trying to see if %appdata% might be the best place, even when told not to look there by the usual method. So I had to hunt through the .java code to find another way to tell it to stick with Data and not go checking out %appdata%. It turned out that there was a global environment variable named FROSTWIRE_PREFS_DIR that I could set, and put an end to its wandering attentions.

MC

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
Oh that makes sense

yeah now im planning on making dvd shrink portable and i have been looking at that tutorial i posted earlier. im also gonna post how to make super hidden folders in a bit, instead of ppl hiding things by right clicking and choosing hidden.

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

Tim Clark
Tim Clark's picture
Offline
Last seen: 13 years 2 weeks ago
Joined: 2006-06-18 13:55
Now it's Your Turn to Beta

Now it's Your Turn to Beta Test His work Blum

Tim

[edit: Never mind, crossed posts Blum ]
4:51

Things have got to get better, they can't get worse, or can they?

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
OMG

i just made DVD Shrink Portable. haha i feel so happy. I wonder if it is in the Beta selection if not im gonna post it there. Also how do u make it into .paf format and where do i get that splash screen??

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

Tim Clark
Tim Clark's picture
Offline
Last seen: 13 years 2 weeks ago
Joined: 2006-06-18 13:55
Wrong Guy

Boy are you asking the wrong guy Blum
I'm the Mod that's Not a Dev Sad

I would suggest that you do a little more Alpha testing at home before posting it. The fact that it "works" doesn't mean it's ready to go.

Have you checked for left over files or registry changes?
Have you tried it on a clean machine that has never had any version of the app before?
Have you tried it without Admin Privs?

One of the Devs will need to tell you about .paf format and the splash.
I just say not to rush.
It's a pain sometimes when someone posts an app "just about ready to go" and it turns out it needs 10 revisions because they didn't do basic testing themselves.

Good Luck
Tim

Things have got to get better, they can't get worse, or can they?

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
I did the first 2 test and i found nothing but ill test it more

i just need to test it on an No Admin Privs cpu, though it should work cause i think i put in the script 4 it to run without admin privs but ill test 4 a while and ill tell u what happens.

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

rab040ma
Offline
Last seen: 1 week 4 days ago
Joined: 2007-08-27 13:35
Just a comment: I think most

Just a comment: I think most people think of the Intel processor (the Pentium or whatever) when they hear "central processing unit" (CPU), but it seems when you refer to CPU you are talking about the box that holds the motherboard (where the CPU plugs in) and storage and I/O devices and all the rest.

Really, you're not talking about either the physical box nor the CPU chip, but rather the desktop computer -- the way the operating system is configured, what privileges the user has, how programs run. People who hear you refer to "CPU" have to translate from "Pentium chip" to "desktop computer". Smile

MC

spaztastic
spaztastic's picture
Offline
Last seen: 15 years 9 months ago
Joined: 2008-02-28 13:53
Please don't post threads

Please don't post threads where the text is in all caps. Your post will be read and replied to as soon as someone gets a chance. We understand that your issue may be urgent but please refrain from this in the future.

Failure is not an option. It comes bundled with Windows.

Tim Clark
Tim Clark's picture
Offline
Last seen: 13 years 2 weeks ago
Joined: 2006-06-18 13:55
Sean

Sean

The post is almost 27hrs old and has had 24 replies without comment on the caps.
As you did not contribute to the discussion I must ask,
Was this comment really necessary, helpful?
Please Don't Post just to post.

Respectfully,
Tim

Things have got to get better, they can't get worse, or can they?

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
i found a problem

i just found out that dvd shrink saves a setting in the alluser/appdata
man i dont know how to redirect where it saves its settings. quick question, what is !define EXEPARMS it says set some default parameters but parameters for what??

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
(Removed Script till

(Removed Script till complete)

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

Tim Clark
Tim Clark's picture
Offline
Last seen: 13 years 2 weeks ago
Joined: 2006-06-18 13:55
Nathan,

Nathan,

You need to slow down and be careful making replies.
You have just replied to my post to Sean's post about caps.
I am certain this is not what you wanted to do.

Note the tree/root structure of the posts.
Reply to the post that you really are referring to, not just the last one.
If you don't the posts get very messy and no one knows whose talking to whom.

In answer to your question,
Again, I'm the wrong guy to ask these questions.
YOU know more about writing an app or script than I do.
Your question is Greek to me.

Try reposting to an appropriate post higher up from the folks who were helping you earlier, or start a new topic.

Good luck,
Tim
[Dam kids know so much they make me feel stupid Wink ]

Things have got to get better, they can't get worse, or can they?

Patrick Patience
Offline
Last seen: 4 years 4 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Post Just to Post?

Tim,

I completely agree with him, not that it's a huge problem, but if we all went around making every post with capital letters, it would get rather bothersome, so he's only kindly asking him to prevent from doing it in the future as I see it. Capitals normally show someone is impatient, and wants answers fast. Not saying the original poster is impatient, but if he does continue to post in caps, people may assume he is and that is how harsh responses start.

That's like saying your post above is unnecessary as many people do make that mistake, but I myself feel your reply was infact needed.

Just as Respectively,

Patrick. Smile

Tim Clark
Tim Clark's picture
Offline
Last seen: 13 years 2 weeks ago
Joined: 2006-06-18 13:55
True

But a comment like that would have been more appropriate from a mod or at least someone who was trying to answer the question of the post. And certainly earlier on.

It's like someone who posts "Search First" after others have already been giving assistance to the questioner, it's just no longer as appropriate.

Also the Title was so short I barely noticed it was all caps.
It only contained 4 words, one of which NSIS would normally be capitalized anyway. It's not like it was a sentence with 7 words in it.

I just did not think the comment was really needed at that point and in that context.

[Mod Hug Smile ]
Tim

Things have got to get better, they can't get worse, or can they?

Tim Clark
Tim Clark's picture
Offline
Last seen: 13 years 2 weeks ago
Joined: 2006-06-18 13:55
Edit Pass

You edited yout post while I was replying so I now address the edit:

"That's like saying your post above is unnecessary as many people do make that mistake, but I myself feel your reply was infact needed."

He was getting lost in the thread and I was trying to help him sort it out.
God forbid he thought "I" could answer his question. I was in no way being critical, at least I hope I did not come across that way.

Tim

Things have got to get better, they can't get worse, or can they?

Patrick Patience
Offline
Last seen: 4 years 4 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Nope

I agree your comment was deff. needed, I was just making a comparison. Smile

Nathan9222
Nathan9222's picture
Offline
Last seen: 2 years 6 months ago
Developer
Joined: 2007-12-06 22:35
Quick Question on the registry......

When you define your registry in a NSIS Script do u put just where it is generally found or the all the path for example in my program i am making portable its main registry value, (like the beginning value of it) is [HKEY_CURRENT_USER\Software\DVD Shrink], then it leaves others like [HKEY_CURRENT_USER\Software\DVD Shrink\DVD Shrink 3.2\Preferences], so would i just include the main one [HKEY_CURRENT_USER\Software\DVD Shrink]

An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)

rab040ma
Offline
Last seen: 1 week 4 days ago
Joined: 2007-08-27 13:35
It depends on how the

It depends on how the Portable Application Template handles things. Generally if you are using the registry plugin with NSIS, it will handle the whole "tree", that is, the HKCU\Software\SomeProgram plus keys and values (branches and leaves) below it like HKCU\Software\SomeProgram\Preferences. It handles the tree as a unit, making a copy of it all at once, or restoring it all at once.

Since the plugin handles the whole key and its branches as one unit, it might be easier to just let it do that, rather than trying to get it to work with the top level but leave the branches below it alone.

The question is what happens if the regular installed version is started while the Portable version is running. When the installed version reads that registry key, will it get all messed up, or change values the portable version relies on, or what? You can also think about what happens if the power fails before the launcher gets a chance to put things back. I think the Portable App Template takes care of some of that for you, but it's probably still something to test.

MC

Log in or register to post comments