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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

command line - imputting popup prompt answer

Status
Not open for further replies.

wiimike

IS-IT--Management
Mar 30, 2007
145
US
Hey guys,

Sorry for the possible misplacement of this thread, I honestly don't know what type of programming batch files are.

I'm trying to write a batch file to do something I do with start -> run ->type it in -> hit enter.

I have it down to the hit enter but am stuck.

basically, I have a command that fixes the database files for some group policy stuff (on a desktop PC), "esentutl /p c:\Windows\Security\database\secedit.sdb" and I want to make it a bat file that doesn't prompt the user at all, and just fixes what I need to fix.

so I made a file with a .bat extension, containing
Rem * this is to fix the Group Policy database file(or something close) to allow group policies to take affect *
esentutl /p c:\Windows\Security\database\secedit.sdb

When this runs it prompts the user with "ok" or "cancel" options. I want to make it hit "ok". and I'd also preferably but it's a separate issue prevent a window from coming up at all.

Any idea how to do this? You guys have screwed with command line'ish scripting a lot more than I have, was hoping you could shed some light
 
not familiar with the "esentutl" dos command... if there is any...

if its a windows pop up your try to quelch you might try AUTOIT from
that might solve your problem.

hope that helps.
ccastelein
 
esentutl /p c:\Windows\Security\database\secedit.sdb /o

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
That's a Windows utility, not a DOS command.

I second the idea of using Auto IT. It's easier than using WSH and VBScript, and will compile to executables. You can also build real programs with it, though not as easily as with programming languages designed for that purpose.

With Auto IT, you can enter text in windows that pop up, move and click the mouse, many things automated like that.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top