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
- :
- Why can we not write InProcServer32 values to registry
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
‎Mar 09, 2010
04:25 PM
Why can we not write InProcServer32 values to registry
We have an MSI install for a 32 bit program that requires 2 small COM arx(dll) files to be 64 bit on 64 bit machines to interface with AutoCAD 64 bit programs.
I've tried both using the COM Registration as well as directly editing the Registry values for the component but it will not write the InProServer32 value in the 64 bit portion of the registry under our CLSID.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{4FBCDC18-44CD-4471-9F43-2652E42318A5}\InProcServer32
It will write every other value. The ProgID, Programmable, TypeLib, VersionIndependentProgID you name it. I can even change the name to InProcServer321 and it works to that key but it's like Installshield itself ignores the InProcServer32 key even when I'm not using the COM Registration.
I've tried both using the COM Registration as well as directly editing the Registry values for the component but it will not write the InProServer32 value in the 64 bit portion of the registry under our CLSID.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{4FBCDC18-44CD-4471-9F43-2652E42318A5}\InProcServer32
It will write every other value. The ProgID, Programmable, TypeLib, VersionIndependentProgID you name it. I can even change the name to InProcServer321 and it works to that key but it's like Installshield itself ignores the InProcServer32 key even when I'm not using the COM Registration.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 09, 2010
11:19 PM
Also it will write it to the
With the Registry Reflection enabled you end up with:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{4FBCDC18-44CD-4471-9F43-2652E42318A5}
ProgID
Programmable
TypeLib
VersionIndependentProgID
And
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{4FBCDC18-44CD-4471-9F43-2652E42318A5}
InProcServer32
ProgID
Programmable
TypeLib
VersionIndependentProgID
Everything else like the Class Names, TypeLib, Interfaces all write correctly and are Reflected properly in the Normal and Wow6432Nodes
With the Registry Reflection enabled you end up with:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{4FBCDC18-44CD-4471-9F43-2652E42318A5}
ProgID
Programmable
TypeLib
VersionIndependentProgID
And
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{4FBCDC18-44CD-4471-9F43-2652E42318A5}
InProcServer32
ProgID
Programmable
TypeLib
VersionIndependentProgID
Everything else like the Class Names, TypeLib, Interfaces all write correctly and are Reflected properly in the Normal and Wow6432Nodes
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 10, 2010
10:10 AM
WARNING I AM A NOVICE AT INSTALLSHIELD AT THE BEST. I HAVE NO IDEA IF THIS MESSES UP THE REPAIR FUNCTIONS BUT FOR US IT IS NOT A SHARED FILE AND APPEARS TO WORK IN OUR CASE.
First I honestly don't know why Installshield doesn't automatically handle this or give one an option. It does seam like Windows does not user Registry Reflection for the InProcServer32 key so maybe that is why.
I also don't know how Microsoft and Installshield could not have planned for hybrid apps that would be 32 bit with some 64 bit components.
From some other posts I found that one needs to use the REGDB_OPTION_WOW64_64KEY to write specifically to the 64bit portion. So I modified their sample Installscript to write our values and included it below.
It appears to work for our situation
////////////////////////////////////////////////////////////////////////////////
//
// IIIIIII SSSSSS
// II SS InstallShield (R)
// II SSSSSS (c) 1996-2002, InstallShield Software Corporation
// II SS All rights reserved.
// IIIIIII SSSSSS
//
//
// This template script provides the code necessary to build an entry-point
// function to be called in an InstallScript custom action.
//
//
// File Name: Setup.rul
//
// Description: InstallShield script
//
////////////////////////////////////////////////////////////////////////////////
// Include Ifx.h for built-in InstallScript function prototypes, for Windows
// Installer API function prototypes and constants, and to declare code for
// the OnBegin and OnEnd events.
#include "ifx.h"
// The keyword export identifies MyFunction() as an entry-point function.
// The argument it accepts must be a handle to the Installer database.
export prototype Write_To_64bit_Registry(HWND);
prototype WriteStringKey(STRING, STRING, STRING, STRING);
// To Do: Declare global variables, define constants, and prototype user-
// defined and DLL functions here.
// To Do: Create a custom action for this entry-point function:
// 1. Right-click on "Custom Actions" in the Sequences/Actions view.
// 2. Select "Custom Action Wizard" from the context menu.
// 3. Proceed through the wizard and give the custom action a unique name.
// 4. Select "Run InstallScript code" for the custom action type, and in
// the next panel select "MyFunction" (or the new name of the entry-
// point function) for the source.
// 5. Click Next, accepting the default selections until the wizard
// creates the custom action.
//
// Once you have made a custom action, you must execute it in your setup by
// inserting it into a sequence or making it the result of a dialog's
// control event.
///////////////////////////////////////////////////////////////////////////////
//
// Function: MyFunction
//
// Purpose: This function will be called by the script engine when
// Windows(TM) Installer executes your custom action (see the "To
// Do," above).
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// Function: Write_To_64bit_Registry
//
// Purpose: This function will be called by the script engine when
// Windows(TM) Installer executes your custom action (see the "To
// Do," above). It will register my 64 bit arx files so we do not
// need to have both a 64bit and 32 bit install
//
///////////////////////////////////////////////////////////////////////////////
function Write_To_64bit_Registry(hMSI)
STRING szKey, szClass;
STRING szAppPath;
NUMBER nSize;
begin
szClass = "";
szAppPath = "";
// Enable Write to the 64bit registry...
REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
// Set the root key to HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT is default...
if(RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE) >= 0) then
szKey = "SOFTWARE\\WOW6432Node";
//Do only if this is a 64bit machine
if(RegDBKeyExist (szKey) >=1) then
// Create registry keys...
szKey = "SOFTWARE\\Classes\\CLSID\\{4FBCDC13-44CD-4471-9F43-2652E42318A5}";
WriteStringKey(szKey, "", "", "Application Class");
WriteStringKey(szKey, "", "AppID", "{????????-????-????-????-????????????}");
WriteStringKey(szKey + "\\InProcServer32", "", "", INSTALLDIR + "YourApp.dll");
WriteStringKey(szKey + "\\InProcServer32", "", "ThreadingModel", "Apartment");
WriteStringKey(szKey + "\\ProgID", "", "", "YourApp.Application.1");
WriteStringKey(szKey + "\\Programmable", "", "", "");
WriteStringKey(szKey + "\\TypeLib", "", "", "{????????-????-????-????-????????????}");
WriteStringKey(szKey + "\\VersionIndependentProgID", "", "", "YourApp.Application");
endif;
endif;
// Disable Write to the 64bit registry
REGDB_OPTIONS = REGDB_OPTIONS & ~REGDB_OPTION_WOW64_64KEY;
end;
function WriteStringKey(szKey, szClass, szName, szValue)
begin
if(RegDBKeyExist (szKey) <0) then
RegDBCreateKeyEx (szKey, szClass);
endif;
if(RegDBKeyExist (szKey) >=1) then
RegDBSetKeyValueEx (szKey, szName, REGDB_STRING, szValue, -1);
endif;
end;
First I honestly don't know why Installshield doesn't automatically handle this or give one an option. It does seam like Windows does not user Registry Reflection for the InProcServer32 key so maybe that is why.
I also don't know how Microsoft and Installshield could not have planned for hybrid apps that would be 32 bit with some 64 bit components.
From some other posts I found that one needs to use the REGDB_OPTION_WOW64_64KEY to write specifically to the 64bit portion. So I modified their sample Installscript to write our values and included it below.
It appears to work for our situation
////////////////////////////////////////////////////////////////////////////////
//
// IIIIIII SSSSSS
// II SS InstallShield (R)
// II SSSSSS (c) 1996-2002, InstallShield Software Corporation
// II SS All rights reserved.
// IIIIIII SSSSSS
//
//
// This template script provides the code necessary to build an entry-point
// function to be called in an InstallScript custom action.
//
//
// File Name: Setup.rul
//
// Description: InstallShield script
//
////////////////////////////////////////////////////////////////////////////////
// Include Ifx.h for built-in InstallScript function prototypes, for Windows
// Installer API function prototypes and constants, and to declare code for
// the OnBegin and OnEnd events.
#include "ifx.h"
// The keyword export identifies MyFunction() as an entry-point function.
// The argument it accepts must be a handle to the Installer database.
export prototype Write_To_64bit_Registry(HWND);
prototype WriteStringKey(STRING, STRING, STRING, STRING);
// To Do: Declare global variables, define constants, and prototype user-
// defined and DLL functions here.
// To Do: Create a custom action for this entry-point function:
// 1. Right-click on "Custom Actions" in the Sequences/Actions view.
// 2. Select "Custom Action Wizard" from the context menu.
// 3. Proceed through the wizard and give the custom action a unique name.
// 4. Select "Run InstallScript code" for the custom action type, and in
// the next panel select "MyFunction" (or the new name of the entry-
// point function) for the source.
// 5. Click Next, accepting the default selections until the wizard
// creates the custom action.
//
// Once you have made a custom action, you must execute it in your setup by
// inserting it into a sequence or making it the result of a dialog's
// control event.
///////////////////////////////////////////////////////////////////////////////
//
// Function: MyFunction
//
// Purpose: This function will be called by the script engine when
// Windows(TM) Installer executes your custom action (see the "To
// Do," above).
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// Function: Write_To_64bit_Registry
//
// Purpose: This function will be called by the script engine when
// Windows(TM) Installer executes your custom action (see the "To
// Do," above). It will register my 64 bit arx files so we do not
// need to have both a 64bit and 32 bit install
//
///////////////////////////////////////////////////////////////////////////////
function Write_To_64bit_Registry(hMSI)
STRING szKey, szClass;
STRING szAppPath;
NUMBER nSize;
begin
szClass = "";
szAppPath = "";
// Enable Write to the 64bit registry...
REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
// Set the root key to HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT is default...
if(RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE) >= 0) then
szKey = "SOFTWARE\\WOW6432Node";
//Do only if this is a 64bit machine
if(RegDBKeyExist (szKey) >=1) then
// Create registry keys...
szKey = "SOFTWARE\\Classes\\CLSID\\{4FBCDC13-44CD-4471-9F43-2652E42318A5}";
WriteStringKey(szKey, "", "", "Application Class");
WriteStringKey(szKey, "", "AppID", "{????????-????-????-????-????????????}");
WriteStringKey(szKey + "\\InProcServer32", "", "", INSTALLDIR + "YourApp.dll");
WriteStringKey(szKey + "\\InProcServer32", "", "ThreadingModel", "Apartment");
WriteStringKey(szKey + "\\ProgID", "", "", "YourApp.Application.1");
WriteStringKey(szKey + "\\Programmable", "", "", "");
WriteStringKey(szKey + "\\TypeLib", "", "", "{????????-????-????-????-????????????}");
WriteStringKey(szKey + "\\VersionIndependentProgID", "", "", "YourApp.Application");
endif;
endif;
// Disable Write to the 64bit registry
REGDB_OPTIONS = REGDB_OPTIONS & ~REGDB_OPTION_WOW64_64KEY;
end;
function WriteStringKey(szKey, szClass, szName, szValue)
begin
if(RegDBKeyExist (szKey) <0) then
RegDBCreateKeyEx (szKey, szClass);
endif;
if(RegDBKeyExist (szKey) >=1) then
RegDBSetKeyValueEx (szKey, szName, REGDB_STRING, szValue, -1);
endif;
end;