• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 646
  • Last Modified:

Problem with WSUS script for Server 2008 core

I am testing Server 2008 Core and cannot get the script at http://msdn.microsoft.com/en-us/library/aa387102(VS.85).aspx to work properly. It runs fine up to the point where it asks if I want to install the updates if found, I must answer Y/N but the dialog box only has OK. Y or N on the kb has no affect and clinking OK gives me a script error for line 61 (where it asks for my Y or N input), the error is "the handle is invalid".

Why is my dialog box coming up with just OK when it should be Yes or No? The relevant code is below, all of the code is at the link above.
<snip>
 
WScript.Echo  vbCRLF & "Would you like to install updates now? (Y/N)"
strInput = WScript.StdIn.Readline
WScript.Echo 
 
If (strInput = "N" or strInput = "n") Then 
	WScript.Quit
ElseIf (strInput = "Y" or strInput = "y") Then
	WScript.Echo "Installing updates..."
 
 
</snip>

Open in new window

0
LarryDAH
Asked:
LarryDAH
1 Solution
 
merowingerCommented:
may it works with a vbscript msgbox

strInput = MsgBox ("Would you like to install updates now? (Yes/No)",vbYesNo)
 
If strInput = vbNo Then
	WScript.Quit
ElseIf strInput = vbYes Then
	WScript.Echo "Installing updates..."
Else
	WScript.Echo "Anything else"
End If

Open in new window

0
 
LarryDAHAuthor Commented:
Thanks, that did it. I made a small tweak and added some text back in to show when the updates finished but you got me past the yes/no issue.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now