|
|
|
|
#1 |
|
Junior Member
Join Date: Dec 2008
Posts: 7
|
in .OnInit StrCpy $INSTDIR "c:\MYDIR" has no effect?
Greetings,
Here's my complete .OnInit code: When I run the installer it still prompts me to install into: c:\Program Files (x86)\myProduct It seems like StrCpy $INSTDIR in the .OnInit is having no effect. Any sugguestions on how to make this work? |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
For that you have specified InstallDir in your script, to replace the defualt one, using InstallDir $INSTDIR.
Contact me: 137729898@qq.com |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2008
Posts: 7
|
InstallDir is $INSTDIR no change
Thanks for the suggestion.
It wasn't in my file. I changed it, an still no change. When it gets to the "Chose Install Location" page, it still defaulting to c:\Program Files (x86)\Blah I created a dummy installer with .onInit setting $INSTDIR and InstallDir $INSTDIR see below. It also doesn't obey my StrCpy $INSTDIR "C:\BLAH".. Can someone else try the below, you'll need a README.txt in your work dir.. I'm hoping it's something really simple that I"m missing. _Bill code: |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
I think "InstallDir $INSTDIR" is kind of pointless. the idea is to set the value of $instdir...
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2008
Posts: 7
|
is it $INSTDIR or $instdir
Either way.. The sample script doesn't alter the default install dir.
Doe anyone have a sample script which does? |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Try commenting out the two !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_* lines.
Stu |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Dec 2008
Posts: 7
|
Got it..
This works
code: This doesn't work code: It looks like "!insermacro MULTIUSER_INIT" must overwrite $INSTDIR |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Dec 2008
Posts: 7
|
Also found you need to not define
MULTIUSER_INSTALLMODE_INSTDIR Or it will prefix $INSTDIR as follows !ifdef MULTIUSER_INSTALLMODE_INSTDIR StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}" !endif |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|