网站策划书包含的内容,天津通用网站建设方案,熊掌号提交wordpress,多伦网站建设一些简单的过程就不详细写了#xff0c;就写一些可能会遇到的问题。 我使用的是Setup Factory 9.0.3.0 汉化版#xff0c;资源地址#xff1a; https://download.csdn.net/download/woaishapi/7789171 这个是我参考的打包教程#xff1a; https://dominick-li.blog.csdn.ne…一些简单的过程就不详细写了就写一些可能会遇到的问题。 我使用的是Setup Factory 9.0.3.0 汉化版资源地址 https://download.csdn.net/download/woaishapi/7789171 这个是我参考的打包教程 https://dominick-li.blog.csdn.net/article/details/83149751不是Java应用打包也可以用的这里面的1、2、4、6可以参考3和5我在下面用了别的方法7写错了我下面会写正确的 http://t.zoukankan.com/lidabo-p-9809757.html里面有打包过程、设置安装序列号、“到期”属性等
1.卸载程序
自带的卸载程序uninstall.exe双击会报错所以自己写一个卸载程序。 在Setup Factory软件左侧列表中点击【操作】-【关于安装之后】在【On Post Install】里写入以下代码
Shell.CreateShortcut(SessionVar.Expand(%AppFolder%), SessionVar.Expand(卸载%ProductName%), SessionVar.Expand(%AppFolder%\\uninstall.exe), SessionVar.Expand(%AppFolder%\\uninstall.exe \/U:%AppFolder%\\Uninstall\\uninstall.xml\), SessionVar.Expand(%AppFolder%), SessionVar.Expand(%AppFolder%\\uninstall.exe), 0, SW_SHOWNORMAL, nil, );然后点击【卸载】-【操作】在【On Post Uninstall】里写入以下代码
resultF Folder.DoesExist(SessionVar.Expand(%AppFolder%));
if (resultF) then
Folder.DeleteTree(SessionVar.Expand(%AppFolder%),nil);
end安装发布包后生成的文件夹中的uninstall.exe还是不起作用的起作用的是我们上面写的卸载项目名.exe。
2.开机自启动
以下两个方法都自测可用
1写入注册表的方式 点击【操作】-【关于安装之后】在【On Post Install】里写入以下代码
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,Message,
SessionVar.Expand(%AppFolder%\\%ProductName%.exe),REG_SZ);
else
-- Do something else here
Registry.CreateKey(HKEY_LOCAL_MACHINE,SOFTWARE\\Microsoft\\windows\\CurrentVersion\\Run);
Registry.SetValue(HKEY_LOCAL_MACHINE,REG_SZ);
end %ProductName%是要开机自启的应用程序名如果不是项目名就自己改掉。 卸载的话需要删除注册表点击【卸载】-【操作】在【On Post Uninstall】里写入代码结合上面本身的卸载程序就变成了
resultF Folder.DoesExist(SessionVar.Expand(%AppFolder%));
if (resultF) then
Registry.DeleteValue(HKEY_LOCAL_MACHINE, Software\\Microsoft\\Windows\\CurrentVersion\\Run, Message);
Folder.DeleteTree(SessionVar.Expand(%AppFolder%),nil);
end这个注册表可以在\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run找到。
2快捷方式放入开机自启的文件夹中 WIN10自测可用右击exe文件选择【文件属性】在【快捷方式】-【位置】勾选【自定义】并填入C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp。
3.更换安装目录时补全应用名称
在安装时选择非默认安装目录时项目名会丢失所以需要自己进行一些修改。也就是开始时说的有点问题的教程 需要在Setup Factory安装目录下找到文件_SUF70_Global_Functions.lua用记事本打开并找到g_EditFieldFolderBrowse把这个函数改为如下图所示 代码
-- replace the contents of the edit field with the folder path that was selected
-- tbEditProps.Text strTargetFolder;
strCCCn SessionVar.Expand(\\%ProductName%);
tbEditProps.Text strTargetFolder..strCCCn;
DlgEditField.SetProperties(nIDEditField, tbEditProps);4.安装新版本并卸载前一版本
https://blog.csdn.net/hejingdong123/article/details/94440905自动卸载 https://blog.csdn.net/andr0id/article/details/106861372需先手动确认卸载