View Full Version : AutoUpdate

07-09-2003, 03:17 PM
I am evaluating “Update Service” for purchase. I’ve been successful when using the AppUpdate function. I launch, check and update with no problem.

When using the AutoUpdate function I don’t think that my application is calling the function correctly. I need help implementing the AutoUpdate function using C++ in my application. Can someone send a sample code that utilizes this function?

I'm able to determine if there is an update but it is not silent. I get a dialog telling me that there is an update for download.

Chris Woerner
07-14-2003, 08:14 AM
From your post, I gather that AutoUpdate() working for you - but showing UI. I assume that you have seen the second parameter (bSilent). If that is set to true, AutoUpdate() will run silently. Make sure to set the parameter to VARIANT_TRUE as opposed to TRUE.

HRESULT AutoUpdate( BSTR ProductCode, VARIANT_BOOL bSilent = VARIANT_FALSE, long nOptions = 0, long nExtraInfo = 0, VARIANT_BOOL* bUpdateFound );

Please repost if I didn't help you out.

12-15-2003, 08:52 AM
I am also seeing UI when I use AutoUpdate(); this is the C++ code that I have used:

VARIANT_BOOL bUpdateFound;
HRESULT hr = m_pAgent->AutoUpdate(productCode, VARIANT_TRUE, 0, 0, &bUpdateFound);

Note that the call is successful in that FAILED(hr) is FALSE but the Update Service "Available Program Update" dialog is displayed and the user must select "Next>" to proceed.

I have also noticed that bUpdateFound is set to 0xffff when I would expect it to return 1.

Can anyone tell me where I am going wrong?


Chris Woerner
12-15-2003, 03:56 PM
One case where AutoUpdate won't be silent is with Professional OCI installations. In that case, the Update Service is running silently, but you are seeing the Welcome screen from the OCI installation itself.

Could that be the cause of this?


12-16-2003, 04:23 AM

We are using a Professional One-Click Installation, so maybe your suggestion does explain why a download dialog is appearing.

I have attached a ZIP file which contains the download dialogs that appear when when the installation is invoked by Update Service and also via a Website link. You will see that the dialogs differ, does Update Service override the standard download dialog? If the answer is yes, then it looks like you are correct.

Is there anyway around this issue?


12-17-2003, 04:47 PM

Is there any way to tell OCI not to display the Welcom dialog?

12-23-2003, 05:37 PM
In regards to the screen shots posted in this thread:

DownloadInvokedByAutoUpdate.bmp - Is a message displayed by ISUS

DownloadInvokedFromWeb.bmp - Is a message displayed by the web browser when prompting to download or execute a single executable (not an OCI) from the web

In regards to trying to run a One-Click Install (OCI) silently there have been some issues related to this. One workaround that although might not be possibility for some, but works would be to run a dummy setup script that just copies the silent response file to the target machine and exits. The silent OCI can then be run using the -f1 switch to point to the local location of the setup.iss response file that was copied to the target machine. This has worked for some customers. Please let me know if you have any further questions regarding this issue. Thank you.


InstallShield Technical Support

01-05-2004, 10:26 AM
We had found the response file problem for OCI and had figured out the workaround by putting the respones file on the target machine.

This workaround allowed the OCI to run in silent mode - with one exception, that one dialog is still displayed. With all the problem we found with OCI, we have now made the switch to Single File EXE which allowed the install to run silently with no UI. I hope we do not find any problem with Single File EXE option that can not be resolved.