This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: During install run regedit to register a .reg file
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 20, 2012
08:08 AM
During install run regedit to register a .reg file
During the install the admin has an option to supply a property on the command line that contains the full path and file name of a .reg file that needs to be registered during the install process.
The custom action that is then called if this property exists is:
"[WindowsFolder]regedit.exe" /s "[REGFILE_PROPERTY]"
This seems to work in most cases, but it seems to not work if the path that is supplied is a UNC path.
The log does not indicate and issue, but if you copy the exact command line out of the log, which shows the correct UNC path\file name, and trigger it from a command prompt the file is correctly registered.
Why does this not work when triggered from an install custom action? Is there anything that I can do to get this working?
Thanks,
The custom action that is then called if this property exists is:
"[WindowsFolder]regedit.exe" /s "[REGFILE_PROPERTY]"
This seems to work in most cases, but it seems to not work if the path that is supplied is a UNC path.
The log does not indicate and issue, but if you copy the exact command line out of the log, which shows the correct UNC path\file name, and trigger it from a command prompt the file is correctly registered.
Why does this not work when triggered from an install custom action? Is there anything that I can do to get this working?
Thanks,
(5) Replies
‎Jan 20, 2012
04:11 PM
It could depend whether the action that launches regedit (ignoring usual cautions of custom action changes not being removed at uninstall or rollback) is scheduled for deferred execution in system context. As mentioned in this InstallTalk blog post, for example, the Windows Installer service might not have rights to access the local network, which could cause an action referring to a UNC path to fail.
‎Jan 20, 2012
04:39 PM
I had the custom action set as Deferred in System Context and so I changed it to Deferred Execution and it seemed to fix the issue with UNC paths.
Now that is with an administrative command line run of the install. So does this mean that if the install is pushed out with GPO and it is pushed out to systems that has no one logged in that it would then fail in these cases?
Now that is with an administrative command line run of the install. So does this mean that if the install is pushed out with GPO and it is pushed out to systems that has no one logged in that it would then fail in these cases?
‎Jan 21, 2012
12:31 PM
I would rather distribute a transform including registry components.
‎Jan 23, 2012
07:18 AM
How do you distribute this as a transform that includes a registry componet? The .reg file is a file that is only supplied by the Administrator and is only generated on their machine with specific hardware.
We have a hardware component that when plugged into the users machine will generate some registry keys. The Admin would then export these keys to a .reg file that is then pushed with our software across the network.
So if there is a way to have this captured into a transform then sure I would do it that way...
We have a hardware component that when plugged into the users machine will generate some registry keys. The Admin would then export these keys to a .reg file that is then pushed with our software across the network.
So if there is a way to have this captured into a transform then sure I would do it that way...
‎Jan 23, 2012
07:12 PM
Some vendors ( Symantec for instance ) have been known to distribute deployment kits that have a wizard UI for collecting information and then generating the transform on site.
I've done this with C# using the Microsoft.Deployment.WindowsInstaller namespace to update the tables and generate the transform.
I've done this with C# using the Microsoft.Deployment.WindowsInstaller namespace to update the tables and generate the transform.