View Full Version : Please help! Problems with Update service!

06-17-2002, 01:09 PM

I'm new at InstallShiled & Update Service. So, I need some advices.

I've created a little utility that check for updates for my application.
I've got the following problem:
My utility is run update every startup even if it was already installed before.

So, I need to run it only for the first time. How can I do it?
I suppose that if my Update package will change the version of the application to greater one it can helps to avoid redundant calling of update. If so, how to implement it?

Could anybody help me?

I would be glad to see any answers.

Thank you in advance.

Best regards,

Chris Woerner
06-17-2002, 01:27 PM
You partially answered your own question. In general, the update that you distribute should increment the version of your product. In doing that, the update will only be run once. The implementation of this depends on which InstallShield authoring tool (Express/ Professional/ Developer) you are using. The Update Service help does have some overview information on how to create update packages using these tools.

The one exception to this rule is if you are just distributing a data file or small update where you really don't want to update the version of your product. For example, Norton does not increment the version of its software just because a new virus file is distributed. In this case, your update will not increment your product version. Here, you will have to use the "conditional message" feature of the Update Service. When you author the update message on the website, you will add a condition to the update. For example, only show this update if the version of file xxx.dll is equal to 'n'. In doing this, your users may see the update the first time. But after your update is applied, the condition will evaluate 'false', and they will no longer see the update message.

06-17-2002, 01:42 PM
Thank you for reply, Chris!

Yes, I saw some examples in the Update service Help. But they doesn't work in my code. Probably I'm not corerectly call functions.

function OnBegin()
OBJECT oObject;
set oObject = GetObject("DWUpdateService.Agent" );
oObject.ProductCode = PRODUCT_GUID;
oObject.ProductVersion = "1.2";
oObject.ScheduleInterval = 30; // this line is optional

I've inserted "DWUpdateService.Agent" instead of "New Update Service 1" and still get an error.

I feel that it's a stupid question but should I put as GetObject parameter?

I'm quite impatient waiting for your reply.

Thank you very much

Best regards,

Chris Woerner
06-17-2002, 02:00 PM
Because you are using that script code, I assume that you are using Professional. Please let me know if I am incorrect. In terms of your error......I am just guessing here, but make sure that the name of the object set in:

set oObject = GetObject("DWUpdateService.Agent" );

exactly matches the name of the object that is displayed in the component view. If they are different, you will get a runtime error.

One question.... you said that the check for updates works on the original product version. It just keeps installing the same update over and over. Is this script code working for the initial installation and not for the update? Also, please provide more details on the error message.

06-19-2002, 01:28 PM
Thanks a lot, Chris!

The problem was resolved because of your advices.

Best regards and wishes,