得力打包脚本解决判断app是否运行与华高混淆的问题

This commit is contained in:
luoliangyi 2023-08-30 14:05:25 +08:00
parent 65ab6213da
commit 7c2b1c9adb
7 changed files with 13 additions and 16 deletions

View File

@ -116,7 +116,12 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
else if (-1 != strCmdLine.Find(L"OEM_NEUTRAL")) else if (-1 != strCmdLine.Find(L"OEM_NEUTRAL"))
{ {
strAppGuid = "{05E346E5-D4F2-410C-A2AB-62E416E13996}_is1"; strAppGuid = "{05E346E5-D4F2-410C-A2AB-62E416E13996}_is1";
strAppName = "HGScan.exe"; strAppName = "NeuScan.exe";
}
else if (-1 != strCmdLine.Find(L"OEM_DELI"))
{
strAppGuid = "{84E0B104-C723-4B6F-8F5B-C4AC23EBB91F}_is1";
strAppName = "DELI SCAN.exe";
} }
else else
{ {

View File

@ -334,6 +334,10 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
{ {
return 0; return 0;
} }
else if (-1 != strCmdLine.Find(L"OEM_DELI"))
{
return 0;
}
else else
{ {
strAppGuid = "InstallShield_{6BE74035-CDC8-4CBF-937C-EBC08A9D6233}"; strAppGuid = "InstallShield_{6BE74035-CDC8-4CBF-937C-EBC08A9D6233}";

View File

@ -220,7 +220,7 @@ begin
globalInstallPath := GetInstallString(); globalInstallPath := GetInstallString();
CmdStr := GetCmdTail(); CmdStr := GetCmdTail();
ExtractTemporaryFile('RemoveOldApp.exe'); ExtractTemporaryFile('RemoveOldApp.exe');
if Exec(ExpandConstant('{tmp}\RemoveOldApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then if Exec(ExpandConstant('{tmp}\RemoveOldApp.exe'), 'OEM_DELI', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
begin begin
if 0 = ErrorCode then if 0 = ErrorCode then
begin begin
@ -276,16 +276,15 @@ var
ErrorCode: Integer; ErrorCode: Integer;
begin begin
Result := false; Result := false;
if Exec(ExpandConstant('{app}\CheckNewApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then if Exec(ExpandConstant('{app}\CheckNewApp.exe'), 'OEM_DELI', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
begin begin
if 0 = ErrorCode then if 0 = ErrorCode then
begin begin
ShellExec('', ExpandConstant('{app}\DLUpgradeApp.exe'), '-type=postuninstallinfo -appName=Scanner -oemName=Deli -desc=uninstall', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
Result := true; Result := true;
end end
else else
begin begin
MsgBox(ExpandConstant('{cm:MyStr4}'), mbInformation, MB_OK); MsgBox('请先关闭扫描软件!', mbInformation, MB_OK);
end end
end end
end; end;
@ -295,17 +294,6 @@ begin
if CurPageID = wpFinished then if CurPageID = wpFinished then
begin begin
SetUninstallIcon(ExpandConstant('{app}\DeliScan_App.ico')); SetUninstallIcon(ExpandConstant('{app}\DeliScan_App.ico'));
DeleteFile(ExpandConstant('{win}\twain_32\DeliTwain\delitwain401D.ds'));
DeleteFile(ExpandConstant('{win}\twain_32\DeliTwain\delitwain401E.ds'));
DeleteFile(ExpandConstant('{win}\twain_32\DeliTwain\delitwain401F.ds'));
DeleteFile(ExpandConstant('{win}\twain_32\DeliTwain\delitwain4020.ds'));
DeleteFile(ExpandConstant('{win}\twain_64\DeliTwain\delitwain4021.ds'));
DeleteFile(ExpandConstant('{win}\twain_64\DeliTwain\delitwain4022.ds'));
DeleteFile(ExpandConstant('{win}\twain_64\DeliTwain\delitwain4016.ds'));
DeleteFile(ExpandConstant('{win}\twain_64\DeliTwain\delitwain4017.ds'));
DeleteFile(ExpandConstant('{win}\twain_64\DeliTwain\delitwain4018.ds'));
DeleteFile(ExpandConstant('{win}\twain_64\DeliTwain\delitwain401A.ds'));
DeleteFile(ExpandConstant('{win}\twain_64\DeliTwain\delitwain401B.ds'));
DelTree(ExpandConstant('{win}\twain_32\DeliTwain\x86'), True, True, True); DelTree(ExpandConstant('{win}\twain_32\DeliTwain\x86'), True, True, True);
DelTree(ExpandConstant('{win}\twain_32\DeliTwain\x64'), True, True, True); DelTree(ExpandConstant('{win}\twain_32\DeliTwain\x64'), True, True, True);
end; end;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.