Page 1 of 1
Creation/Editing of INI Files, How to....
Posted: Wed Apr 11, 2007 9:10 am
by Superfreak3
In our current authoring tool, there is an INI Files node where the location, sections, values, etc. can be set. This will create files if not there and update any existing file with changed/new values.
How is this accomplished in InstallAware? Is this the Edit INI File and Get INI File Settings commands? Where are these used in the MSI Code? If so, how should they be sequenced? I asked that question without actually examining the MSI Code yet as I haven't gotten that far.
Any information appreciated.
Thanks!
Posted: Wed Apr 18, 2007 9:06 am
by neillans
Yes - those are the commands.
1. Have a look at the MSI Code
2. Use them anywhere you like - usually around Apply Install.
Posted: Wed Apr 18, 2007 9:09 am
by Superfreak3
I currently write some registry keys and the .ini 'stuff' immediately after the install files actions, is that OK?
Posted: Wed Apr 18, 2007 9:29 am
by neillans
Move it to just before Apply Install; if its after things will not be saved correctly.
Posted: Wed Apr 18, 2007 9:44 am
by Superfreak3
Here's the chunk of code I have now.....
Write Registry Key HKCU\\Software\\MyCompany\\MyApp7.0\\ServerInstallPath, $INSTALLDIR2$
Write Registry Key HKLM\\Software\\MyCompany\\MyApp\\Configuration\\AuthCode, $APP_AUTHORIZATION_CODE$
Write Registry Key HKLM\\Software\\MyCompany\\MyApp\\Configuration\\Seats, $APP_NUMBER_OF_SEATS$
Write Registry Key HKLM\\Software\\MyCompany\\MyApp\\Configuration\\SN, $APP_SERIAL_NUMBER$
Edit INI File $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\\\MyAppUpdate.ini, [MyApp Update] Enabled=0
Edit INI File $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\\\MyAppUpdate.ini, [MyApp Update] Version=$VERSION$
Edit INI File $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\\\MyAppUpdate.ini, [MyApp Update] UpdateMSI=MyAppClientInstaller.msi
Edit INI File $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\\\MyAppUpdate.ini, [MyApp Update] Readme=Readme.rtf
Get System Setting Logged on Computer Name into ComputerName
Edit INI File $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\\\MyAppUpdate.ini, [MyApp Update] MyAppUpdateFolder=\\\\$ComputerName$\\MyAppUpdate
Edit INI File $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\\\MyAppUpdate.ini, [Serial] SN=$APP_SERIAL_NUMBER$
Set Variable AvwinVersion to 7.0.4
Set Variable AvwinProVersion to 7.0.4
Edit INI File $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\\\MyAppUpdate.ini, [Viewer] Avwin=$AvwinVersion$
Edit INI File $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\\\MyAppUpdate.ini, [Viewer] AvwinPro=$AvwinProVersion$
Should I just move this entire chunk to the ----> location indicated below? Also, will the assigning of variables be OK in this new location? ...
[compiler else]
if Variable ADVERTISE Equals TRUE
Apply Advertised (get result into variable SUCCESS)
else
Create Folder $PROGRAMFILES$\\MyCompany
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Client
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Server
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Utilities
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\DirectX
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\dotNetFx
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\SolidWorksDocMgr
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Client\\Install\\WinInstaller
Create Folder $PROGRAMFILES$\\MyCompany\\MyApp70\\Utilities\\InternalData
Create File Type OTSMigration.Document with extensions .ATD,.APD and associate with program $PROGRAMFILES$\\MyCompany\\MyApp70\\Utilities\\OTSMigration.exe
---->
Apply Install (get result into variable SUCCESS)
if Variable SUCCESS not Equals ERROR
if Variable SUCCESS not Equals CANCEL
end
end
end
THANKS FOR THE HELP!
Posted: Wed Apr 18, 2007 9:52 am
by neillans
Yes - that should be fine.
In summary:
Any saving your are doing, to INI or Registry, MUST be before Apply Install.
Loading should be early on in the script, just after friendly defaults.