使用批次檔完成註冊資訊,批處理完成註冊資訊

來源:互聯網
上載者:User

使用批次檔完成註冊資訊,批處理完成註冊資訊

在編寫軟體時, Window系統下的動態連結程式庫需要註冊才能使用。比如在Win  XP系統下運行ADO程式,需要在目前的目錄下註冊 regtlibv12  msado60_Backcompat_i386.tlb。

因為在軟體使用時,第一次都需要進行固定的祖冊資訊操作。這是可以將註冊資訊放在一個批次檔中,在第一次運行軟體時,運行批次檔便可以實現資訊的註冊。

將msado15.dll 和msado60_Backcompat_i386複製到目前的目錄下

然後建立一個txt檔案,將尾碼名改為  ”第一次啟動軟體.bat“, 在批次檔中寫上如下語句。

ver|find /i "5.1" && goto :xp
ver|find /i "6.1" && goto :win7
:win7
regsvr32  msado15.dll
exit

:xp
regsvr32  msado60_Backcompat_i386.tlb
exit

當應用程式第一次運行時點擊程式,運行批次程式,實現ado程式的註冊。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.