Commit 4eafd00f authored by Auto Backup's avatar Auto Backup

feat: build

parent 4c6671c9
......@@ -20,6 +20,8 @@
#define CurDateString GetDateTimeString('yyMMdd', '-', ':');
[Setup]
; 告知编译器使用 Unicode 模式处理字符
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
......@@ -232,8 +234,8 @@ Name: "{group}\卸载{#MyAppName}"; Filename: "{uninstallexe}"
;Name: "{app}\UFCPAS4Office\取消注册Office加载项6"; Filename: "{app}\UFCPAS4Office\注册Office加载项6.exe";Parameters: "/u"
[Code]
function KillExe(Exename: PChar):integer; external 'KillExe@files:UFCPASSetupDll.dll stdcall setuponly';
function ProcessIsRun(Exename: PChar):boolean; external 'ProcessIsRun@files:UFCPASSetupDll.dll stdcall setuponly';
function KillExe(Exename: PAnsiChar):integer; external 'KillExe@files:UFCPASSetupDll.dll stdcall setuponly';
function ProcessIsRun(Exename: PAnsiChar):boolean; external 'ProcessIsRun@files:UFCPASSetupDll.dll stdcall setuponly';
function GetExcelIsWin64(): Boolean; external 'GetExcelIsWin64@files:UFCPASSetupDll.dll stdcall setuponly';
procedure ClearTargetDir(TargetDir: string);
begin
......@@ -325,7 +327,7 @@ begin
if bInsForAllUser then
bRetValue := RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', aEnvName, sOrgValue)
else
bRetValue := RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', aEnvName, sOrgValue)
bRetValue := RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', aEnvName, sOrgValue);
sOrgValue := Trim(sOrgValue);
begin
S1 := aEnvValue;
......@@ -359,35 +361,7 @@ begin
end;
end else //非NT 系统,如Win98
begin
SL := TStringList.Create;
try
sFileName := ExpandConstant('{sd}\autoexec.bat');
LoadStringFromFile(sFileName, S1);
SL.Text := s1;
s1 := '"' + aEnvValue + '"';
s1 := 'set '+aEnvName +'=%path%;' + s1 ;
bRetValue := False;
x := SL.IndexOf(s1);
if x = -1 then
begin
if aIsInstall then
begin
SL.Add(s1);
bRetValue := True;
end;
end else //还没添加
if not aIsInstall then
begin
SL.Delete(x);
bRetValue := True;
end;
if bRetValue then
SL.SaveToFile(sFileName);
finally
SL.free;
end;
end;
end;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment