Solved

Problem with WSUS script for Server 2008 core

Posted on 2009-04-08
2
635 Views
Last Modified: 2012-06-21
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
Comment
Question by:LarryDAH
2 Comments
 
LVL 31

Accepted Solution

by:
merowinger earned 500 total points
ID: 24152467
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
 

Author Comment

by:LarryDAH
ID: 24196123
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now