I am trying to read values from ".ini" file using install script Custom Action which will be installed at the target location. Below Install-script Code line doesn't read any values even the file is there at target location during installation.
Install Script Code :
GetProfString(TARGETDIR + "SampleSetup.ini","Main","AppTitle",szItemName);
Custom Action : Below is the major custom Action detail which was scheduled to be run "After InstallFinalize".
Function Name : AddDesktopShortCut (Custom Install Script Function)
Target : Synchonous(Check Exit Code)
In-Script Execution : Immediate Execution
Execution Scheduling : Always execute
Install UI Sequence :
Install Exec Sequence : After IntallFinalize
Install Exec Condition : Not Installed
Remaining Settings are the default ones.
Any help will be highly appreciated. Thanks for your Time.
If that's all of your code, how can you tell if it read the value?
I would suggest either using the debugger, or sprinkling some MessageBox calls in to see what values your program uses. In particular, ensure the ini file is where your code is looking (
TARGETDIR + "SampleSetup.ini"
should likely beTARGETDIR ^ "SampleSetup.ini"
instead), check the return code fromGetProfString
, and see whatszItemName
is after the call.