1.开机自启动的注册表在
HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\Current Version\\Run
修改注册表,设置相应的名称与路径,可以使相应程序开机自启动
2.安装后自启动 则只要在Aftermove处理项后末尾加上LaunchApp (TARGETDIR^"***.exe","");
————————————————————————————————————————————
IS打包设置为:
以FeiQ为例,在installScript-OnFirstUIAfter()函数中添加自行注册表修改的脚本。
//@@为手动添加脚本
function OnFirstUIAfter()
STRING szTitle, szMsg1, szMsg2, szOpt1, szOpt2;
NUMBER bvOpt1, bvOpt2;
STRING szPath3; //@@
STRING szResult; //@@
begin
ShowObjWizardPages(NEXT);
szTitle = "";
szMsg1 = "";
szMsg2 = "";
szOpt1 = "";
szOpt2 = "";
bvOpt1 = FALSE;
bvOpt2 = FALSE;
//{{IS_SCRIPT_TAG(Dlg_SdDinishEx)
if ( BATCH_INSTALL ) then
SdFinishReboot ( szTitle , szMsg1 , SYS_BOOTMACHINE , szMsg2 , 0 );
else
SdFinish ( szTitle , szMsg1 , szMsg2 , szOpt1 , szOpt2 , bvOpt1 , bvOpt2 );
endif;
//}}IS_SCRIPT_TAG(Dlg_SdDinishEx)
if(FindFile(TARGETDIR,"FeiQ.exe",szResult)=0) then //@@
szPath3=TARGETDIR^"FeiQ.exe";
LongPathToQuote(szPath3,TRUE);
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
RegDBSetKeyValueEx("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run","FeiQ",REGDB_STRING,szPath3,-1);
endif; //@@
LaunchApp (TARGETDIR^"FeiQ.exe","");// 安装后自启动
end;
阅读(1044) | 评论(0) | 转发(0) |