/build/static/layout/Breadcrumb_cap_w.png

Registering DLL, Custom Action, AdminStudio?

Hello,

I performed a search in regards to this situation but was unable to find any pertinent information -- if you have a good link/post, please let me know, I may have overlooked it!

I am trying to finalize a package for Captaris RightFax 9.3 -- only one thing left to do (hopefully). It seems uninstalling the previous version 8.7 is dirty -- not fully unregistering dll's -- with the new version installed, the Outlook plugin points to the old DLL registration.

My question is - is there an effective way to have a script move/copy a DLL and also register it after the installation is complete? I will be deploying via AD GPO (computer side), so the installation will be using the Local SYSTEM account to install.

I was thinking to accomplish this, create a CustomAction and have it at the end of the installation sequence (after InstallFinalize)??

Any ideas/suggestions/comments are welcomed and appreciated!

0 Comments   [ + ] Show comments

Answers (11)

Posted by: KrisBcn 17 years ago
Purple Belt
0
Hi JdotQ,
I think you should sequence this custom action just before InstallFinalize, but instead of being in Immediate Execution, set it to Deferred Mode in System Context.
Think that all custom action that modifies anything installed with the msi must be executed this way, as deferred, to not interfere with the installation, acting after the install.

Take a look of the AdminStudio help, referencing the execution time of the custom actions.
Hope it helps :)

KrisBcn
Posted by: dj_xest 17 years ago
5th Degree Black Belt
0
Hi JdotQ,

I think you should review the attributes of every components in your project if you want to fully unregister files during uninstall.

Per our standards, we set all the shared locations like Common Files, Windows, System32 in to Shared=Yes and Permanent=No and Shared=No and Permanent=No if the files are installing to C:\Program Files\<Your Application> and if you have a registries in HKCU and HKLM. This way, you can be sure that the files will be unregistered during uninstall. Other than that, if you have orphaned registries in HKCR, you need to look for the files that owned them and set the proper attributes.

Check out these thing if they are appropriate in your standards and let us know if you still have problems.. [;)]
Posted by: JdotQ 17 years ago
Senior Purple Belt
0
KrisBcn & dj_xest,

Thank you for the reply. Here's what my CustomAction looks like (from InstallShield 11.5);


RegSrv_Install (CustomAction)
VBScript Filename:
Return Processing: Synchronous (Check exit code)
In-Script Execution: Deferred Execution in System Context
Execution Scheduling: Always execute
Use 64Bit Scripting: No
Install UI Sequence: <Absent from sequence>
Install UI Condition:
Install Exec Sequence: <Absent from sequence>
Install Exec Condition:
Advertise Exec Sequence: <Absent from sequence>
Advertise Exec Condition:
Admin UI Sequence: <Absent from sequence>
Admin UI Condition:
Admin Exec Sequence: After ScheduleReboot
Admin Exec Condition:
MSI Type Number 3110

*Note; in the Admin Exec Sequence, following the "ScheduleReboot" is "InstallFinalize"

And this is the VBscript which is stored directly in the custom action;

Set oShell = CreateObject("Wscript.Shell")
oShell.Run "RegSvr32 /s " & chr(34) & "C:\Program Files\RightFax\Shared Files\RFxMSx32.dll" & chr(34)


Do I need to have it selected in the sequence for Install UI? Is it ok to only have it in the Admin Exec Sequence?
Posted by: monster 17 years ago
Senior Yellow Belt
0
Hi JdotQ,

It will depend on how your going to initiate the installation...

Custom Actions sequenced in UI are only triggerred during full GUI installation... it will not run in a silent mode installation..
while running it in execute sequence will work in either Full GUI or silent mode..


Hope this helps..
Posted by: JdotQ 17 years ago
Senior Purple Belt
0
monster,

Thank you for the reply. Your information helps (as I'm still a CustomAction newbie).

So, in this case, I would want this CustomAction to run during every install, regardless of full GUI or limited GUI. So, I would want to put it in all Exec sequences - Install Exec Sequence, Advertise Exec Sequence, Admin Exec Sequence?

If that is the case, the "Install Exec Sequence" does not contain an entry for ScheduleReboot or InstallFinalize - so I'm not sure where to place it in the sequence?

Both "Advertise Exec Sequence" and "Admin Exec Sequence" have the entries for ScheduleReboot and InstallFinalize - so I would just place it in between those two in the order?



Thanks for everyone's help...hopefully someday (sooner than later) I'll get all this CustomAction stuff figured out :)
Posted by: JdotQ 17 years ago
Senior Purple Belt
0
Just wanted to update everyone...

First, I added an extra line in the VBscript so I could verify it was actually running (since it was only registering a file in silent mode, there was no way to confirm that the CustomAction was actually running).

This just creates a temporary txt file in the install directory;

set oFile = fso.CreateTextFile("C:\Program Files\RightFax\Shared Files\!RFxMSx32_Registered.txt")


So I was playing around with the combinations of the In-Script Execution and the Admin Exec Sequence - and nothing seemed to work during the install.

I came across this information in InstallShield;
------------------------------
Installation Sequence - The sequence that executes when the setup runs in the default installation mode, such as when the user double-clicks the new .msi file or Setup.exe

Advertisement Sequence - The sequence that executes when the user launches the setup with the /j command-line options.

Adminstration Sequence - The sequence that executes when the user launches the setup with the /a command-line option
------------------------------

So, by putting the CustomAction sequence in the "Admin Exec Sequence" only, it was only going to process if I executed an administrative install (which was not what I was doing)

So I moved the CustomAction to the sequence for "Install Exec Sequence" - "After ScheduleReboot"

And this worked!!! I checked before the reboot process, and the temporary txt file was written to the directory, so the script ran successfully!!! [:D]

Thanks everyone for the pointers and help! [:D][:D][:D]
Posted by: JdotQ 17 years ago
Senior Purple Belt
0
I just wanted to bump this thread because I created another CustomAction which will execute during the uninstall (removes the copied file, and temp file)

Where should I place this in the sequence?? Should it go in the "Install Exec Sequence" ??
Posted by: nheim 17 years ago
10th Degree Black Belt
0
Hi JdotQ,
Will your previous version being uninstalled by the default way with an entry in the Ugrade table?
If this is is the case, please have a look in the InstallExecuteSequence table and check the row 'RemoveExistingProducts'.
It should be placed right before InstallInitalize to make sure, the old app is being uinstalled, before the MSIScript is executed,
which actually does install.
If you are removing the old stuff through your new MSI, make sure that this CA is being called DEFERRED right AFTER InstallInitalize.

Are you sure, it's just a unregistering thing? Fax-Applications often use some kind of Printer-Driver. To uninstall such drivers, it's a good
choice, to restart the spooler to make sure, everything is unloaded, from the memory. It could even be necessary to stop the spooler,
uninstall the Fax-App and restart the spooler afterwards.

Hope this gives you some ideas.
Regards, Nick
Posted by: JdotQ 17 years ago
Senior Purple Belt
0
nheim,

Thank you for the reply. I'm not sure if I was clear in my last post. The CA I created earlier in the thread (which moves a DLL, registers it, creates a temporary file) executes during the v9.3 install. I've just created a CA which will delete the same DLL and delete the same temporary file previously created whenever the v9.3 goes through an uninstall process (where should I put this in the CA sequence???)

I was thinking of doing this as when I've tested uninstalling this 9.3 version, the only things it leaves behind are the files which I've created with the CA during the install.

Is there a way to have another CA delete the files during an uninstall of the 9.3 version? I have a VBScript which works, and was interested in incorporating it into the uninstall process (maybe the last action available for the uninstall?)
Posted by: monster 17 years ago
Senior Yellow Belt
0
hi JdotQ,

Have you tried using the removefile table??

You can delete files via this table either during installation or uninstallation..


Regards...
Posted by: nheim 17 years ago
10th Degree Black Belt
0
Hi JdotQ,
yes, actually this is the suggested way of doing things with CA's. One for installation/maintenance and one for uninstall.
Use conditions like 'NOT Installed' and 'REMOVE' to get the behavior you need.
Sequence it so, that all the dependencies are solved.
Regards, Nick
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ