Old 19th January 2002, 07:24   #1
mc^^^^
Forum King
 
mc^^^^'s Avatar
 
Join Date: Aug 2001
Location: Perth, Australia MSN: mcbriar@ii.net Posts: All your posts are belong to me!!!!
Posts: 2,608
Create users wa3 install dir the installdir

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

mc^^^^ is offline   Reply With Quote
Old 19th January 2002, 07:42   #2
Pomflain
Member
 
Pomflain's Avatar
 
Join Date: Aug 2001
Posts: 83
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...
Pomflain is offline   Reply With Quote
Old 19th January 2002, 08:01   #3
mc^^^^
Forum King
 
mc^^^^'s Avatar
 
Join Date: Aug 2001
Location: Perth, Australia MSN: mcbriar@ii.net Posts: All your posts are belong to me!!!!
Posts: 2,608
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

mc^^^^ is offline   Reply With Quote
Old 19th January 2002, 10:34   #4
Rocker
Hiding in plain sight (mod)
 
Join Date: Jun 2000
Location: Melbourne, Australia
Posts: 9,910
just make your nsis point to $programfiles\winamp3


if its wrong....then the person installing is an idiot
Rocker is offline   Reply With Quote
Old 19th January 2002, 12:09   #5
mc^^^^
Forum King
 
mc^^^^'s Avatar
 
Join Date: Aug 2001
Location: Perth, Australia MSN: mcbriar@ii.net Posts: All your posts are belong to me!!!!
Posts: 2,608
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.

mc^^^^ is offline   Reply With Quote
Old 19th January 2002, 12:33   #6
Lactobacillus
Senior Member
 
Join Date: Dec 2000
Posts: 162
Try
code:
InstallDirRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp3 UninstallString
...
Lactobacillus is offline   Reply With Quote
Old 19th January 2002, 12:46   #7
mc^^^^
Forum King
 
mc^^^^'s Avatar
 
Join Date: Aug 2001
Location: Perth, Australia MSN: mcbriar@ii.net Posts: All your posts are belong to me!!!!
Posts: 2,608
YOUR A BLOODY CHAMPION MATE!

now for the hard part

mc^^^^ is offline   Reply With Quote
Old 19th January 2002, 14:18   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Hi Lactobacillus!

Here is the answer for the hard part:
code:

;-------------------------------------------------
; 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.
kichik is offline   Reply With Quote
Old 24th January 2002, 13:31   #9
Rocker
Hiding in plain sight (mod)
 
Join Date: Jun 2000
Location: Melbourne, Australia
Posts: 9,910
Quote:
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
Rocker is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump