Need help to finish this one a little stuck
Error is object required:"
I'm not sure if I'm passing the response on correctly either.
Does the Case need to be 1 or "1" neither working
MCSE NT to 2012, MCITP:EA/SA, MCSA, MCDBA, MCTS, MCP+I, MCP
Error is object required:"
I'm not sure if I'm passing the response on correctly either.
Does the Case need to be 1 or "1" neither working
Code:
Dim bullet
Dim response
Dim objFSO:Set objFSO = CreateObject("Scripting.FileSystemObject")
bullet = Chr(10) & " " & Chr(149) & " "
Do
response = InputBox("Please enter the script number you wish to run next:" & Chr(10) & bullet & "1.) MoveToCopyTo" & bullet & "2.) RegistryEntries" & bullet & "3.) CreateFolders" & bullet & "4.) Wallpaper" & bullet & "5.) DescriptioninAD" & Chr(10), "Select Thing")
If response = "" Then WScript.Quit 'Detect Cancel
If IsNumeric(response) Then Exit Do 'Detect value response.
MsgBox "You must enter a numeric value.", 48, "Invalid Entry"
Loop
result = response
Select Case result
Case "1"
strFolder = objFSO.GetParentFolderName(WScript.ScriptFullName)
sf = (strFolder & "\2GTDBNMoveToCopyTo.vbs")
WshShell.Run(chr(34) & sf & chr(34))
Case "2"
strFolder = objFSO.GetParentFolderName(WScript.ScriptFullName)
sf = (strFolder & "\3GTDBNRegistryEntries.vbs")
WshShell.Run(chr(34) & sf & chr(34))
Case "3"
strFolder = objFSO.GetParentFolderName(WScript.ScriptFullName)
sf = (strFolder & "\4GTDBNCreateFolders.vbs")
WshShell.Run(chr(34) & sf & chr(34))
Case "4"
strFolder = objFSO.GetParentFolderName(WScript.ScriptFullName)
sf = (strFolder & "\5GTDBNWallpaper.vbs")
WshShell.Run(chr(34) & sf & chr(34))
Case "5"
strFolder = objFSO.GetParentFolderName(WScript.ScriptFullName)
sf = (strFolder & "\6DescriptioninAD.vbs")
WshShell.Run(chr(34) & sf & chr(34))
End Select
MCSE NT to 2012, MCITP:EA/SA, MCSA, MCDBA, MCTS, MCP+I, MCP