需求 想在安装的时候调用install.bat,在卸载的时候调用uninstall.bat 解决 可以这样写 Inno Setup 的脚本: [Setup] ; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click T
Inno setup 卸载时删除程序文件夹(文件) //删除所有配置文件以达到干净卸载的目的 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin if CurUninstallStep = usUninstall then if MsgBox('您是否要删除用户配置信息?', mbConfirmation, MB_YESNO) = IDYES then //删除 {app} 文件夹及其中所有文件 D
怎么让bat文件在后台无声无息无影无形地运行呢? 用start/min命令去运行bat文件,电脑的任务栏下仍然会有相关的图标,以下的办法可以达到目的. 方法一: bat里有隐藏窗口的命令,很简单,只需要在代码头部加一段代码就可以了. @echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("%~nx0 h",
[Code]function InitializeUninstall(): Boolean; var MainRun: HWND; var MVRun:HWND; begin// FindWindowByWindowName函数参数为窗口名,即窗口标题,而非进程名. MainRun := FindWindowByWindowName('主窗口'); MVRun := FindWindowByWindowName('Connector'); if (ScreenRun<>0) or (MVRun
某些系统文件,例如驱动,不重启无法删除. 利用windows注册表里的 RunOnce.注意必须在HKLM下,否则可能权限不够. 不能直接填cmd命令,要以cmd的参数形式填写. procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep); var mres : integer; begin case CurUninstallStep of usPostUninstall: begin mres := MsgBox('