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!

How to launch vbs or js script in the background?

Status
Not open for further replies.

maysider

Technical User
Apr 5, 2006
15
CZ
How to launch vbs or js script in the background? I am using a remote controller and when I launch any vbs script by the remote controller and at the same time the wmplayer (for example) is playing, sometimes happens, that the wmplayer is de-activated (is not an active window because of start the vbs script). So since the time I am not able to cotroll the wmplayer by the remote controll. Is any way to treat this? thanx
 
As part of security changes since Windows 2000 SP2, any remote process will launch in the background and not be interactive.

I am not sure I totally follow your question. Are you saying you want to remote control the media player? If you are looking to interact with the current user session, take a look at Sysinternals PSEXEC which is a freeware utility that will let you do this.

I hope you find this post helpful.

Regards,

Mark
 
not "remote process", but I am using an infrared remote control, which starts by "Girder 3" any file.vbs. And here is a problem - launching causes de-activating the wmplayer (wmplayer is no more active window), so no more I can not control the wmplayer by the IR remote control. I have to manually activate the wmplayer by click or "alt+tab".
 
You can script the Alt+Tab with Sendkeys.

Code:
Set WshShell = CreateObject("Wscript.Shell")
WshShell.SendKeys "%{TAB}"

Does that address your problem?


I hope you find this post helpful.

Regards,

Mark
 
unfortunately described event happens only sometimes, so this doesn't solve my problem :(
 
You other option then is to use AppActivate which will always grab the app you want forward even if it is already forward.

I hope you find this post helpful.

Regards,

Mark
 
yes, this is sufficient, thanx. Maybe would be more sufficient, if I knew command for "If is any application activated (in the foreground), then...."
I have been founding this, but I haven't found it.
thanx a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top