Is the %TempFolder% variable represent the temporary folder on the system the install runs on, as the hep sems to indicate, or the folder the setup is running from?
I have used a PostInstall action to create an entry in an INI file to set a working directory for a program. However, when I check the entry it refers to a folder which does not exists. This is the action I use:
KevinCode:-- CPS.INI result = File.DoesExist(SessionVar.Expand("%ApplicationDataFolderCommon%\\%CompanyName%\\%ProductName%\\config\\cps.ini")); if result then -- WorkDir CurVal = INIFile.GetValue(SessionVar.Expand("%ApplicationDataFolderCommon%\\%CompanyName%\\%ProductName%\\config\\\\cps.ini"), "CPS", "ScanFolder"); if CurVal == "" then INIFile.SetValue(SessionVar.Expand("%ApplicationDataFolderCommon%\\%CompanyName%\\%ProductName%\\config\\\\cps.ini"), "CPS", "WorkDir", SessionVar.Expand("%TempFolder%")); end -- ScanFolder CurVal = INIFile.GetValue(SessionVar.Expand("%ApplicationDataFolderCommon%\\%CompanyName%\\%ProductName%\\config\\\\cps.ini"), "CPS", "ScanFolder"); if CurVal == "" then INIFile.SetValue(SessionVar.Expand("%ApplicationDataFolderCommon%\\%CompanyName%\\%ProductName%\\config\\\\cps.ini"), "CPS", "ScanFolder", SessionVar.Expand("%SystemDrive%")); end end

Reply With Quote
