0
我想創建一個VB腳本來爲微軟Kodu創建的圖標爲使用系統帳戶時通過微軟SCCM部署時,不要讓創建的圖標(一個真正的痛苦。)與子文件夾
創建開始菜單圖標我從一些朋友那裏得到了一些關於將文件夾創建任務分成兩個步驟的建議,一個針對「Microsoft Research」,另一個針對「Kodu遊戲實驗室」,但是我被卡在19行,字符2 - 我猜我我正在做一個經典的n00b錯誤,因爲我對腳本相當陌生!
有什麼建議嗎? 這裏是我的腳本:
Dim shell, Objfso, allStartMenu, myShortcut, allProgramMenuMR, allProgramMenuKodu
Set Objfso = CreateObject("Scripting.FileSystemObject")
Set shell = WScript.CreateObject("WScript.Shell")
'Tells script how to get to All Users Start Menu
allProgramMenu = shell.SpecialFolders("AllUsersPrograms")
'Tells script to check if Microsoft Research start menu folder exists and creates it if necessary.
allProgramMenuMR = allProgramMenu + "\\Microsoft Research"
if not Objfso.FolderExists (allProgramMenuMR) Then
Objfso.CreateFolder (allProgramMenuMR)
End If
'Tells script to check if Kodu Game Lab start menu folder exists and creates it if necessary.
allProgramMenuKodu = allProgramMenu + allProgramMenuMR + "\\Kodu Game Lab"
if not Objfso.FolderExists (allProgramMenuKodu) Then
Objfso.CreateFolder (allProgramMenuKodu)
End If
' Create Kodu Game Lab shortcut
Set myShortcut = shell.CreateShortcut(allProgramMenuKodu + allProgramMenuMR + "\\Kodu Game Lab.lnk")
myShortcut.TargetPath = "C:\Program Files (x86)\Microsoft Research\Kodu Game Lab\Boku.exe"
myShortcut.Arguments = "/NoUpdate /NoInstrumentation"
myShortcut.WorkingDirectory = ""
myShortcut.WindowStyle = 4
myShortcut.Description = "Launch Kodu Game Lab."
myShortcut.Save()
' Create Configure Kodu Game Lab shortcut
Set myShortcut = shell.CreateShortcut(allProgramMenuKodu + allProgramMenuMR + "\\Configure Kodu Game Lab.lnk")
myShortcut.TargetPath = "C:\Program Files (x86)\Microsoft Research\Kodu Game Lab\BokuPreBoot.exe"
myShortcut.WorkingDirectory = "C:\Program Files (x86)\RSA Security\RSA Authentication Manager\prog\"
myShortcut.WindowStyle = 4
myShortcut.Description = "Launch Kodu Game Lab Configuration Utility"
myShortcut.Save()