From 9d4d5df81e3667c5c669ae1f50cadf5fd5213416 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 30 Jan 2024 10:30:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B8=E8=BD=BD=E8=BD=AF=E4=BB=B6=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EI_Med_Viewer_Installer.csproj | 14 ++++++++++---- Other/510k-UnInstall/Program.cs | 24 ++++++++++++------------ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/EI_Med_Viewer_Installer.csproj b/EI_Med_Viewer_Installer.csproj index b6745ae..3673b79 100644 --- a/EI_Med_Viewer_Installer.csproj +++ b/EI_Med_Viewer_Installer.csproj @@ -15,6 +15,12 @@ 1.0.0.001 + + + + + + @@ -49,11 +55,11 @@ - + - - - + + + diff --git a/Other/510k-UnInstall/Program.cs b/Other/510k-UnInstall/Program.cs index 702dbf0..e6087f2 100644 --- a/Other/510k-UnInstall/Program.cs +++ b/Other/510k-UnInstall/Program.cs @@ -101,15 +101,15 @@ var configFolder = $@"C:\ProgramData\.xingcang\"; var configPath = Path.Combine(configFolder, "config.json"); if (!File.Exists(configPath)) { - MyLog("The current system does not have an imaging system deployed and does not need to be uninstalled."); + MyLog("EI-Med Viewer has not been installed. No need to uninstall."); Console.ReadLine(); } else { Console.ForegroundColor = ConsoleColor.Red; MyLog(""); - MyLog("Warning: Uninstalling the EI-Med Viewer service will clear the background services, databases, website files and all running data records, so please operate with caution. Before uninstalling, make sure your data has been backed up."); - MyLog(" Are you sure you want to continue uninstalling the service?(Y/N)"); + MyLog("Warning: uninstalling EI-Med Viewer service will clear backend service, database, website files and all data records of the operation. Please make sure data has been backed up."); + MyLog(" Continue to uninstall the service?(Y/N)"); Console.ResetColor(); string confirm = Console.ReadLine(); @@ -118,7 +118,7 @@ else // 执行卸载操作 try { - MyLog("Start reading activation information..."); + MyLog("Start reading the activation information..."); var appsettingsJson = File.ReadAllText(configPath); @@ -141,7 +141,7 @@ else nginxServiceName = jObject["nginxServiceName"]?.ToString(), nginxServiceEXEPath = jObject["nginxServiceEXEPath"]?.ToString(), }; - MyLog("The activation information has been read, and start preparing for uninstall..."); + MyLog("Activation information has been read. Prepare to uninstall…"); Process process = new Process(); process.StartInfo.FileName = "cmd.exe"; @@ -153,7 +153,7 @@ else process.Start(); - MyLog("Stop and uninstall nginx service..."); + MyLog("Stop and uninstall Nginx service..."); await ProcessStandardInputAsync(process, $" {configObj.nginxServiceEXEPath} uninstall ", configObj.nginxStartPath); await ProcessStandardInputAsync(process, $"sc stop {configObj.nginxServiceName}"); await ProcessStandardInputAsync(process, $"sc delete {configObj.nginxServiceName}"); @@ -171,14 +171,14 @@ else - MyLog("Stop and uninstall the backend service..."); + MyLog("Stop and uninstall the backend service."); await ProcessStandardInputAsync(process, $"sc stop {configObj.serviceName}"); await ProcessStandardInputAsync(process, $"sc delete {configObj.serviceName}"); - MyLog("If the database is being used by other processes or connections, deletion will fail. You can manually delete the remaining database after uninstalling."); - MyLog("Execute the command of delete database..."); + MyLog("The database cannot be deleted while being used by other processes or connections. After uninstallation, please delete the remaining database manually."); + MyLog("Execute the command of deleting database."); await ProcessStandardInputAsync(process, $@" SQLCMD -S {configObj.server} -U {configObj.user} -P {configObj.password} -Q ""DROP DATABASE {configObj.dbName}"" "); @@ -193,8 +193,8 @@ else MyLog("Delete activation information..."); DeleteFolderContents(configFolder); - MyLog("The EI-Med Viewer uninstallation is completed."); - MyLog("Automatically exit after 3 seconds..."); + MyLog("The EI-Med Viewer service has been uninstalled."); + MyLog("Will automatically exit in 3 seconds…"); await Task.Delay(3000); string cmdArgs = $"/C ping 127.0.0.1 -n 3 & rmdir /s /q \"{configObj.deployFolder}\""; @@ -209,7 +209,7 @@ else catch (Exception ex) { - MyLog("Problems encountered during uninstallation:" + ex.Message + " Please check whether there are other programs occupying related resources, please confirm and then uninstall again."); + MyLog("Problems encountered during the uninstallation process: " + ex.Message + " Please check whether other applications are occupying relevant resources. Once confirmed, try to uninstall again."); Console.ReadLine(); }