Archive: Create users wa3 install dir the installdir


Create users wa3 install dir the installdir
how do i make the users wa3 install directory be the instdir of the installer?


Isn't that probably just stored somewhere in the registry, so you can read the path out with a ReadRegStr command and then set it. You might have to use the .onInit callback to read it before the portion of the installer runs where you normally set the default install directory. Don't know if that helps, may be way off here...rather tired...:(


it is in the registry, kinda, in the windows uninstall bit you know. for me it has "d:/winamp3/uninst-wa3.exe". I'm not sure if you can get just the directory though. i think you can cause when it says it for me using that key it says "d:/winamp3/" which is good, but i cant get it to be the installdir. im not great at nsis so might need a little guidence;)


just make your nsis point to $programfiles\winamp3


if its wrong....then the person installing is an idiot:D


You callin me an idiot! mine is in D:\winamp3 cause i have 3 partitions, 1 for xp 1 for 98 and one for programs.


Try

InstallDirRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp3 UninstallString
...

YOUR A BLOODY CHAMPION MATE!

now for the hard part:(


Hi Lactobacillus!

Here is the answer for the hard part:


;-------------------------------------------------
; GetParent
; input, top of stack (i.e. C:\Program Files\Poop)
; output, top of stack (replaces, with i.e. C:\Program Files)
; modifies no other variables.
;
; Usage:
; Push "C:\Program Files\Directory\Whatever"
; Call GetParent
; Pop $0
; ; at this point $0 will equal "C:\Program Files\Directory"

Function GetParent
Exch $0 ; old $0 is on top of stack
Push $1
Push $2
StrCpy $1 -1
loop:
StrCpy $2 $0 1 $1
StrCmp $2 "" exit
StrCmp $2 "\" exit
IntOp $1 $1 - 1
Goto loop
exit:
StrCpy $0 $0 $1
Pop $2
Pop $1
Exch $0 ; put $0 on top of stack, restore $0 to original value
FunctionEnd


This was taken from functions.html from your NSIS dir.

Originally posted by : : : Chromium : : :
You callin me an idiot! mine is in D:\winamp3 cause i have 3 partitions, 1 for xp 1 for 98 and one for programs.
why did you type that here and on icq???

lol

yeah your an idiot:p:D