I was modifying the NSI for the launcher for another program, when I noticed this:
ReadEnvStr $APPDATAPATH "APPDATA"
Followed later by
IfFileExists "$APPDATA\Mozilla\Firefox\*.*" CheckForCrashReports
and
IfFileExists "$APPDATA\Mozilla\Firefox\Crash Reports\*.*" "" CheckIfRunning
$APPDATA is undeclared... I think you meant to put $APPDATAPATH.
I forgot to remove the APPDATAPATH declaration and environment string read. They're not necessary. NSIS populates APPDATA by default. So the launcher works bug free, but there's an extra variable that's populated and unused.
Sometimes, the impossible can become possible, if you're awesome!
Ah that was actually my second guess. But the NSIS CHM didn't have anything useful for "APPDATA" or "$APPDATA" when I searched it.
Signature automatically removed for being too awesome.
StrCmp $PROFILEDIRECTORY $LASTPROFILEDIRECTORY "" AdjustChrome
StrCmp $DISABLEINTELLIGENTSTART "true" AdjustChrome
StrCpy $SKIPCHROMEFIX "true"
StrCpy $SKIPCOMPREGFIX "true"
AdjustChrome:
AdjustChrome is always called regardless of whether the directory name has changed since last run or intelligentstart is disabled.
Maybe this is what you want?
StrCmp $PROGRAMDIRECTORY $LASTPROFILEDIRECTORY "" AdjustChrome
StrCmp $DISABLEINTELLIGENTSTART "true" AdjustChrome
StrCpy $SKIPCHROMEFIX "true"
StrCpy $SKIPCOMPREGFIX "true"
Goto RunProgram
Signature automatically removed for being too awesome.
Look two lines of code down. It dumps out of AdjustChrome if $SKIPCHROMEFIX is true, as it should. The label "AdjustChrome" is just a tad misleading.
Sometimes, the impossible can become possible, if you're awesome!
Ah, I got rid of those two SKIP variables in mine, and so my AdjustChrome (which is REALLY misleading since my program has no chrome) was getting called all the time.
I've actually got a suggestion regarding the usage of "Sleep 100" in the registry code of 7-zip Portable... calling regedit.exe directly with ExecWait would be a better way to wait for regedit to finish Saving a key to a file. I'll post my code for that when I've written it.
Signature automatically removed for being too awesome.
It's already done better than that in later launchers (7-Zip Portable is using the registry techniques from a year ago, so it's pretty outdated). It'll be updated now that a new version of 7-Zip has been released. See some of the other launchers like PuTTY for a better example of the current code.
Sometimes, the impossible can become possible, if you're awesome!
Thanks, the putty code does some things better and should work better for my purposes (moving a key rather than exporting and importing 95k would seem to be faster, methinks :)).
Signature automatically removed for being too awesome.
BTW, you're not supposed to have animated Avatars as stated on your account page.