thek
1st October 2010 14:04 UTC
Win 7 register OCX problem
Hello
I have the following problem
registering a control (cwui.ocx) from commandline works
via NSIS only If I remoe the "RequestExecutionLevel admin" entry
codeexample:
!include Library.nsh
Name "test_ocx_install"
OutFile "test_ocx_install.exe"
InstallDir $DESKTOP\Example1
; Request application privileges for Windows Vista
RequestExecutionLevel admin
; Pages
ShowInstDetails show
Page directory
Page instfiles
Section ""
SetOutPath $TEMP
!insertmacro InstallLib REGDLL 0 REBOOT_PROTECTED "..\common\binaries\system32
cwui.ocx" $SYSDIR\cwui.ocx $SYSDIR
${If} ${Errors}
DetailPrint "Instlib failed"
ClearErrors
${endIf}
SectionEnd
This one failes
if I remove the
RequestExecutionLevel admin or replace it with
RequestExecutionLevel none, the register task works well?!?!?
Some hints what I'm doing wrong?:confused:
meaningoflights
21st February 2011 07:13 UTC
I have the same code (has worked perfectly for years) and now I too am getting customers reporting they install my app and get an error about "RICHTX32.ocx" not being registered.
When I get my customers to run the RegSvr32 command it works and they can then run my application.
I'm not sure about taking out the "RequestExecutionLevel admin" - does that seriously work as none?
Even if I reproduce and confirm it is a workaround I would prefer to look into why the standard command doesn't work with admin? You know it would be a hack to detect the OS is win7 and have a condition to lower the privilages to none upon executing the !insertmacro InstallLib REGDLL
This is really frustrating me because we've had win 7 users for a while now and all of a sudden 3 reports in as little as 5 days. Any help would be much appreciated. TIA
thek
21st February 2011 08:19 UTC
Sorry but we still haven't found a solution to this problem!
Thats not 100% right, the newest version of this control don't have this problem, so we gonna update it
The last workaround would be to do pack the control in an MSI file and run it from the installer.