讓某個註冊表值不被Installshied反安裝

來源:互聯網
上載者:User

    讓某個註冊表值不被Installshied反安裝

 

    有些註冊表的值在安裝的時候寫入目標機器,但是反安裝的時候不希望反安裝掉它,比如一些限制版的軟體(限制使用時間)的時間參數,第一次使用時寫入,以後每次安裝都去查看對應的註冊表值,反安裝的時候不能反安裝掉。

 

    RegDBSetKeyValueEx的協助中有下面這段話:

  • When they are created using RegDBCreateKeyEx.
  • While logging is enabled.
  • When they are created automatically by InstallShield during the installation process.
  • When they are created as a result of calling one of the special registry-related functions.

While logging is enabled.意思說只要把Logging禁止掉就可以實現反安裝時候不反安裝掉指定的註冊表選項的功能。終於發現Disable(LOGGING); 可以禁用掉自動安裝記錄,趕緊在代碼前,代碼後加上了Disable(LOGGING);Enable(LOGGING); 果然,反安裝時再也不會把登錄機碼刪除了。當然如果我們需要的話,可以在反安裝時添加代碼修改登錄機碼。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.