Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
WScript.Sleep(100);
WshShell.SendKeys("{TAB}");
WshShell.SendKeys("{ENTER}");

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

References: Writing JScript and the SendKeys Method

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.