1. 基於登錄檔啟動exe程式
1. 桌面新建登錄檔執行檔案:protocal.reg
2. 任意文字編輯器開啟該檔案
windows registry editor version 5.00紅色部分自定義寫,綠色部分的是你要開啟的exe程式路徑,記住雙斜槓[hkey_classes_root\uacdl]
@="url:uacdl protocol handler""
url protocol
"=""
[hkey_classes_root\uacdl\defaulticon]
@="c:\\users\\29561\\desktop\\cs\\uac_setup.exe
"[hkey_classes_root\uacdl\shell]
[hkey_classes_root\uacdl\shell\open]
[hkey_classes_root\uacdl\shell\open\command]
@="\"c:\\users\\29561\\desktop\\cs\\uac_setup.exe\" \"%1\"
"
3. 啟動專案 html檔案加上這句話,步驟1中所命名的鏈結名稱,後面加://hello,(hello為傳遞引數,可任意新增)
4. 執行後會成下面情況:
2. clickonce ,需要使用vs開發的程式, winform開發的專案右鍵屬性。點選發布,選擇要發布的iis瀏覽位址,然後部署到iis上面,然後直接html裡面加上a標籤賦值該位址就可以了,啟動就會開啟你的exe程式
3. 用activex控制項,目前的瀏覽器只有ie可用這種,而且還有一定風險,會導致病毒入侵
禁止任意exe檔案執行
cmd下 reg add hklm software microsoft windows nt currentversion image file execution options 要禁止執行的檔案 v debugger t reg sz d debugfile.exe f 例如禁用qq.exe ...
Csharp啟動exe檔案
原文 在程式執行中會遇到啟動本軟體的exe問,或者啟用其它的exe檔案,已達到執行某些操作的作用。下面是兩種最常見的啟動exe檔案。1 呼叫系統dll使用其提供的方法。引用的dll,dllimport kernel32.dll public static extern int winexec str...
eclipse 啟動關閉 exe檔案
第一次寫部落格,不知道寫點什麼,就先來一點小資料吧。實現對程式的啟動,並且在程序裡關閉程式。public class test catch ioexception nullpointerexception e public static void main string args catch ioe...