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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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.
Answered 05/25/2004 by: cdupuis
Third Degree Green Belt

Please log in to comment
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.
Answered 05/25/2004 by: MSIMaker
Second Degree Black Belt

Please log in to comment
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
Answered 05/26/2004 by: sidfvan
Senior Yellow Belt

Please log in to comment
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.
Answered 05/26/2004 by: sidfvan
Senior Yellow Belt

Please log in to comment
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?
Answered 05/26/2004 by: Aaron
Senior Yellow Belt

Please log in to comment
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
Answered 05/26/2004 by: sidfvan
Senior Yellow Belt

Please log in to comment
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.
Answered 05/26/2004 by: MSIMaker
Second Degree Black Belt

Please log in to comment
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).
Answered 05/26/2004 by: bkelly
Red Belt

Please log in to comment
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.
Answered 05/26/2004 by: cdupuis
Third Degree Green Belt

Please log in to comment
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.
Answered 05/30/2004 by: MSIMaker
Second Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity