要使安装好的程序能够开机自启,就要将程序添加注册表。
步骤:
1.,选择after installing
2.,双击蓝色部分
3.,选择一个步骤出发注册表
4.
isExist = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
-- An if ... else statement that compares two numbers
if (isExist) then
-- Do something here
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "Reid",
SessionVar.Expand("%AppFolder%\\test.exe"), REG_SZ);
else
-- Do something else here
Registry.CreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "Reid",
SessionVar.Expand("%AppFolder%\\test.exe"), REG_SZ);
end
将这段代码复制到框里。
注意:
SessionVar.Expand("%AppFolder%\\test.exe"), REG_SZ);选择自己的程序exe名