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
- :
- How to use ISWiAutoUpgradeEntries method
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
Sep 17, 2014
12:53 AM
How to use ISWiAutoUpgradeEntries method
am using InstallShield Automation Interface to automate my packaging process. I am tryng to use ISWiAutoUpgradeEntries method of ISWiProject object from VBscript to get the details of specific auto upgrade item entry from upgrade items list. I used the code given in install shield automation interface help library but it fails to find the upgrade item and return the "Automation Error: Element not found" error message.
Sample VBScript code:
Set m_ISWiProj = CreateObject("IswiAuto19.ISWiProject")
m_ISWiProj.OpenProject("C:\Installer\MyApp.ism")
Set m_AutomaticUpgradeEntries = m_ISWiProj.ISWiAutoUpgradeEntries("SearchItem")
Error message on execution:
Can anyone explain me how to solve this or what is wrong here?
Sample VBScript code:
Set m_ISWiProj = CreateObject("IswiAuto19.ISWiProject")
m_ISWiProj.OpenProject("C:\Installer\MyApp.ism")
Set m_AutomaticUpgradeEntries = m_ISWiProj.ISWiAutoUpgradeEntries("SearchItem")
Error message on execution:
c:\Installer\test.vbs(17, 1) ISWiAuto19: Automation error
Element not found.
> ISWiAutomation.IswiAutomaticUpgradeEntries.Initialize
> ISWiAutomation.IswiProject.IswiAutoUpgradeEntries
Element not found.
> ISWiAutomation.IswiAutomaticUpgradeEntries.Initialize
> ISWiAutomation.IswiProject.IswiAutoUpgradeEntries
Can anyone explain me how to solve this or what is wrong here?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 14, 2014
02:24 PM
I think that is because the "SearchItem" upgrade item doesn't exist in the ISUpgradeMsiItem table. You may want to iterate through the ISWiAutoUpgradeEntries collection to find an item that you are looking for.
Set m_ISWiProj = CreateObject("IswiAuto19.ISWiProject")
m_ISWiProj.OpenProject("C:\Installer\MyApp.ism")
For Each pISWiAutoUpgradeEntry In m_ISWiProj.ISWiAutoUpgradeEntries
If pISWiAutoUpgradeEntry.Name = "SearchItem" Then
' Do some work
EndIf
Next