PDA

View Full Version : Oleaut32 dll again?



brambram
09-17-2002, 06:40 AM
Hi,

I'm trying to make an installation running on all Windows platform since 95 B. In a custom action I start my program wich is a VB 6.0 SP5 executable after the setup completed succes dialog..

When running the setup I get by example on a win 98 first ed. an error that the oleaut32.dll is out of date. At the same time I get the message from the installer that a reboot is required.

How can I solve this problem in a neat way? When there is no reboot required I like the program to start, because it's doing some more installing and updating.. When a reboot is required the custom action of starting my application must be prevented.

It would be great if someone gives me a usefull answer.

Thanks in advance,

Bram van Empelen
MicroStar B.V.

Chandima
09-17-2002, 03:32 PM
You can get your Custom Action to check the RunOnce key in the registry. If it has a default value that means the system needs a reboot. At least that's what I think. Please test and see if this is correct. The RunOnce key is located at (in Registry):

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

brambram
09-18-2002, 01:47 AM
Hi,

Thanks for your response. The problem is that my custom action is starting a VB 6.0 progam. This program gives the message that the oleaut32.dll is out of date and wouldn't run.

How can I get my custom action check the registry value? And what is the default value. When I look into the registry there's always one key called default (standaard in dutch version) type reg_sz, value is none.

A little more help is greatle appriciated.

Thanks in advance,

Bram van Empelen
MicroStar B.V.

Chandima
09-18-2002, 04:59 PM
To see what get's written to this reg key just create a new setup that installs a file. Add the "Schedule Reboot" Custom Action (in the gallery) to this project, build and install. At the end when you are prompted for a reboot, launch regedit and look at this key. I think the key will contain a command line to run as soon as the machine is rebooted. If you are using VB you can either prototype the WindowsAPI call to read the registry or use the following VBScript code (it uses the Windows Script Host functionality):

Dim WshShell, bKey
Set WshShell = CreateObject("WScript.Shell")
bKey = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\Curr
entVersion\RunOnce")
MsgBox bKey