我想使用 vbscript 从特殊文件夹中启动一个消息框 exe,但我什么也没得到。这是我的代码
option explicit
dim shellobj,startup,objShell,objFolder,filesystemobj,installdir,installname
set shellobj = wscript.createobject("wscript.shell")
set filesystemobj = createobject("scripting.filesystemobject")
Set objShell = CreateObject("Shell.Application")
installdir = "%appdata%\Microsoft"
installname = wscript.scriptname
filesystemobj.copyfile wscript.scriptfullname,installdir & installname,true
startup = shellobj.specialfolders("%appdata%\Microsoft") &"\msg.exe"
if filesystemobj.fileexists(startup) Then
shellobj.run "wscript.exe //B " & chr(34) & startup & chr(34)
Wscript.Quit
end if