• <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>

            小默

            驅(qū)動安裝包制作 nsis

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

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




            wdk文檔中關(guān)于預(yù)安裝的一段話
            我剛開始以為預(yù)安裝就是直接把驅(qū)動安上,白癡似的把驅(qū)動直接安上了,然后我機(jī)子上面之前的驅(qū)動沒卸干凈,添上設(shè)備后直接能用,偶就把安裝程序當(dāng)成一個(gè)版本交了,囧。。。

             

            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.)

             


             

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


             

             未完待續(xù)。。。

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

            評論

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

            你好,我按照Preinstalling Driver Packages方式將 驅(qū)動所需要的inf,sys,dll文件放到了一個(gè)目錄,并且按照 步驟2的方式調(diào)用了 SetupCopyOEMInf 函數(shù)。但是重啟電腦連接新硬件的時(shí)候 電腦還會提示 有新硬件的向?qū)А_@是問什么。  回復(fù)  更多評論   

            導(dǎo)航

            統(tǒng)計(jì)

            留言簿(13)

            隨筆分類(287)

            隨筆檔案(289)

            漏洞

            搜索

            積分與排名

            最新評論

            閱讀排行榜

            狠狠色婷婷久久一区二区| 亚洲精品乱码久久久久久自慰| 超级97碰碰碰碰久久久久最新| 亚洲v国产v天堂a无码久久| 久久夜色精品国产噜噜亚洲a| 精品无码久久久久国产动漫3d| 久久国产精品一国产精品金尊| www亚洲欲色成人久久精品| 亚洲午夜精品久久久久久浪潮| 97久久国产亚洲精品超碰热| 国产精品久久久久乳精品爆| 99久久免费国产精品特黄| 亚洲午夜精品久久久久久人妖| 久久久久久亚洲精品影院| 欧美久久精品一级c片片| 波多野结衣久久精品| 国内精品久久久久久久久| 亚洲国产精品一区二区久久hs| 久久久久久免费一区二区三区| 亚洲AV伊人久久青青草原| 久久精品国产免费| yy6080久久| 亚洲а∨天堂久久精品9966| 老司机国内精品久久久久| 久久国产免费直播| 手机看片久久高清国产日韩| 久久精品国产免费一区| 久久久婷婷五月亚洲97号色| 中文字幕精品无码久久久久久3D日动漫 | 亚洲精品97久久中文字幕无码| 久久天堂AV综合合色蜜桃网| 午夜精品久久久久9999高清| 久久精品国产一区二区| 国产成人无码精品久久久久免费| 成人妇女免费播放久久久| 久久久久无码精品国产| 亚洲精品午夜国产VA久久成人| 久久婷婷五月综合97色直播| 久久久久无码国产精品不卡| 久久精品亚洲男人的天堂| 久久国产成人午夜AV影院|