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 ?
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)
Please log in to answer
Posted by:
cdupuis
20 years ago
Posted by:
MSIMaker
20 years ago
Posted by:
sidfvan
20 years ago
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
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
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.
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
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?
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
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
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
Posted by:
bkelly
20 years ago
Posted by:
cdupuis
20 years ago
Posted by:
MSIMaker
20 years ago
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.
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.
so that the conversation will remain readable.