I want to change defaultdirname parameter in ssInstall part. How can I do that? Is there a function for setting [Setup] parameters.
标签:
inno-setup
相关问题
- Inno Setup - Run InstallUtil from .Net 4.5 Locatio
- ISCC - /D compiler-parameter seems to have no effe
- Setting DestDir from Inno Pascal?
- Unpin app from taskbar, startmenu using Inno Setup
- How to restrict user input of the directory edit b
相关文章
- In inno setup how to set the unins000.exe with pro
- Is it possible to create checkbox tree view in Inn
- How to add a region drop-down in Inno Setup?
- Signing installer of my program generated by Inno
- How to check 64/32-bit in Inno setup
- Inno Setup - How to create checkboxes at finished
- Inno Setup - BorderIcons dropdown menu
- Inno Setup - How to display a message after instal
The following global objects are available : MainForm of type TMainForm, WizardForm of type TWizardForm and UninstallProgressForm of type TUninstallProgressForm and one special constant: crHand of type TControl.Cursor.
If you want to set the default directory in the wizard, just access to it's componants like you would in normal delphi code.
For example, set the directory to a custom value:
to read that value you can use the WizardDirValue function.
I say 'just access'... but it took me an hour to figure out ;)
I have a similar situation, where the setup app is receiving the install path from the command line. I'm using the solution proposed by Jonx:
Example:
The setup app is being started from another setup, in silent mode. It worked OK for me.
There seems to be no way to change a script constant via scripting.
I think your best bet is to modify the target directory for each entry in the [Files] section, e.g.
and derive your new installation directory like this:
Since the NewTargetDir function will be called just before the file is actually copied, this should work.
However, I think you should reconsider your approach. First asking the user to specify a directory to installinto, and then actually installing into a different directory, which seems to be your intent, is the wrong way, IMO. Do you really have a compelling reason to install into another directory than the one specified by the user? Besides, the result of my example code could just as well be achieved by specifying
without any scripting needed. When in doubt, go for the simpler solution.