Ban*_*jer 4 vbscript 64-bit startup
我有一个VB脚本,它添加了Windows Startup文件夹的程序快捷方式.在我的脚本中,我能够使用以下方法检索32位Windows中的Startup文件夹位置:
Set objShell = CreateObject("WScript.Shell")
startupFolder = objShell.SpecialFolders("Startup")
Run Code Online (Sandbox Code Playgroud)
但是当我在64位Windows上尝试时,它什么都不返回.具体来说,我正在测试64位Vista.我似乎无法找到适当的环境变量或语法.谢谢.
尝试使用该Shell.Application对象的替代变体:
Const ssfSTARTUP = &H7
Set oShell = CreateObject("Shell.Application")
Set startupFolder = oShell.NameSpace(ssfSTARTUP)
If Not startupFolder Is Nothing Then
WScript.Echo startupFolder.Self.Path
End If
Run Code Online (Sandbox Code Playgroud)
对你起作用吗?