none
Distribute Distribution Unit in stand-alone setup mode RRS feed

  • Question

  • Hi all,

    Currently we are planning to migrate an application which runs from the web and includes the registration of an ActiveX control through the CODEBASE element to a new version. The problem is that most of the application new versions change the ActiveX and therefore requires the installation of the new ActiveX control, since most of our users are non-administrative users I created a batch file from the .INF file included in the distribution unit and then converted it to an executable file, however after running it although it seems to run fine the installation does not have the desired result and once I navigate to the application site users are prompted to install the ActiveX control.

    NOTES:

    1- For the distribution of this distribution unit the organization uses Microsoft System Center Distribution Agent.

    2 - The alternative of creating and MSI Package from the .CAB file and then distribute it through Active Directory GPO is not an option due to Organization restrictions.

    Next is the ActiveX.INF file content and the equivalent batch file I created to accomplish the task.

    ActiveX.INF

    ;INF file for ecNetClient.ocx
    ;DestDir can be 10 for Windows directory, 11 for Windows\System(32) directory, or left blank for the Occache directory.
    
    [version]
    signature="$CHICAGO$"
    AdvancedINF=2.0
    
    [DefaultInstall]
    CopyFiles=install.files
    RegisterOCXs=RegisterFiles
    AddReg=AddToRegistry
    [RInstallApplicationFiles]
    CopyFiles=install.files
    RegisterOCXs=RegisterFiles
    AddReg=AddToRegistry
    [DestinationDirs]
    install.files=11
    
    [SourceDisksNames]
    1=%DiskName%,ecNetClient.cab,1
    
    [Add.Code]
    ecNetClient.ocx=ecNetClient.ocx
    captotoolbox.ocx=captotoolbox.ocx
    msscript.ocx=msscript.ocx
    SysInfo.dll=SysInfo.dll
    Captovationzip.dll=Captovationzip.dll
    CISTwain.dll=CISTwain.dll
    CISPackage.dll=CISPackage.dll
    Mscomctl.ocx=Mscomctl.ocx
    IMViewer60.ocx=IMViewer60.ocx
    FieldEdit60.ocx=FieldEdit60.ocx
    MSMask32.ocx=MSMask32.ocx
    MSVBVM60.DLL=MSVBVM60.DLL
    imgman8.dll=imgman8.dll
    IM8tif.dil=IM8tif.dil
    IM8xtif.del=IM8xtif.del
    IM8jpg.dil=IM8jpg.dil
    IM8xjpg.del=IM8xjpg.del
    comdlg32.ocx=comdlg32.ocx
    comcat.dll=comcat.dll
    Mscomct2.ocx=Mscomct2.ocx
    zip32.dll=zip32.dll
    unzip32.dll=unzip32.dll
    CaptureHelp.dll=CaptureHelp.dll
    
    [install.files]
    ecNetClient.ocx=ecNetClient.ocx
    captotoolbox.ocx=captotoolbox.ocx
    msscript.ocx=msscript.ocx
    SysInfo.dll=SysInfo.dll
    CISTwain.dll=CISTwain.dll
    CISPackage.dll=CISPackage.dll
    Mscomctl.ocx=Mscomctl.ocx
    IMViewer60.ocx=IMViewer60.ocx
    FieldEdit60.ocx=FieldEdit60.ocx
    MSMask32.ocx=MSMask32.ocx
    MSVBVM60.DLL=MSVBVM60.DLL
    Captovationzip.dll=Captovationzip.dll
    imgman8.dll=imgman8.dll
    IM8tif.dil=IM8tif.dil
    IM8xtif.del=IM8xtif.del
    IM8jpg.dil=IM8jpg.dil
    IM8xjpg.del=IM8xjpg.del
    comdlg32.ocx=comdlg32.ocx
    comcat.dll=comcat.dll
    Mscomct2.ocx=Mscomct2.ocx
    zip32.dll=zip32.dll
    unzip32.dll=unzip32.dll
    CaptureHelp.dll=CaptureHelp.dll
    
    [SourceDisksFiles]
    ecNetClient.ocx=1
    captotoolbox.ocx=1
    msscript.ocx=1
    SysInfo.dll=1
    CISTwain.dll=1
    CISPackage.dll=1
    Mscomctl.ocx=1
    IMViewer60.ocx=1
    FieldEdit60.ocx=1
    msmask32.DLL=1
    MSVBVM60.DLL=1
    Captovationzip.dll=1
    imgman8.dll=1
    IM8tif.dil=1
    IM8xtif.del=1
    IM8jpg.dil=1
    IM8xjpg.del=1
    comdlg32.ocx=1
    comcat.dll=1
    Mscomct2.ocx=1
    zip32.dll=1
    unzip32.dll=1
    CaptureHelp.dll=1
    
    [ecNetClient.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={58B355C1-AB1C-4E66-BCB7-FA1E41E4D9EB}
    DestDir=
    FileVersion=10,1351,0,8
    
    [captotoolbox.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={D6BEB168-7EA2-11D4-8145-00A0CC51C9DA}
    DestDir=11
    FileVersion=1,0,0,0
    
    [msscript.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}
    DestDir=11
    FileVersion=1,0,0,4615
    
    [MSVBVM60.DLL]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=6,0,89,64
    
    [SysInfo.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={AD9EC88B-F37A-11D3-819C-00A0CC3D7FDB}
    DestDir=11
    FileVersion=1,0,0,7
    
    [Captovationzip.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={68C77337-9E71-470A-B43C-4CC2A610EF20}
    DestDir=11
    FileVersion=5,3,0,1
    
    [imgman8.dll]
    file-win32-x86=thiscab
    RegisterServer=no
    DestDir=11
    FileVersion=8,40,0,0
    
    [CISTwain.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={184BBA13-9A2F-4A52-807A-586EA8F069C1}
    DestDir=11
    FileVersion=1,1,0,13
    
    [CISPackage.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={599D183A-EF92-11D3-8196-00A0CC3D7FDB}
    DestDir=11
    FileVersion=5,3,0,1
    
    [Mscomctl.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}
    DestDir=11
    FileVersion=6,0,88,77
    
    [IMViewer60.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={D0AF2D4D-11AF-49D3-8488-DFB1498C7708}
    DestDir=11
    FileVersion=10,1350,0,1
    
    [FieldEdit60.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={C65E2772-0FFC-40AD-8910-822C225477E5}
    DestDir=11
    FileVersion=5,0,0,43
    
    [IM8tif.dil]
    file-win32-x86=thiscab
    RegisterServer=no
    DestDir=11
    FileVersion=8,40,0,0
    
    [IM8xtif.del]
    file-win32-x86=thiscab
    RegisterServer=no
    DestDir=11
    FileVersion=8,40,0,0
    
    [IM8jpg.dil]
    file-win32-x86=thiscab
    RegisterServer=no
    DestDir=11
    FileVersion=8,40,0,0
    
    [IM8xjpg.del]
    file-win32-x86=thiscab
    RegisterServer=no
    DestDir=11
    FileVersion=8,40,0,0
    
    [MSMASK32.OCX]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={C932BA88-4374-101B-A56C-00AA003668DC}
    DestDir=11
    FileVersion=6,0,84,18
    
    [comdlg32.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={F9043C88-F6F2-101A-A3C9-08002B2F49FB}
    FileVersion=6,0,84,18
    
    [comcat.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=4,71,1460,1
    
    [Mscomct2.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}
    DestDir=11
    FileVersion=6,0,88,4
    
    [zip32.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=1,1,0,0
    
    [unzip32.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=5,5,2,0
    
    [CaptureHelp.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={A8E5C84A-EC72-4856-BA6A-0EBB9C5DD8BE}
    DestDir=11
    FileVersion=10,1350,0,6
    
    [Setup Hooks]
    AddToRegHook=AddToRegHook
    
    [AddToRegHook]
    InfSection=DefaultInstall2
    
    [DefaultInstall2]
    AddReg=AddToRegistry
    
    [AddToRegistry]
    HKLM,"SOFTWARE\Classes\CLSID\{D6BEB168-7EA2-11D4-8145-00A0CC51C9DA}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}"
    HKLM,"SOFTWARE\Classes\CLSID\{D6BEB168-7EA2-11D4-8145-00A0CC51C9DA}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}"
    HKLM,"SOFTWARE\Classes\CLSID\{58B355C1-AB1C-4E66-BCB7-FA1E41E4D9EB}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}"
    HKLM,"SOFTWARE\Classes\CLSID\{58B355C1-AB1C-4E66-BCB7-FA1E41E4D9EB}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}"
    HKCR,"Licenses",,,"Licensing: Copying the keys may be a violation of established copyrights."
    
    [RegisterFiles]
    %11%\msvbvm60.dll
    %11%\msscript.ocx
    %11%\FieldEdit60.ocx
    %11%\IMViewer60.ocx
    %11%\Mscomctl.ocx
    %11%\MSMask32.ocx
    %11%\CaptoToolBox.ocx
    %11%\SysInfo.dll
    %11%\CISPackage.dll
    %11%\CISTwain.dll
    %11%\Captovationzip.dll
    %11%\ecNetClient.ocx
    %11%\comdlg32.ocx
    %11%\comcat.dll
    %11%\mscomct2.ocx
    %11%\CaptureHelp.dll
    

    ActiveX.bat

    @ECHO OFF REM BATCH file for ecNetClient.ocx REM Define Variables set SYSTEM_FOLDER= %windir%\system32 REM Delete existing versions if exist %SYSTEM_FOLDER%\ecNetClient.ocx del %SYSTEM_FOLDER%\ecNetClient.ocx if exist %SYSTEM_FOLDER%\captotoolbox.ocx del %SYSTEM_FOLDER%\captotoolbox.ocx if exist %SYSTEM_FOLDER%\msscript.ocx del %SYSTEM_FOLDER%\msscript.ocx if exist %SYSTEM_FOLDER%\SysInfo.dll del %SYSTEM_FOLDER%\SysInfo.dll if exist %SYSTEM_FOLDER%\CISTwain.dll del %SYSTEM_FOLDER%\CISTwain.dll if exist %SYSTEM_FOLDER%\CISPackage.dll del %SYSTEM_FOLDER%\CISPackage.dll if exist %SYSTEM_FOLDER%\Mscomctl.ocx del %SYSTEM_FOLDER%\Mscomctl.ocx if exist %SYSTEM_FOLDER%\IMViewer60.ocx del %SYSTEM_FOLDER%\IMViewer60.ocx if exist %SYSTEM_FOLDER%\FieldEdit60.ocx del %SYSTEM_FOLDER%\FieldEdit60.ocx if exist %SYSTEM_FOLDER%\MSMask32.ocx del %SYSTEM_FOLDER%\MSMask32.ocx if exist %SYSTEM_FOLDER%\MSVBVM60.DLL del %SYSTEM_FOLDER%\MSVBVM60.DLL if exist %SYSTEM_FOLDER%\Captovationzip.dll del %SYSTEM_FOLDER%\Captovationzip.dll if exist %SYSTEM_FOLDER%\imgman8.dll del %SYSTEM_FOLDER%\imgman8.dll if exist %SYSTEM_FOLDER%\IM8tif.dil del %SYSTEM_FOLDER%\IM8tif.dil if exist %SYSTEM_FOLDER%\IM8xtif.del del %SYSTEM_FOLDER%\IM8xtif.del if exist %SYSTEM_FOLDER%\IM8jpg.dil del %SYSTEM_FOLDER%\IM8jpg.dil if exist %SYSTEM_FOLDER%\IM8xjpg.del del %SYSTEM_FOLDER%\IM8xjpg.del if exist %SYSTEM_FOLDER%\comdlg32.ocx del %SYSTEM_FOLDER%\comdlg32.ocx if exist %SYSTEM_FOLDER%\comcat.dll del %SYSTEM_FOLDER%\comcat.dll if exist %SYSTEM_FOLDER%\Mscomct2.ocx del %SYSTEM_FOLDER%\Mscomct2.ocx if exist %SYSTEM_FOLDER%\zip32.dll del %SYSTEM_FOLDER%\zip32.dll if exist %SYSTEM_FOLDER%\unzip32.dll del %SYSTEM_FOLDER%\unzip32.dll if exist %SYSTEM_FOLDER%\CaptureHelp.dll del %SYSTEM_FOLDER%\CaptureHelp.dll REM Copy last version to destination folder copy "%MYFILES%\ecNetClient.ocx" %SYSTEM_FOLDER% copy "%MYFILES%\captotoolbox.ocx" %SYSTEM_FOLDER copy "%MYFILES%\msscript.ocx" %SYSTEM_FOLDER% copy "%MYFILES%\SysInfo.dll" %SYSTEM_FOLDER% copy "%MYFILES%\CISTwain.dll" %SYSTEM_FOLDER% copy "%MYFILES%\CISPackage.dll" %SYSTEM_FOLDER% copy "%MYFILES%\Mscomctl.ocx" %SYSTEM_FOLDER% copy "%MYFILES%\IMViewer60.ocx" %SYSTEM_FOLDER% copy "%MYFILES%\FieldEdit60.ocx" %SYSTEM_FOLDER% copy "%MYFILES%\MSMask32.ocx" %SYSTEM_FOLDER% copy "%MYFILES%\MSVBVM60.DLL" %SYSTEM_FOLDER% copy "%MYFILES%\Captovationzip.dll" %SYSTEM_FOLDER% copy "%MYFILES%\imgman8.dll" %SYSTEM_FOLDER% copy "%MYFILES%\IM8tif.dil" %SYSTEM_FOLDER% copy "%MYFILES%\IM8xtif.del" %SYSTEM_FOLDER% copy "%MYFILES%\IM8jpg.dil" %SYSTEM_FOLDER% copy "%MYFILES%\IM8xjpg.del" %SYSTEM_FOLDER% copy "%MYFILES%\comdlg32.ocx" %SYSTEM_FOLDER% copy "%MYFILES%\comcat.dll" %SYSTEM_FOLDER% copy "%MYFILES%\Mscomct2.ocx" %SYSTEM_FOLDER% copy "%MYFILES%\zip32.dll" %SYSTEM_FOLDER% copy "%MYFILES%\unzip32.dll" %SYSTEM_FOLDER% copy "%MYFILES%\CaptureHelp.dll" %SYSTEM_FOLDER% REM Copy required files to IExplore downloaded programs if exist "%windir%\Downloaded Program Files\" ( if exist "%windir%\Downloaded Program Files\comdlg32.ocx" del "%windir%\Downloaded Program Files\comdlg32.ocx" if exist "%windir%\Downloaded Program Files\ecNetClient.ocx" del "%windir%\Downloaded Program Files\ecNetClient.ocx" if exist "%windir%\Downloaded Program Files\ecNetClient.INF" del "%windir%\Downloaded Program Files\ecNetClient.INF" copy "%MYFILES%\comdlg32.ocx" "%windir%\Downloaded Program Files" copy "%MYFILES%\ecNetClient.ocx" "%windir%\Downloaded Program Files" copy "%MYFILES%\ecNetClient.INF" "%windir%\Downloaded Program Files" ) REM Navigate to the specified folder REM cd %CURRENT_FOLDER% REM Register DLL and OCX regsvr32 /s "%MYFILES%\ecNetClient.ocx" regsvr32 /s "%MYFILES%\captotoolbox.ocx" regsvr32 /s "%MYFILES%\msscript.ocx" regsvr32 /s "%MYFILES%\MSVBVM60.DLL" regsvr32 /s "%MYFILES%\SysInfo.dll" regsvr32 /s "%MYFILES%\Captovationzip.dll" regsvr32 /s "%MYFILES%\CISTwain.dll" regsvr32 /s "%MYFILES%\CISPackage.dll" regsvr32 /s "%MYFILES%\Mscomctl.ocx" regsvr32 /s "%MYFILES%\IMViewer60.ocx" regsvr32 /s "%MYFILES%\FieldEdit60.ocx" regsvr32 /s "%MYFILES%\MSMASK32.OCX" regsvr32 /s "%MYFILES%\comdlg32.ocx" regsvr32 /s "%MYFILES%\comcat.dll" regsvr32 /s "%MYFILES%\Mscomct2.ocx" REM regsvr32 /s "%MYFILES%\zip32.dll" REM regsvr32 /s "%MYFILES%\unzip32.dll" regsvr32 /s "%MYFILES%\CaptureHelp.dll" REM Create registry keys reg query "HKLM\SOFTWARE\Classes\CLSID\{D6BEB168-7EA2-11D4-8145-00A0CC51C9DA}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}" || reg add "HKLM\SOFTWARE\Classes\CLSID\{D6BEB168-7EA2-11D4-8145-00A0CC51C9DA}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}" reg query "HKLM\SOFTWARE\Classes\CLSID\{D6BEB168-7EA2-11D4-8145-00A0CC51C9DA}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}" || reg add "HKLM\SOFTWARE\Classes\CLSID\{D6BEB168-7EA2-11D4-8145-00A0CC51C9DA}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}" reg query "HKLM\SOFTWARE\Classes\CLSID\{58B355C1-AB1C-4E66-BCB7-FA1E41E4D9EB}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}" || reg add "HKLM\SOFTWARE\Classes\CLSID\{58B355C1-AB1C-4E66-BCB7-FA1E41E4D9EB}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}" reg query "HKLM\SOFTWARE\Classes\CLSID\{58B355C1-AB1C-4E66-BCB7-FA1E41E4D9EB}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}" || reg add "HKLM\SOFTWARE\Classes\CLSID\{58B355C1-AB1C-4E66-BCB7-FA1E41E4D9EB}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}" reg query "HKCR\Licenses" /v Stuff || reg add "HKCR\Licenses" /v Stuff


    Thanks.

    Monday, July 30, 2012 8:16 PM

Answers