如题。
大家帮忙!

解决方案 »

  1.   

    到http://www.installsite.org/找找例子吧。应该有的
      

  2.   

    楼上,哪个地方我去了。搜索了所有的板块
    有人问类似的问题但是斑竹不知道!
    斑竹建议去microsoft platform sdk msi newgroup 找rich, 说他是msi和dxshow两方面的专家
    但是我没找到这个新闻组,衰阿!
      

  3.   

    我不知道上面的那个地方是否有例子,但是我听别人说只要:只是将inf装入window下的inf文件夹,sys装入system32下的drivers目录就可以了
      

  4.   

    // your DLL function prototypes
    prototype BOOL  setupapi.SetupCopyOEMInfA(STRING    
     ,LPSTR 
    ,NUMBER,NUMBER,LPSTR 
    ,NUMBER,NUMBER,POINTER 
    );prototype BOOL kernel32.DeleteFileA(
      STRING    // file name
    );// ---- script function prototypes -----
    ///////////////////////////////////////////////
    It support all platform,also support win2000//install inf.
    function UKey1000_Installed()
    NUMBER  nvResult;
    STRING  svResult;
    STRING  szDllName;
    LPSTR  szBuf;
    NUMBER  size; 
    BOOL    bCopy;
    BOOL    bDelete; 
    begin
         //////////////////////////////////////////////
        GetSystemInfo (OS,nvResult,svResult);  //Get system Operation system type
        //Disable the component that not for windowsNT or Win2000
         if (nvResult = IS_WINDOWSNT) then
       //  XCopyFile (SUPPORTDIR^"xx.inf",WINDIR^"inf",COMP_NORMAL|LOCKEDFILE);
    szDllName = WINSYSDIR^"setupapi.dll";
    UseDLL(szDllName);
    bCopy =SetupCopyOEMInfA(SUPPORTDIR^"xx.inf",NULL,0,8,NULL,0,0,NULL) ;
    UnUseDLL(szDllName);
        endif;              
        if (nvResult = IS_WINDOWS9X) then
         bCopy=XCopyFile (SUPPORTDIR^"xxx.sys",WINDIR^"system32\\drivers",COMP_NORMAL|LOCKEDFILE);    
         bCopy=XCopyFile (SUPPORTDIR^"UKEY.inf",WINDIR^"inf",COMP_NORMAL|LOCKEDFILE);
         szDllName = WINSYSDIR^"kernel32.dll";
    UseDLL(szDllName);
    DeleteFileA(WINDIR^"Inf\\Drvidx.bin");
    bDelete =DeleteFileA(WINDIR^"Inf\\Drvdata.bin");
    UnUseDLL(szDllName);   
        endif;
      

  5.   

    sys装入system32下的drivers,inf放入support dir目录
      

  6.   

    楼上你好,这段代码我也找到了,但是编译不过去?
    提示;
     error C8025: 'SetupCopyOEMInfA' : undefined identifier
      

  7.   

    prototype BOOL  setupapi.SetupCopyOEMInfA(STRING    
     ,LPSTR 
    ,NUMBER,NUMBER,LPSTR 
    ,NUMBER,NUMBER,POINTER 
    );
      

  8.   

    编译还是过不去,还是提示我找不到UKey1000_Installed()的dll原型
    这是怎么回事恩
      

  9.   

    warning W7507: 'BYREF' assumed for string parameter to dll function call (performance warning W7507: 'BYREF' assumed for string parameter to dll function call (performance warning)
    error C8003: 'UKey1000_Installed' : function has no prototype declaration
    warning W7511: 'GetSupportDir' : string literal passed as BYREF, change prototype to use BYVAL
    error C8101: 'DeleteFileA' : must specify DLL for this function
    warning W7511: 'GetWinDir' : string literal passed as BYREF, change prototype to use BYVAL
    error C8101: 'DeleteFileA' : must specify DLL for this function
    warning W7511: 'GetWinDir' : string literal passed as BYREF, change prototype to use BYVAL
      

  10.   

    prototype BOOL kernel32.DeleteFileA(
      STRING    // file name
    );
    放头文件
    UKey1000_Installed是组件安装之后的installed处理,你也可以写在OnFirstUIAfter
      

  11.   

    放头文件 是怎么回事啊
    我把dll prototype 声明放在
    // ----- DLL function prototypes -----
        // your DLL function prototypes 
        。。这里UKey1000_Installed写在OnFirstUIAfter函数后
      

  12.   

    UKey1000_Installed' : function has no prototype declaration不会还应该写上prototype  UKey1000_Installed();吧
      

  13.   

    果然是。error没有了,但是警告一堆
      

  14.   

    学习中......
    这里是否有问题
    if (nvResult = IS_WINDOWSNT) then
       //  XCopyFile (SUPPORTDIR^"xx.inf",WINDIR^"inf",COMP_NORMAL|LOCKEDFILE);
    szDllName = WINSYSDIR^"setupapi.dll";
    UseDLL(szDllName);
    bCopy =SetupCopyOEMInfA(SUPPORTDIR^"xx.inf",NULL,0,8,NULL,0,0,NULL) ;
    UnUseDLL(szDllName);
        endif;       
           
    SYS文件不处理了吗?