提供不同虚拟桌面启动应用的功能

This commit is contained in:
2026-02-13 23:23:22 +08:00
parent 392adc304c
commit f7df3ebeb3
2 changed files with 49 additions and 0 deletions

21
SilentStart.vbs Normal file
View File

@@ -0,0 +1,21 @@
Set WshShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
' 获取当前 .vbs 脚本的完整路径
fullPath = WScript.ScriptFullName
' 获取该脚本所在的文件夹路径
currentDir = fso.GetParentFolderName(fullPath)
' 拼接出同目录下的 AutoStart.bat 完整路径
batPath = currentDir & "\AutoStart.bat"
' 检查文件是否存在,防止路径错误导致无反应
If fso.FileExists(batPath) Then
WshShell.Run chr(34) & batPath & chr(34), 0
Else
MsgBox "找不到文件: " & batPath, 16, "路径错误"
End If
Set WshShell = Nothing
Set fso = Nothing