Hi,
i have the following Problem:
- The User has to chose a Port number for services, which should be installed via InstallAware. This PortNumber needs to be in the Name.
- If i want to uninstall the Installation, i need to know the name of these Services (including PortNumber) to uninstall them too.
My Company wants me to install the Services by our own tool, which is started via shell command.
Is there a way to, to save the Value of the Textfield where the user can type in his Port-Number, and save this value until the uninstall is called, so that the value can be used to uninstall this service?
Or do you know another possibility?
Save Value from Installation for Usage on Uninstallation
Hi,
I have a similar requirement in my installs - this is what I did (using IA9)
(I'm not at the machine with InstallAware on it so I can't post the actual IA9 / MSICode)
1 - Define Global Persistent Variable PORTNO set to blank string
2 - Define Global Variable SETTINGSFILE set to $COMMONFILES$\\$COMPANY$\\$TITLE$.txt
3 - After asking the user the Port Number set PORTNO variable to be the value entered by the user (remember to keep persistent option checked)
4 - In install section after the Apply Install is called do following - Does File Exist $SETTINGSFILE$. If True then call DLL Function kernal32.dll -> DeleteFileA (pass in SETTINGSFILE as paramter) - this deletes the existing file. Call Save Feature Selections using $SETTINGSFILE$ - this saves the PortNumber to the text file
5 - In Maintenance label, before showing the maintenance dialog do Does File Exist $SETTINGSFILE$, if TRUE call Load Feature Selections from $SETTINGSFILE$ - this will reload the PORTNO value
6 - In un-install section before call to Apply Uninstall delete the $SETTINGSFILE$ if it exists (use Call DLL Function kernel32.dll -> DeleteFileA)
Hopefully that makes sense - I'm still doing our evaluation so there may be an easier way to do this - I'll sit back now and wait for an IA techy to come along and do the same in a single step
Paul
I have a similar requirement in my installs - this is what I did (using IA9)
(I'm not at the machine with InstallAware on it so I can't post the actual IA9 / MSICode)
1 - Define Global Persistent Variable PORTNO set to blank string
2 - Define Global Variable SETTINGSFILE set to $COMMONFILES$\\$COMPANY$\\$TITLE$.txt
3 - After asking the user the Port Number set PORTNO variable to be the value entered by the user (remember to keep persistent option checked)
4 - In install section after the Apply Install is called do following - Does File Exist $SETTINGSFILE$. If True then call DLL Function kernal32.dll -> DeleteFileA (pass in SETTINGSFILE as paramter) - this deletes the existing file. Call Save Feature Selections using $SETTINGSFILE$ - this saves the PortNumber to the text file
5 - In Maintenance label, before showing the maintenance dialog do Does File Exist $SETTINGSFILE$, if TRUE call Load Feature Selections from $SETTINGSFILE$ - this will reload the PORTNO value
6 - In un-install section before call to Apply Uninstall delete the $SETTINGSFILE$ if it exists (use Call DLL Function kernel32.dll -> DeleteFileA)
Hopefully that makes sense - I'm still doing our evaluation so there may be an easier way to do this - I'll sit back now and wait for an IA techy to come along and do the same in a single step
Paul

