Results 1 to 4 of 4

Thread: Inno Installer, How to Register OCX files on Vista and Win 7

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    355

    Inno Installer, How to Register OCX files on Vista and Win 7

    I am using InnoInstaller to create an install package for my app. On Windows XP everything works like a charm,, but when a user is installing the application on Vista or Win 7 the installer fails to install and register ocx files (I am primarily referring to 64 bit Vista and Win 7)

    Specifically the issue is with RichTX32.ocx, ComDlg32.ocx and mswinsck.ocx

    Can someone point out what is wrong with my installer script or help me resolve this. I found that when users MANUALLY go to register files they actually have to disable UAC on their machine,, register the files and then enable UAC back.

    Code:
    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
    
    #define MyAppName "MyApp"
    #define MyAppVerName "MyApp 1.0.0"
    #define MyAppPublisher "Me The Publisher"
    #define MyAppURL "http://www.MyApp.com/"
    #define MyAppExeName "MyApp.exe"
    
    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
    PrivilegesRequired=admin
    AppId={{806496F8-EA6A-4533-BAFC-4AF3F2D42F3A}
    AppName={#MyAppName}
    AppVerName={#MyAppVerName}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName=C:\Program Files\Me The Publisher\{#MyAppName}
    DisableDirPage=yes
    DefaultGroupName={#MyAppName}
    DisableProgramGroupPage=yes
    OutputDir=D:\My Documents\MyAppINNOINSTALLER
    OutputBaseFilename=MyApp
    SetupIconFile=D:\Install\Install\icon.ico
    Compression=lzma
    SolidCompression=yes
    
    [Languages]
    Name: "english"; MessagesFile: "compiler:Default.isl"
    
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
    Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
    
    [Files]
    Source: "D:\Install\Install\MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion
    Source: "D:\Install\Install\icon.ico"; DestDir: "{app}"; Flags: ignoreversion
    Source: "D:\Install\Install\Data\*"; DestDir: "{app}\Data\"; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist uninsneveruninstall
    Source: "D:\Install\Install\Support\*"; DestDir: "{app}\Support\"; Flags: ignoreversion recursesubdirs createallsubdirs
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    
    ; begin VB system files
    ; (Note: Scroll to the right to see the full lines!)
    Source: "D:\Install\Support Files\stdole2.tlb";  DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regtypelib
    Source: "D:\Install\Support Files\msvbvm60.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
    Source: "D:\Install\Support Files\oleaut32.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
    Source: "D:\Install\Support Files\olepro32.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
    Source: "D:\Install\Support Files\asycfilt.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile
    Source: "D:\Install\Support Files\vbscript.dll";   DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
    Source: "D:\Install\Support Files\msxml6.dll";   DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
    Source: "D:\Install\Support Files\BtnPlus1.ocx";   DestDir: "{sys}"; Flags: uninsneveruninstall noregerror regserver
    Source: "D:\Install\Support Files\FraPlus1.ocx";   DestDir: "{sys}"; Flags: uninsneveruninstall noregerror regserver
    Source: "D:\Install\Support Files\RICHTX32.OCX";   DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
    Source: "D:\Install\Support Files\MSWINSCK.OCX"; DestDir: "{sys}"; Flags: onlyifdoesntexist regserver restartreplace sharedfile
    Source: "D:\Install\Support Files\MSWINSCN.OCX"; DestDir: "{sys}"; Flags: onlyifdoesntexist regserver restartreplace sharedfile
    Source: "D:\Install\Support Files\MSCOMCTL.OCX";   DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
    Source: "D:\Install\Support Files\COMDLG32.OCX";   DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
    ; end VB system files
    
    
    
    [Icons]
    Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
    Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
    
    [Run]
    Filename: "{app}\Support\vbrun60sp6.exe";
    Filename: "{app}\Support\mysql32.msi"; Flags: shellexec
    Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent
    Last edited by Deliriumxx; Mar 18th, 2010 at 01:15 PM. Reason: Correction

  2. #2
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    Re: Inno Installer, How to Register OCX files on Vista and Win 7

    Hmmm.... Try:

    Code:
    [Setup] 
    PrivilegesRequired=admin


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    355

    Re: Inno Installer, How to Register OCX files on Vista and Win 7

    It is in there?? Already..

  4. #4
    New Member
    Join Date
    Apr 2010
    Posts
    3

    Re: Inno Installer, How to Register OCX files on Vista and Win 7

    I am just learning about this myself but one thing I notice:

    Code:
    OnlyBelowVersion: 0,6
    ...means only if o/s is older than Vista/Win7

    The most recent INNO defaults to onlyifnewer anyway (meaning it will not replace an existing and newer system file) so try removing that part of the code (ie... )

    Code:
    .....dll"; DestDir: "{sys}"; Flags: restartreplace uninsneveruninstall sharedfile...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width