cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
helenAtHoriba
Flexera beginner

Registering 64-bit native DLL failed

I use InstallShield 2016  Professional edition. The project is InstallScript

Operating system: Windows 7 64-bit.

The COM-based DLL file is native 64-bit. I could not register as self-register, as few components are added at a later stage. So at the very end of installation I would like to run a batch file.  I use the code below to do the job without any success. The DLL failed to register as the command prompt is not running with elevated priviledges. If I execute the batch file manually "Run As Administrator", everything works as a charm.

What am I missing? If the DLL is 32-bit and the OS is 32-bit, there is no problem

 

szLaunchCmd = TARGETDIR ^ "regCOM_64.bat";


LAAW_SHELLEXECUTEVERB = "runas";
 retVal = LaunchApplication( szLaunchCmd, "", "", LAAW_STARTUPINFO.wShowWindow,
LAAW_PARAMETERS.nTimeOut, LAAW_OPTION_WAIT | LAAW_OPTION_FIXUP_PROGRAM  | LAAW_OPTION_USE_SHELLEXECUTE);

0 Kudos
17 Replies
banna_k
Consultant

Re: Registering 64-bit native DLL failed

Hi @helenAtHoriba,

Can you see whether registration works after disabling the windows file redirection in 64 bit operating system. 

WOW64FSREDIRECTION—Disables 64-bit Windows file system redirection. You may need to do this before installing files to the WINSYSDIR64 destination, and enable it back after the batch file/cmd execuation.

https://helpnet.flexerasoftware.com/installshield25helplib/installshield25helplib.htm#Subsystems/Lan...

https://helpnet.flexerasoftware.com/installshield25helplib/helplibrary/Targeting64Bit-IS.htm

Alternatively, can you see whether you are able to register the 64 bit DLL by calling the regsvr32 from the System32 folder after disabling the File redirection.

 

 

 

0 Kudos
helenAtHoriba
Flexera beginner

Re: Registering 64-bit native DLL failed

Hi @banna_k,

I want all my files to be installed in native 64-bit directories, such as "C:\Program Files",  which they are right now.

My batch file consists of the following line:

c:\windows\system32\regsvr32.exe "C:\<TargetDir>\<FileName>.dll"

I have tried  to avoid calling the batch file and used the call to "regsvr32" directly, but no luck as well.

As from my knowledge, if I disable WOW64FDREDIRECTION, then my package would finish up in "C:\Program Files (x86)" directory.

Helen

0 Kudos
rguggisberg
Active participant

Re: Registering 64-bit native DLL failed

Most likely InstallShield is executing the 32 bit version of regsvr32.exe. Try this to get it to use the 64 bit version on a 64 bit machine:

c:\windows\Sysnative\regsvr32.exe "C:\<TargetDir>\<FileName>.dll"

Note that you can't use Sysnative in Windows explorer.

0 Kudos
helenAtHoriba
Flexera beginner

Re: Registering 64-bit native DLL failed

Hi @rguggisberg 

My main concern is that the command prompt is not opening with elevated privileges,  I don't see "Administrator:" in the title of the window

I'll try to run using Sysnative

0 Kudos
rguggisberg
Active participant

Re: Registering 64-bit native DLL failed

In InstallShield IDE:

  • Go to Releases tab
  • Select your Release
  •  Setup.exe tab
  •  Setup Launcher
  • Set 'Required Execution Level' to Administrator
  • Rebuild
0 Kudos
helenAtHoriba
Flexera beginner

Re: Registering 64-bit native DLL failed

Hi @rguggisberg 

The "Required execution level" is already set to "Administrator".

Changing the path to "Sysnative" made things worse - as there command prompt didn't recognized it as proper path

0 Kudos
rguggisberg
Active participant

Re: Registering 64-bit native DLL failed

Since CMD is involved... I am sure it is executing the 32 bit version of CMD even though you specified System32 (redirection taking place in a 32 bit app). Try replacing CMD.EXE in your script with this to execute 64 bit version of CMD. %windir%\Sysnative\cmd.exe Then you don't need SYSNATIVE anywhere else in your cmd line. Note that SYSNATIVE is not available on older OS's. What is your OS?
0 Kudos
helenAtHoriba
Flexera beginner

Re: Registering 64-bit native DLL failed

Hi @rguggisberg
I'm testing on both - Windows 7 and Win 10 64-bit
0 Kudos
banna_k
Consultant

Re: Registering 64-bit native DLL failed

Hi @helenAtHoriba ,

As I stated in my first comment, can you check your batch file execution after disabling the WOW64REDIRECTION.  If you didn't disabled WOW64REDIRECTION, the registration will try to do with 32 bit version of the regsvr32 for the 64 bit COM DLL and ends up in error.   

See the modified script, this will work if you are able to register the 64 bit DLL by executing the batch file manually from the command prompt.

Disable(WOW64FSREDIRECTION);
szLaunchCmd = TARGETDIR ^ "regCOM_64.bat";


LAAW_SHELLEXECUTEVERB = "runas";
retVal = LaunchApplication( szLaunchCmd, "", "", LAAW_STARTUPINFO.wShowWindow,
LAAW_PARAMETERS.nTimeOut, LAAW_OPTION_WAIT | LAAW_OPTION_FIXUP_PROGRAM | LAAW_OPTION_USE_SHELLEXECUTE);

Enable(WOW64FSREDIRECTION);

0 Kudos