• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            小默

            驅動安裝包制作 nsis

            引用不知道哪位大牛的原話:

            對于即插即用簡單地說要對付2種情況
            1。在你的設備未安裝前,安裝驅動程序這叫預先安裝。
            最簡單的方法就是使用SetupCopyOEMInf函數。
            具體做法是:
            將SetupCopyOEMInf封裝在一個動態庫里。
            用installshield將所有文件copy到一個臨時目錄。
            調用動態庫使用SetupCopyOEMInf函數copy臨時目錄下的inf文件(路徑)。
            installshield讓計算機重啟。
            插上設備,自動識別。 
             2.你的設備已安裝,彈出安裝向導。
            很簡單,讓用戶搜索你的安裝盤,即可完成安裝。
             
            懶得寫dll了(其實是不會寫- -),devcon dp_add調用SetupCopyOEMInf做了預安裝




            wdk文檔中關于預安裝的一段話
            我剛開始以為預安裝就是直接把驅動安上,白癡似的把驅動直接安上了,然后我機子上面之前的驅動沒卸干凈,添上設備后直接能用,偶就把安裝程序當成一個版本交了,囧。。。

             

            Preinstalling Driver Packages

            To preinstall driver files, your device installation application should follow these steps:

            1. On the target system, create a directory for the driver files. If your device installation application installs an application, the driver files should be stored in a subdirectory of the application directory.

            2. Copy all files in the driver package from the distribution media to the directory created in step (1). The driver package includes the driver or drivers, the INF file, the catalog file, and other installation files.

            3. Call  SetupCopyOEMInf specifying the INF file in the directory created in step (1). Specify SPOST_PATH for the OEMSourceMediaType parameter and specify NULL for the OEMSourceMediaLocation parameter. SetupCopyOEMInf copies the INF file for the driver package into the %windir%\Inf directory on the target system and directs Windows to store the source location of the INF file in its list of preprocessed INF files. SetupCopyOEMInf also processes the catalog file, so the PnP manager will install the driver the next time it recognizes a device listed in the INF file.

            When the user plugs in the device, the PnP manager recognizes the device, finds the INF file copied by SetupCopyOEMInf, and installs the drivers copied in step (2). (For more information about copying INF files, see Copying INFs.)

             


             

            安裝時直接把inf文件拷windows\inf下,卸載時刪除,防止被命名成oem*.inf,在某種情況下發生重復預注冊,同時也便于卸載時刪除inf文件


             

             未完待續。。。

            posted on 2010-02-24 22:58 小默 閱讀(5045) 評論(1)  編輯 收藏 引用 所屬分類: Windows

            評論

            # re: 驅動安裝包制作 nsis 2011-03-15 17:58 徐凌波

            你好,我按照Preinstalling Driver Packages方式將 驅動所需要的inf,sys,dll文件放到了一個目錄,并且按照 步驟2的方式調用了 SetupCopyOEMInf 函數。但是重啟電腦連接新硬件的時候 電腦還會提示 有新硬件的向導。這是問什么。  回復  更多評論   

            導航

            統計

            留言簿(13)

            隨筆分類(287)

            隨筆檔案(289)

            漏洞

            搜索

            積分與排名

            最新評論

            閱讀排行榜

            97久久国产露脸精品国产| 国产精品久久久久久久久免费| 99久久精品费精品国产 | 欧洲性大片xxxxx久久久| 久久久久一本毛久久久| 久久99精品国产麻豆宅宅| 日韩人妻无码精品久久免费一| 久久久久亚洲精品天堂| 四虎国产精品免费久久5151| 亚洲国产视频久久| 久久久精品一区二区三区| 国产精品久久久香蕉| 日韩精品久久久久久| 久久青青色综合| 精品多毛少妇人妻AV免费久久| 久久无码人妻精品一区二区三区 | 久久久久亚洲精品日久生情| 99久久99久久精品免费看蜜桃| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 老司机午夜网站国内精品久久久久久久久 | 伊人久久大香线焦AV综合影院| 曰曰摸天天摸人人看久久久| 香蕉久久夜色精品国产尤物| 日本精品久久久久中文字幕| 人妻无码αv中文字幕久久| 午夜精品久久久久久影视riav| 18岁日韩内射颜射午夜久久成人| 亚洲精品乱码久久久久久蜜桃不卡 | 久久久久高潮综合影院| 久久男人AV资源网站| 亚洲欧美精品伊人久久| 久久亚洲欧美日本精品| 国产美女久久精品香蕉69| 伊人久久综合精品无码AV专区| 香蕉久久AⅤ一区二区三区| 久久国产一片免费观看| 久久播电影网| 久久久久无码中| 亚洲&#228;v永久无码精品天堂久久| 色噜噜狠狠先锋影音久久| 久久美女人爽女人爽|