Tassc

Register Application Tools

Our install includes several EXEs which are called from our main controlling app.

These exes need to be registered using a "Regsvr32 toolname.exe /s" command.

Can I use 7 custom actions to register our tools in this fashion, if so, how?

Thanks.
Tassc

I should add - I found that I can add the "regsvr32 toolname.exe /s" commands into the registry RunOnce folder, but that then forces a reboot to run the command.

Can I achieve the same affect without forcing a reboot?
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Two possible solutions:

1. Create an EXE atached custom action that receives in command line the path to the folder where the files are installed and call Regsvr32 for each file. This is very powerfull in case registration fails or something else goes wrong.

2.
a) Create a custom action of type "Property Set with Formatted" -scheduled after InstallInitialize standard action, that has:

PropertyName: REGSVRPROP

FormattedText: [SystemFolder]regsvr32.exe - I suppose Regsvr32.exe is in SystemFolder on all systems.

b) Create a custom action -of type "EXE With path given by a Property"- for EVERY file you need to register with Regsvr32.exe . This custiom actions has:

PropertyName: REGSVRPROP - the one set above

SourceType: Executable

CommandLine: /i "[#fileKey]" /s - actually the command line you pass to RegSvr32.exe. The part "[#fileKey]" expand to the full path to the file with filekey - use the edit button to edit this commnad line and insert a reference to the desired file.

This custom actions should be scheduled in the commit section.

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”