如何設定軟體自啟動?
呼叫一系列api函式
private
declare
function regclosekey lib
"advapi32.dll" (byval hkey as
long) as
long
const hkey_local_machine =
private
declare
function regcreatekeyex lib
"advapi32.dll"
alias
"regcreatekeyexa" (byval hkey as
long, byval lpsubkey as
string, byval reserved as
long, byval lpclass as
string, byval dwoptions as
long, byval samdesired as
long, byval lpsecurityattributes as
long, phkresult as
long, lpdwdisposition as
long) as
long
const reg_sz = 1
private
declare
function regsetvalueex lib
"advapi32.dll"
alias
"regsetvalueexa" (byval hkey as
long, byval lpvaluename as
string, byval reserved as
long, byval dwtype as
long, byval lpdata as
string, byval cbdata as
long) as
long
private
declare
function regdeletevalue lib
"advapi32.dll"
alias
"regdeletevaluea" (byval hkey as
long, byval lpvaluename as
string) as
long
'宣告乙個函式
private
function szqd(byval id as
long) as
long
dim hk&, he
dim aph$
onerror
goto erh
regcreatekeyex &h80000002, "software/microsoft/windows/currentversion/run", 0, vbnullstring, 0, 0, 0, hk, he
if id then
regsetvalueex hk, "bigchina-ex", 0, reg_sz, aph, len(aph) + 1
else
regdeletevalue hk, "bigchina-ex"
endif
regclosekey hk
szqd = 1
exit
function
erh:
szqd = 0
endfunction
Ubuntu設定軟體開機自啟動
1 修改 etc rc.local rc.local指令碼是乙個ubuntu開機後會自動執行的指令碼 重啟後 我們可以在該指令碼內新增命令列指令 在exit 0前新增命令即可 2 新建指令碼,將指令碼新增到啟動指令碼 推薦,可控,而且非常清楚 2.1 在 etc init.d 下新建指令碼 或者 s...
中標麒麟設定軟體開機啟動
利用linux的 desktop檔案實現開機啟動。在 etc xdg autostart 目錄下建立乙個 test.desktop檔案,並對檔案進行以下編輯。cd etc xdg autostarttouch test.desktop sudo vim test.desktop 進入編寫視窗,輸入 ...
win10設定軟體開機啟動
常常需要設定軟體開機自動啟動,但是又不想用第三方的軟體來設定。其實windows一直都帶有啟動資料夾,如果想要實現應用程式在所有的使用者登入系統後都能自動啟動,就把該應用程式的快捷方式貼上到 系統啟動資料夾 裡,就可以讓軟體開機自動啟動了。1 直接把以下路徑複製到位址列裡面開啟即可。如下圖 用系統命...