PDA

View Full Version : InstallScript in MSI



Manuel Wenk
07-26-2005, 09:12 AM
Hi,

is ist possible to use Installscript in an MSI Project?

How can i convert my project from MSI to Installscript?

Thanks,

Manuel

RobertDickau
07-26-2005, 09:14 AM
Yes, you can create InstallScript custom actions in an MSI project.

For a list of automatic conversions, pull down the Project menu and look in the Project Convertors submenu.

Manuel Wenk
07-26-2005, 09:50 AM
Ok,

I've created an setup.rul Installscript in my MSI Project, an added some Methods (OnBegin for Example), in the Method the system should open a messageBox

MessageBox ("OnBegin", INFORMATION);

But when I execute the Installer nothing happens, as if the script would'nt be used. Do I have to activate the script somewhere?

Thanks,

Manuel

RChapel
07-26-2005, 10:51 AM
Hi,

you have to place your custom actions into sequence (Behavior and Logic).
Right click, Insert.

Regards.

Manuel Wenk
07-26-2005, 11:12 AM
But the neither the Methods nor the Script is listed there.

RobertDickau
07-26-2005, 12:10 PM
I think you'll need to create an "entry point" function in InstallScript. The prototype needs to be:

export prototype FunctionName(HWND);

And the signature needs to be:

function FunctionName(hInstall)

where hInstall is the MSI handle you can pass to MSI API functions.

Manuel Wenk
07-27-2005, 05:28 AM
Ok, works fine now, thanks!

Does anyone know how to figure out from where the setup has been launched? SCRDIR only containes the Directory of the decompressed files.

Manuel

Aravind
07-27-2005, 06:44 AM
Hi,

Right click custom action view->select Custom action wizard->Give a name to CA& comment->Next->In Type list box select Run Install script and selct the source.