none
Instalação com arquivo .inf - Como configurar para sobrescrever arquivos existentes. RRS feed

  • Pergunta

  • Pessoal,

    Tenho um arquivo .inf, como posso configurá-lo para que durante a instalação ele sobrescreva os arquivos existentes, sem questionar o usuário se deve ou não sobrescrever?

    Segue conteúdo do arquivo .inf:

    ;INF file for PrintPDF.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%,PrintPDF.CAB,1

    [Add.Code]
    PrintPDF.ocx=PrintPDF.ocx
    MSINET.OCX=MSINET.OCX
    msstkprp.dll=msstkprp.dll
    msvbvm60.dll=msvbvm60.dll
    OLEAUT32.DLL=OLEAUT32.DLL
    OLEPRO32.DLL=OLEPRO32.DLL
    ASYCFILT.DLL=ASYCFILT.DLL
    STDOLE2.TLB=STDOLE2.TLB
    COMCAT.DLL=COMCAT.DLL

    [install.files]
    PrintPDF.ocx=PrintPDF.ocx
    MSINET.OCX=MSINET.OCX
    msstkprp.dll=msstkprp.dll
    msvbvm60.dll=msvbvm60.dll
    OLEAUT32.DLL=OLEAUT32.DLL
    OLEPRO32.DLL=OLEPRO32.DLL
    ASYCFILT.DLL=ASYCFILT.DLL
    STDOLE2.TLB=STDOLE2.TLB
    COMCAT.DLL=COMCAT.DLL

    [SourceDisksFiles]
    PrintPDF.ocx=1
    MSINET.OCX=1
    msstkprp.dll=1
    msvbvm60.dll=1
    OLEAUT32.DLL=1
    OLEPRO32.DLL=1
    ASYCFILT.DLL=1
    STDOLE2.TLB=1
    COMCAT.DLL=1

    [PrintPDF.ocx]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={A500F892-2EA9-43BF-AFE9-BEEB90682104}
    DestDir=
    FileVersion=1,0,0,1

    [MSINET.OCX]
    file-win32-x86=thiscab
    RegisterServer=yes
    clsid={48E59293-9880-11CF-9754-00AA00C00908}
    DestDir=11
    FileVersion=6,0,88,62

    [msstkprp.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=6,0,88,77

    [msvbvm60.dll]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=6,0,96,90

    [OLEAUT32.DLL]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=2,40,4275,1

    [OLEPRO32.DLL]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=5,0,4275,1

    [ASYCFILT.DLL]
    file-win32-x86=thiscab
    RegisterServer=no
    DestDir=11
    FileVersion=2,40,4275,1

    [STDOLE2.TLB]
    file-win32-x86=thiscab
    RegisterServer=no
    DestDir=11
    FileVersion=2,40,4275,1

    [COMCAT.DLL]
    file-win32-x86=thiscab
    RegisterServer=yes
    DestDir=11
    FileVersion=4,71,1460,1

    [Setup Hooks]
    AddToRegHook=AddToRegHook

    [AddToRegHook]
    InfSection=DefaultInstall2

    [DefaultInstall2]
    AddReg=AddToRegistry

    [AddToRegistry]
    HKLM,"SOFTWARE\Classes\CLSID\{A500F892-2EA9-43BF-AFE9-BEEB90682104}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}"
    HKCR,"Licenses",,,"Licensing: Copying the keys may be a violation of established copyrights."

    [RegisterFiles]
    %11%\COMCAT.DLL
    %11%\OLEPRO32.DLL
    %11%\OLEAUT32.DLL
    %11%\msvbvm60.dll
    %11%\msstkprp.dll
    %11%\MSINET.OCX
    %11%\PrintPDF.ocx
    sexta-feira, 16 de outubro de 2009 18:25

Respostas

  • Olá,

    Aplique o arquivo em uma diretiva de grupo GPO, assim você oderá aplica-la sem o questionamento do usuario.

    Abraços,

     


    Flavio Honda - http://flaviohonda.wordpress.com
    quinta-feira, 6 de outubro de 2011 11:18
    Moderador