cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sbecerra
Level 2

running an ecternal bactfile

Hello InstallShield users
I am new to this forum and thus my question may be too simple.
I created an installer that calls a batchfile at the end [ OnEnd() ].
The batch file just loads a registry and has one line
“REGEDIT /s myregisty.reg”

The registry should install under HKLM/SOFTWARE/Wow6432Node/myregistry
But it installs under HKLM/SOFTWARE/Wow6432Node/ Wow6432Node /myregistry
If I ran the batch file manually, it works as desired but for some reason running it from the setup just does not create the correct hive structure.

Running the setup as administrator leads to the same incorrect result
Any ideas will be greatly appreciated.
Labels (1)
0 Kudos
(2) Replies
phill_mn
Level 7

The issue is 'registry reflection'. I'm guessing that when you run your batch file outside of your setup it is executing in a 64 bit script engine. But if you are using InstallScript setup project it is running in a 32 bit (WOW64) context. Take a look at REGB_OPTION_WOW64_64KEY. (If you are using an MSI setup take a look at 'Enabling and Disabling Registry Reflection'.)

You might want to consider using CreateRegistrySet (or one of the other REGDB functions) in a Feature handler, (prior to the Finished dialog, rather than in OnEnd). You probably want to minimize making changes to the system in OnEnd, IMO.
0 Kudos
phill_mn
Level 7

Also there are two version of Regedit on a 64 bit system. Since the setup.exe is a 32 bit process you batch file is launching the regedit at:
C:\Windows\syswow64\regedit.exe and it is writing to the 32 bit registry hive.

To write to the 64 bit hive launch C:\Windows\system32\regedit.exe (yes this really is the 64 bit version)

So in your batch file provide the full path to regedit.
0 Kudos