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
- :
- FlexNet Connect
- :
- FlexNet Connect Forum
- :
- VBScripts code for OnUpdateComplete Event
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 26, 2003
04:21 PM
silent install, then restart application
Trying to do silent update. once update is finished patching, start the App.
The problem is that I don't know how to check whether the update is finished. Any ideas?
The problem is that I don't know how to check whether the update is finished. Any ideas?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 26, 2003
05:02 PM
I don't know your customer scenario, so please let me know if I am off base here....
If you want the customer to NOT use your application during update, I would recommend.....
check for update during application startup
if found, launch update and close app
have the update restart the application
in this scenario, I would imagine that you would want to show a UI to the users.
If you want the customer to NOT use your application during update, I would recommend.....
check for update during application startup
if found, launch update and close app
have the update restart the application
in this scenario, I would imagine that you would want to show a UI to the users.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 26, 2003
06:07 PM
That's exactly how I want to do it, but no UI to the users, except a message box telling user to wait for update to finish.
Question: How to get update to restart the application? our updates are packaged as .msp to make the file size small.
oh, by the way, we are using InstallShield Developer 8.02 to package the .msp
Question: How to get update to restart the application? our updates are packaged as .msp to make the file size small.
oh, by the way, we are using InstallShield Developer 8.02 to package the .msp
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2003
01:30 PM
Here is my VBScript code. I modified it from the sample VB Code in the Help. It silently updates the application, but it never catch the OnUpdateComplete event (displays message "update is complete". I even tried put a loop in to wait for update to complete.
Any ideas?
' ------ Start Code ----------------------------------------------
ProductID = "{A2FBD1B5-5C47-4C1A-BC6B-A2AECD75E36D}"
Set pAgent = CreateObject( "DWUpdateService.Agent" )
If (pAgent.IsConnected()) Then
If (pAgent.AutoUpdate(ProductID, True)) Then
' Update is downloading and installing. When the update
' is finished, it raises the UpdateComplete event.
' **I tried put loop here to wait. still doesn't work.
Else
MsgBox "No automatic update is available."
End If
End If
Private Sub pAgent_OnDownloadComplete(ByVal nResultCode)
MsgBox "Update is complete."
' Restart application code
End Sub
'------ End Code ---------------------------------------------
Any ideas?
' ------ Start Code ----------------------------------------------
ProductID = "{A2FBD1B5-5C47-4C1A-BC6B-A2AECD75E36D}"
Set pAgent = CreateObject( "DWUpdateService.Agent" )
If (pAgent.IsConnected()) Then
If (pAgent.AutoUpdate(ProductID, True)) Then
' Update is downloading and installing. When the update
' is finished, it raises the UpdateComplete event.
' **I tried put loop here to wait. still doesn't work.
Else
MsgBox "No automatic update is available."
End If
End If
Private Sub pAgent_OnDownloadComplete(ByVal nResultCode)
MsgBox "Update is complete."
' Restart application code
End Sub
'------ End Code ---------------------------------------------
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2003
02:43 PM
Sidney,
I would suggest a slightly different approach that wouldn't require any loops. Let's say you're creating Version 1 and Version 2 of your application, and you want to generate a patch between the two versions. In Version 2, you can insert a Custom Action that launches VBScript, and insert it after InstallFinalize in the Installation | Execute sequence.
Now when you generate a patch between these two versions, the VBScript Custom Action will be included in the patch. And if it's sequenced as indicated above, it will occur after the installation process has completed... therefore no loop is required.
You'll want to condition this VBScript Custom Action appropriately so it only fires during a patch installation. For example, a condition of PATCH might work.
Hope this helps!
I would suggest a slightly different approach that wouldn't require any loops. Let's say you're creating Version 1 and Version 2 of your application, and you want to generate a patch between the two versions. In Version 2, you can insert a Custom Action that launches VBScript, and insert it after InstallFinalize in the Installation | Execute sequence.
Now when you generate a patch between these two versions, the VBScript Custom Action will be included in the patch. And if it's sequenced as indicated above, it will occur after the installation process has completed... therefore no loop is required.
You'll want to condition this VBScript Custom Action appropriately so it only fires during a patch installation. For example, a condition of PATCH might work.
Hope this helps!
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)