From c92078b931cc5ce9f29fd52f47e032c9ae86acdc Mon Sep 17 00:00:00 2001 From: xkeyC <3334969096@qq.com> Date: Mon, 6 Nov 2023 23:56:09 +0800 Subject: [PATCH] fix --- lib/common/helper/system_helper.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/common/helper/system_helper.dart b/lib/common/helper/system_helper.dart index 4537cf6..8766bf3 100644 --- a/lib/common/helper/system_helper.dart +++ b/lib/common/helper/system_helper.dart @@ -183,15 +183,15 @@ foreach ($adapter in $adapterMemory) { static initVBS() async { final script = ''' - If Not WScript.Arguments.Named.Exists("elevate") Then +If Not WScript.Arguments.Named.Exists("elevate") Then CreateObject("Shell.Application").ShellExecute WScript.FullName _ , """" & WScript.ScriptFullName & """ /elevate", "", "runas", 1 WScript.Quit End If - - Set WshShell = WScript.CreateObject("WScript.Shell") - exeName = """${Platform.resolvedExecutable}""" - statusCode = WshShell.Run(exeName, 1, true) +Dim objShell +Set objShell = WScript.CreateObject( "WScript.Shell" ) +objShell.Run("""${Platform.resolvedExecutable}""") +Set objShell = Nothing '''; final vbsFile = File(AppConf.launchHelperPath); if (await vbsFile.exists()) {