/build/static/layout/Breadcrumb_cap_w.png

SELFREG

I have a DLL in my setup that needs to be registered (selfregister). But to be able to selfreg successfully I need a path to somewhere on the network.
I DON'T want to add this path to the environment variabele. I want to set the path before selfreg an remove it after selfreg.
I can do it in dos like
SET PATH=%PATH%;<new networkpath>
and then do
REGSVR32.exe <DLL-name>
NO PROBLEM
BUT when I want the MSI to do this It doesn't work.
I tried in a dos shell to first set the path and then execute the MSI --->Failed
It seems that MSI doesn't look at the PATH at all (not for this shell)

Is it possible to set a path before the MSI executes and force MSI to use this path

Or can I use a custom action ?

0 Comments   [ + ] Show comments

Answers (10)

Posted by: cdupuis 20 years ago
Third Degree Green Belt
0
To do this, you must use a custom action. Edit your MSI and add the dll manually, that way you know where it will be. Then add a customaction that calls regsvr32.exe and have it register your new Dll.
Posted by: MSIMaker 20 years ago
2nd Degree Black Belt
0
So the dll will reside on a network drive?

In that case start a capture and register the dll and then edit the registry entries to point it to the network folder. You can then add the keys to your msi and set the registration to not register because you should have the settings in your msi.
Posted by: sidfvan 20 years ago
Senior Yellow Belt
0
Hi,

Ofcourse I can do that. Capture the registry information at this time.

But I hoped to use the selfreg to do this, so If I have to update that dll (that has to be registered) in my MSI package I don't have to recapture this registry.

The fact is I can do it in DOS simple.

But I can't do it with the Windows Installer
Posted by: sidfvan 20 years ago
Senior Yellow Belt
0
Hi,

Yes I know I can use a custom action to do the regsvr32.

BUT This doesn't work.
The DLL doesn't want to register because the computer needs an environmentpath to another DLL to be able to register it.

I don't want to set a systempath for the Computer. Because after a while the system variabele PATH gets full.

Like in dos

SET PATH =%PATH%;<Path to other DLL>
REGSVR32.EXE <Name DLL>

in dos this works fine

The problem is that I can not tell the Windows Installer to use a extra PATH while executing his service.
Posted by: Aaron 20 years ago
Senior Yellow Belt
0
When you drop to a DOS box and set the path, the path applies ONLY to that session of cmd.exe. Once you close that session, you lose your updated path. When Windows Installer sets the path, it registers it with the system.

Why does the path to the DLL need to be in the PATH environment variable? You can call regsvr32.exe with the path to the dll.

regsvr32.exe "path to dll\name.dll"

Would this not work for you?
Posted by: sidfvan 20 years ago
Senior Yellow Belt
0
hI,

Yes I know about setting path in a dos box

I only want to set this PATH for THIS SESSION ONLY . In this session I want to register a DLL with MSI

For example FileA.DLL This file is in the system32 folder.
I want to register THIS DLL but this DLL needs another DLL on the network
For example N:\SoftwareA\FileB.DLL

Thats why I need a path to N:\SoftwareA before being able to register the FileA.DLL

I don't want to register FileB.DLL
Posted by: MSIMaker 20 years ago
2nd Degree Black Belt
0
You may have to do it in a Wisescript.....because I cant see another way of doing it.

Get the current path as a variable
set a new path
reg the file
reset the path.
Posted by: bkelly 20 years ago
Red Belt
0
I could be missing the mark here, but if you right click on a file in PackageStudio and choose "details" there is a "Self Registration" tab with a few options for automatic registration (you can even specify order).
Posted by: cdupuis 20 years ago
Third Degree Green Belt
0
Why not try the suggeston I gave earlier. Add the DLL to your package manually, then create a custom action in your MSI to call regsrvr32.exe and register the dll, have it happen at the end of the install. This should work no problem.
Posted by: MSIMaker 20 years ago
2nd Degree Black Belt
0
his problem is not the registration.....its the dependency on other files that regsvr32 wont be able to find because they will be on a network share. Thats why he has to add that share to the path of the local machine so that regsvr can process all of the files.

One other way is to try this.

Build a clean machine.
Map the network share as it will be in production.
Change the path on the machine.
Start a capture.
Register the dll
Stop capture.

Now you should have all of the reg settings that will be created and you can just add them to the msi without using a custom action.
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