wince 應用程式開機自動執行的又一種方法
關鍵字: wince 自動執行
近日在開發過程中遇到wince應用程式開機自動執行的問題,在網上找了找,發現大概有以下三種方法:
1、 將應用程式和應用程式快捷方式新增到映像裡,再將快捷方式新增到startup目錄下,這樣當系統執行後應用程式就能自動執行;
2、 直接替換wince的shell,即修改登錄檔:
[hkey_local_machine/init]
"launch50"="explorer.exe"
"depend50"=hex:14,00, 1e,00
可以設定啟動順序和依賴程式;
int winapi winmain(hinstance hinstance,生成shellexe.exe的可執行檔案,此段**主要功能是查詢指定的應用程式,然後執行;下面這段**可以保證在sd卡檔案系統正確載入後才去執行應用程式;hinstance hprevinstance,
lptstr lpcmdline,
int ncmdshow)
if(0==icount) return 0;
findclose(hd);
shellexecuteinfo shexeinfo=;
shexeinfo.cbsize=sizeof(shellexecuteinfo);
shexeinfo.fmask=see_mask_nocloseprocess;
shexeinfo.hwnd=null;
shexeinfo.lpverb=null;
shexeinfo.lpfile=lpcmdline;
shexeinfo.lpparameters=l"";
shexeinfo.lpdirectory=null;
shexeinfo.nshow=sw_show;
shellexecuteex(&shexeinfo);
return 0;
}
while(icount--)檔案的名稱和路徑由命令列引數指定:
shexeinfo.lpfile=lpcmdline;
shellexe.exe f:/wince420/pbworkspaces/lioetenter/reldir/shellexe.exe nk s注意:shellexe.exe的屬性不能帶h(隱藏).autorun.lnk f:/wince420/pbworkspaces/lioetenter/reldir/autorun.lnk nk s
4、 在project.dat裡加入如下內容:
directory("/windows/startup"):-file("autorun.lnk","/windows/autorun.lnk")總結
這種方法用起來比較方便,shellexe.exe不用每次都重新編譯,只要根據應用程式路徑修改autorun.lnk即可,可以載入flash、u盤、sd卡里的應用程式。除錯及公升級應用程式就不用重新燒寫核心了。
WINCE應用程式開機自動執行方法
1 將應用程式和應用程式快捷方式新增到映像裡,再將快捷方式新增到startup目錄下,這樣當系統執行後應用程式就能自動執行 2 直接替換wince的shell,即修改登錄檔 hkey local machine init launch50 explorer.exe depend50 hex 14,0...
Wince系統開機自動執行指定應用程式
關鍵字 wince 自動執行 近日在開發過程中遇到wince應用程式開機自動執行的問題,在網上找了找,發現大概有以下三種方法 1 將應用程式和應用程式快捷方式新增到映像裡,再將快捷方式新增到startup目錄下,這樣當系統執行後應用程式就能自動執行 2 直接替換wince的shell,即修改登錄檔 ...
WinCE 應用程式開機自動方法
近日在開發過程中遇到wince應用程式開機自動執行的問題,在網上找了找,發現大概有以下三種方法 1 將應用程式和應用程式快捷方式新增到映像裡,再將快捷方式新增到startup目錄下,這樣當系統執行後應用程式就能自動執行 2 直接替換wince的shell,即修改登錄檔 hkey local mach...