Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a program that is always starting up with an annoying 'Register Now?' window. I do not wish to register ever and would love to not have to close it every time.

Is this possible? I know you can modify the target by adding ' -command' after the "target_path" but I don't know what command I need.

To close the window by the keyboard you press TAB then ENTER.

share|improve this question
To be sure: Is this Windows? – Tom Wijsman Jan 20 '11 at 19:53

It depends on what program you're trying to do this. Some allow, others don't. Most probably, there's no way around this.

share|improve this answer

You should be able to accomplish this using a Windows script via Windows Script Host. I'm can't test this for you, but a script along these lines should start you in the right direction:

var WshShell = WScript.CreateObject("WScript.Shell"); #create shell
WshShell.Run("YOUR PROGRAM HERE");           # run your program
WScript.Sleep(100);                          # wait for it to launch
WshShell.AppActivate("YOUR PROGRAM HERE");   # bring your program to the front

Save that to RunMyApp.js or something and give it a go!

References: Writing JScript and the SendKeys Method

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .