美化windows下的system弹窗

This commit is contained in:
fofolee
2025-01-12 21:53:21 +08:00
parent a54d528fb8
commit 8038ed28f4
2 changed files with 193 additions and 50 deletions

View File

@@ -184,7 +184,7 @@ if (process.platform === "win32") {
// 运行vbs脚本
quickcommand.runVbs = function (script) {
return new Promise((reslove, reject) => {
var tempfile = getQuickcommandTempFile("vbs", "TempVBSScript");
var tempfile = getQuickcommandTempFile("vbs");
fs.writeFile(tempfile, iconv.encode(script, "gbk"), () => {
child_process.exec(
`cscript.exe /nologo "${tempfile}"`,
@@ -243,8 +243,8 @@ if (process.platform === "win32") {
return reject("未安装.NET Framework");
}
// 写入临时文件
let tempCsharpFile = getQuickcommandTempFile("cs", "TempCsharpScript");
let tempBuildFile = getQuickcommandTempFile("exe", "TempCsharpBuildExe");
let tempCsharpFile = getQuickcommandTempFile("cs");
let tempBuildFile = getQuickcommandTempFile("exe");
fs.writeFile(tempCsharpFile, iconv.encode(script, "gbk"), (err) => {
if (err) return reject(err.toString());