To get the source path of the script, use the predefined variable preccessor SourcePath . You can expand this variable in the script as a regular define . If the script has not yet been saved, it returns the path to the My Documents directory. Here is just a useless test example:
[Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}\My Program [Code] procedure InitializeWizard; begin MsgBox(ExpandConstant('{#SourcePath}'), mbInformation, MB_OK); end;
Do not forget that you must compile a script ( CTRL + F9 ) not only start ( F9 ) to call the preprocessor to restore the script.
TLama
source share