This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- List of already installed files
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2008
02:52 AM
List of already installed files
Hi!
How I can get installed files list for some bean by beanId which was installed on previous installation? May be who is did it? I know that this information is contain in uninstaller.dat but I don't know how can get access to this archive via ISMP API.
How I can get installed files list for some bean by beanId which was installed on previous installation? May be who is did it? I know that this information is contain in uninstaller.dat but I don't know how can get access to this archive via ISMP API.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2008
10:04 PM
I tried to use "Uninstall Product Action" for this but it doesn't work of me:( May be someone used it and can help me how to use right this action?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2008
10:55 AM
I have a function that I run to check if a feature is installed. BTW - I'm not very efficient with java - I believe I got the code from Customer Support!!
I added a Custom Action in the Sequence and loop through the features I want to check if installed:
boolean INSTALLED = false;
INSTALLED = IsInstalled(arg0, beanID);
if ( INSTALLED ){
blah
blah
}
[CODE]
import com.installshield.wizard.service.system.*;
import com.installshield.product.service.registry.*;
public boolean IsInstalled(com.installshield.event.wizard.WizardActionContext arg0, String Bean)
{
boolean INSTALLED = false;
try{
WizardServices ws = arg0.getWizard().getServices();
RegistryService regService = (RegistryService)arg0.getService(RegistryService.NAME);
String FeatureUID = ws.resolveString("$P(" + Bean +".key.UID)");
SoftwareObject[] softObj = regService.getSoftwareObjects(FeatureUID);
int FeatureLength = softObj.length;
if (FeatureLength > 0 ){ // Feature is installed!
// The feature is installed - is the install location different?
String installLocation = arg0.getServices().getISDatabase().getVariableValue("IS_DESTINATION");
for(int i = 0; i < softObj.length; i++){
if (installLocation.equalsIgnoreCase(softObj.getInstallLocation())){
INSTALLED = true;
i = softObj.length;
} else { // already installed but in a different directory
INSTALLED = false;
}
}
}
return INSTALLED;
} catch (ServiceException se) {
arg0.logEvent(this,Log.ERROR, se.getMessage());
return INSTALLED;
}
}
[/CODE]
Hope this helps!
Regards,
Tom
I added a Custom Action in the Sequence and loop through the features I want to check if installed:
boolean INSTALLED = false;
INSTALLED = IsInstalled(arg0, beanID);
if ( INSTALLED ){
blah
blah
}
[CODE]
import com.installshield.wizard.service.system.*;
import com.installshield.product.service.registry.*;
public boolean IsInstalled(com.installshield.event.wizard.WizardActionContext arg0, String Bean)
{
boolean INSTALLED = false;
try{
WizardServices ws = arg0.getWizard().getServices();
RegistryService regService = (RegistryService)arg0.getService(RegistryService.NAME);
String FeatureUID = ws.resolveString("$P(" + Bean +".key.UID)");
SoftwareObject[] softObj = regService.getSoftwareObjects(FeatureUID);
int FeatureLength = softObj.length;
if (FeatureLength > 0 ){ // Feature is installed!
// The feature is installed - is the install location different?
String installLocation = arg0.getServices().getISDatabase().getVariableValue("IS_DESTINATION");
for(int i = 0; i < softObj.length; i++){
if (installLocation.equalsIgnoreCase(softObj.getInstallLocation())){
INSTALLED = true;
i = softObj.length;
} else { // already installed but in a different directory
INSTALLED = false;
}
}
}
return INSTALLED;
} catch (ServiceException se) {
arg0.logEvent(this,Log.ERROR, se.getMessage());
return INSTALLED;
}
}
[/CODE]
Hope this helps!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 18, 2008
01:05 AM
Thanks enanrum for your help!
We found how to use right "Uninstall Product Action" and using this way. "Uninstall Product Action" works with "Files" action only. Now all works fine.
More thanks!
We found how to use right "Uninstall Product Action" and using this way. "Uninstall Product Action" works with "Files" action only. Now all works fine.
More thanks!