Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with WSUS script for Server 2008 core

Posted on 2009-04-08
2
Medium Priority
?
645 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 31

Accepted Solution

by:
merowinger earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to install and use the NTBackup utility that comes with Windows Server.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

636 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