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
- :
- Installing 64-bit components - calling BAT shows strange behavior
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 06, 2011
02:45 PM
Installing 64-bit components - calling BAT shows strange behavior
Hi I am trying to install Oracle ODP.NET drivers during my Installscript installation, on Windows Server 2008 R2. The oracle drivers come in the form of a series of BAT files, a bunch of subdirectories and helper executables (xcopy install).
One of the Oracle provided batch files that gets called does something like this to create some registry entries:
[CODE]REM setup registry entries for ODP.NET 4
echo Windows Registry Editor Version 5.00 > "%BAT_DIR%"\odp.net.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\ODP.NET] >> "%BAT_DIR%"\odp.net.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\ODP.NET\4.112.2.0] >> "%BAT_DIR%"\odp.net.reg
echo "DllPath"="%REG_DIR%bin" >> "%BAT_DIR%"\odp.net.reg
echo "PromotableTransaction"="promotable" >> "%BAT_DIR%"\odp.net.reg
echo "StatementCacheWithUdts"="1" >> "%BAT_DIR%"\odp.net.reg
echo "TraceFileName"="c:\\odpnet4.trc" >> "%BAT_DIR%"\odp.net.reg
echo "TraceLevel"="0" >> "%BAT_DIR%"\odp.net.reg
echo "TraceOption"="0" >> "%BAT_DIR%"\odp.net.reg
echo "PerformanceCounters"="0" >> "%BAT_DIR%"\odp.net.reg
echo "UdtCacheSize"="4096" >> "%BAT_DIR%"\odp.net.reg
echo "DemandOraclePermission"="0" >> "%BAT_DIR%"\odp.net.reg
echo "SelfTuning"="1" >> "%BAT_DIR%"\odp.net.reg
echo "MaxStatementCacheSize"="100" >> "%BAT_DIR%"\odp.net.reg
regedit /s "%BAT_DIR%\odp.net.reg"
del /q "%BAT_DIR%\odp.net.reg"[/CODE]
Note the registry keys specified. We know from working with 32 and 64 bit OSes that if you run this as a 32 bit process the registry items would get redirected to a \Wow6432Node subkey.
Here is what I don't get. When I run the batch file myself from a command prompt, these reg entries get created in the correct 64 bit registry location. However, when I call the batch file from my install script (using LaunchAppAndWait) the registry keys are redirected under \Wow6432Node.
I get that the installer is probably a 32 bit EXE... however then I don't understand why I am able to then (in InstallScript) copy the registry keys to the proper 64 bit location using RegCopyKeys.
So I found my "solution" by copying the keys over... but I would really like to know the technical reason this is occurring. If anyone has insight I would appreciate it!
One of the Oracle provided batch files that gets called does something like this to create some registry entries:
[CODE]REM setup registry entries for ODP.NET 4
echo Windows Registry Editor Version 5.00 > "%BAT_DIR%"\odp.net.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\ODP.NET] >> "%BAT_DIR%"\odp.net.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\ODP.NET\4.112.2.0] >> "%BAT_DIR%"\odp.net.reg
echo "DllPath"="%REG_DIR%bin" >> "%BAT_DIR%"\odp.net.reg
echo "PromotableTransaction"="promotable" >> "%BAT_DIR%"\odp.net.reg
echo "StatementCacheWithUdts"="1" >> "%BAT_DIR%"\odp.net.reg
echo "TraceFileName"="c:\\odpnet4.trc" >> "%BAT_DIR%"\odp.net.reg
echo "TraceLevel"="0" >> "%BAT_DIR%"\odp.net.reg
echo "TraceOption"="0" >> "%BAT_DIR%"\odp.net.reg
echo "PerformanceCounters"="0" >> "%BAT_DIR%"\odp.net.reg
echo "UdtCacheSize"="4096" >> "%BAT_DIR%"\odp.net.reg
echo "DemandOraclePermission"="0" >> "%BAT_DIR%"\odp.net.reg
echo "SelfTuning"="1" >> "%BAT_DIR%"\odp.net.reg
echo "MaxStatementCacheSize"="100" >> "%BAT_DIR%"\odp.net.reg
regedit /s "%BAT_DIR%\odp.net.reg"
del /q "%BAT_DIR%\odp.net.reg"[/CODE]
Note the registry keys specified. We know from working with 32 and 64 bit OSes that if you run this as a 32 bit process the registry items would get redirected to a \Wow6432Node subkey.
Here is what I don't get. When I run the batch file myself from a command prompt, these reg entries get created in the correct 64 bit registry location. However, when I call the batch file from my install script (using LaunchAppAndWait) the registry keys are redirected under \Wow6432Node.
I get that the installer is probably a 32 bit EXE... however then I don't understand why I am able to then (in InstallScript) copy the registry keys to the proper 64 bit location using RegCopyKeys.
So I found my "solution" by copying the keys over... but I would really like to know the technical reason this is occurring. If anyone has insight I would appreciate it!
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 07, 2011
08:56 AM
Chances are high that the call to regedit is invoking the 32-bit regedit; if you don't ensure that it's a 64-bit batch evaluation, it will use 32-bit paths to launch everything, including regedit.
I actually make use of the 32-bit regedit myself from time to time to properly register a 32-bit .reg file without having to insert the Wow6432Node key references by hand.
I actually make use of the 32-bit regedit myself from time to time to properly register a 32-bit .reg file without having to insert the Wow6432Node key references by hand.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 11, 2012
02:01 PM
- Project is compiled/packaged from a 32-bit server.
- Both 32-bit binaries and 64-bit binaries exist within the project that will need to be deployed to the respective environments.
- We only provide one installer for both environments. (probably not the best approach)
- (On a 64-bit targeted machine) the 64-bit files require to be installed into the "System32" folder and NOT the "SysWOW64" Folder
Issues I have faced thus far:
- I cannot set the component where the 64-bit binaries are configured as a "64-bit component" because the package will not be able to run in a 32-bit machine.
- Attempted to include an entry into the DirectEditor "MoveFile" table... that did not work.
So my question is:
Is the only solution that I am left with to create a 64-bit installer specifically for this environment? even though there is no registration being executed explicitly by the installer for these files? I understand that the reflection being triggered by the Operating system is natural behavior but would a solution of executing a batch file that would copy the files from one location to the System32 work?
Also if I upgrade the server where the installers are being packaged to a 64-bit machine, would I still be able to create a 32-bit application targeted for 32-bit machines as well as creating 64-bit installer for 64-bit machines?
TIA
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 11, 2012
02:10 PM
Lonewolf32,
Michael is correct. The reason it works when you run from a CMD prompt is that you are most likely using the 64 bit version of CMD.exe typically found in C:\Windows\System32. Your installer is probably invoking the 32 bit version typically found in C:\Windows\SysWOW64... NO... I did not say that backwards!
Michael is correct. The reason it works when you run from a CMD prompt is that you are most likely using the 64 bit version of CMD.exe typically found in C:\Windows\System32. Your installer is probably invoking the 32 bit version typically found in C:\Windows\SysWOW64... NO... I did not say that backwards!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 21, 2012
09:53 AM
lonewolf32 wrote:
Hi I am trying to install Oracle ODP.NET drivers during my Installscript installation, on Windows Server 2008 R2. The oracle drivers come in the form of a series of BAT files, a bunch of subdirectories and helper executables (xcopy install).
One of the Oracle provided batch files that gets called does something like this to create some registry entries:
[CODE]REM setup registry entries for ODP.NET 4
echo Windows Registry Editor Version 5.00 > "%BAT_DIR%"\odp.net.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\ODP.NET] >> "%BAT_DIR%"\odp.net.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\ODP.NET\4.112.2.0] >> "%BAT_DIR%"\odp.net.reg
echo "DllPath"="%REG_DIR%bin" >> "%BAT_DIR%"\odp.net.reg
echo "PromotableTransaction"="promotable" >> "%BAT_DIR%"\odp.net.reg
echo "StatementCacheWithUdts"="1" >> "%BAT_DIR%"\odp.net.reg
echo "TraceFileName"="c:\\odpnet4.trc" >> "%BAT_DIR%"\odp.net.reg
echo "TraceLevel"="0" >> "%BAT_DIR%"\odp.net.reg
echo "TraceOption"="0" >> "%BAT_DIR%"\odp.net.reg
echo "PerformanceCounters"="0" >> "%BAT_DIR%"\odp.net.reg
echo "UdtCacheSize"="4096" >> "%BAT_DIR%"\odp.net.reg
echo "DemandOraclePermission"="0" >> "%BAT_DIR%"\odp.net.reg
echo "SelfTuning"="1" >> "%BAT_DIR%"\odp.net.reg
echo "MaxStatementCacheSize"="100" >> "%BAT_DIR%"\odp.net.reg
regedit /s "%BAT_DIR%\odp.net.reg"
del /q "%BAT_DIR%\odp.net.reg"[/CODE]
Note the registry keys specified. We know from working with 32 and 64 bit OSes that if you run this as a 32 bit process the registry items would get redirected to a \Wow6432Node subkey.
Here is what I don't get. When I run the batch file myself from a command prompt, these reg entries get created in the correct 64 bit registry location. However, when I call the batch file from my install script (using LaunchAppAndWait) the registry keys are redirected under \Wow6432Node.
I get that the installer is probably a 32 bit EXE... however then I don't understand why I am able to then (in InstallScript) copy the registry keys to the proper 64 bit location using RegCopyKeys.
So I found my "solution" by copying the keys over... but I would really like to know the technical reason this is occurring. If anyone has insight I would appreciate it!
Try the following:
//this part will disable the redirection to 32 bit
if (SYSINFO.bIsWow64) then
//set this to point to the 64 bit registry key
Disable(WOW64FSREDIRECTION);
ChangeDirectory(WINSYSDIR64);
else
ChangeDirectory(WINSYSDIR);
endif;
*** Code to launch the batch file ***
//this will re-enable the redirection to 32 bit
if (SYSINFO.bIsWow64) then
Enable(WOW64FSREDIRECTION);
endif;
ChangeDirectory(szCurrDir);
Hope this helps.