Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendkey to DOS window

Status
Not open for further replies.

sfriday

IS-IT--Management
Feb 23, 2002
211
DE
All,

I am issuing a command as follows

WSH.RUN("GPUPDATE /SYNC")

This runs from a DOS window and then requires a Yes answer twice, how can I pipe a Y to respond. I tried Sendkey but does not work with DOS.

Any ideas

Steve
 
SWAG, but if you're on NT/2K, try:

Set oShell = CreateObject("WScript.Shell")
oShell.Run "cmd /K gpupdate /SYNC & Y & Y",1,True Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top