Creation/Editing of INI Files, How to....

Got a problem you cannot solve? Try here.
Superfreak3
Posts: 61
Joined: Tue Feb 06, 2007 9:13 am

Creation/Editing of INI Files, How to....

Postby Superfreak3 » Wed Apr 11, 2007 9:10 am

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!

neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK
Contact:

Postby neillans » Wed Apr 18, 2007 9:06 am

Yes - those are the commands.

1. Have a look at the MSI Code ;)
2. Use them anywhere you like - usually around Apply Install.
Andy Neillans

Superfreak3
Posts: 61
Joined: Tue Feb 06, 2007 9:13 am

Postby Superfreak3 » Wed Apr 18, 2007 9:09 am

I currently write some registry keys and the .ini 'stuff' immediately after the install files actions, is that OK?

neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK
Contact:

Postby neillans » Wed Apr 18, 2007 9:29 am

Move it to just before Apply Install; if its after things will not be saved correctly.
Andy Neillans

Superfreak3
Posts: 61
Joined: Tue Feb 06, 2007 9:13 am

Postby Superfreak3 » Wed Apr 18, 2007 9:44 am

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!

neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK
Contact:

Postby neillans » Wed Apr 18, 2007 9:52 am

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.
Andy Neillans


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 123 guests