Quantcast
Channel: We Got Served Forums - New Posts
Viewing all articles
Browse latest Browse all 5022

How To Automatically Minimize Launchpad On Start Up

$
0
0
I created a VBScript to Start and then Minimize Launchpad.

First I turned Off automatic start of Launchpad. Launchpad, \/, settings, Start up option, Uncheck “Automatically run the Launchpad when I log on to Windows”.

Using Notepad I saved the script below as Launchpad.vbs adding it to the Programs\Startup folder.

Set objShell = CreateObject("WScript.Shell")
objShell.CurrentDirectory = "C:\Program Files\Windows Server\Bin\"
objShell.Exec "C:\Program Files\Windows Server\Bin\Launchpad.exe"
Do Until Success = True
Wscript.Sleep 1000
Success = objShell.AppActivate("Windows Home Server 2011 Launchpad")
Loop
Do Until Success = False
objShell.SendKeys "%{F4}"
Wscript.Sleep 1000
Success = objShell.AppActivate("Windows Home Server 2011 Launchpad")
Loop

I have tested the script with XP and Win 7 (64 bit).


UPDATE - 10/24/2011

Here is different VBS script for closing Launchpad. With this script you do not turn off the automatic start of Launchpad as above. You can adjust the sleep times as needed for best performance with your PC.

Using Notepad, save the code below as Launchpad.vbs adding it to the Programs\Startup folder:

Set objShell = CreateObject("WScript.Shell")
Wscript.Timeout = 420
Do Until Success = True
Wscript.Sleep 3000
Success = objShell.AppActivate("Windows Home Server 2011 Launchpad")
Loop
Wscript.Sleep 18000
Do Until Success = False
objShell.AppActivate("Windows Home Server 2011 Launchpad")
objShell.AppActivate("Windows Home Server 2011 Launchpad")
objShell.SendKeys "% "
objShell.SendKeys "C"
Wscript.Sleep 2000
Success = objShell.AppActivate("Windows Home Server 2011 Launchpad")
Loop

UPDATE 1/6/2012
bobbyc asked me to create a verison of the script that would automatically close Launchpad if it was left open for 30 seconds. The script below will perform the initial closure on startup, then if Launchpad is reopened it will close it after 30 seconds. The script will run continously, the only way to stop it is open Task Manager and kill the wscript.exe process. Althought it is always running it does now seem increase CPU usage. Enjoy

Using Notepad, save the code below as Launchpad.vbs adding it to the Programs\Startup folder:

Set objShell = CreateObject("WScript.Shell")
Do Until Success = True
Wscript.Sleep 3000
Success = objShell.AppActivate("Windows Home Server 2011 Launchpad")
Loop
Wscript.Sleep 18000
Do Until Success = False
objShell.AppActivate("Windows Home Server 2011 Launchpad")
objShell.AppActivate("Windows Home Server 2011 Launchpad")
objShell.SendKeys "% "
objShell.SendKeys "C"
Wscript.Sleep 5000
Success = objShell.AppActivate("Windows Home Server 2011 Launchpad")
Loop
Do Until Date() = 0
Do Until Success = True
Wscript.Sleep 2000
Success = objShell.AppActivate("Windows Home Server 2011 Launchpad")
Loop
Wscript.Sleep 30000
Do Until Success = False
objShell.AppActivate("Windows Home Server 2011 Launchpad")
objShell.AppActivate("Windows Home Server 2011 Launchpad")
objShell.SendKeys "% "
objShell.SendKeys "C"
Wscript.Sleep 1000
Success = objShell.AppActivate("Windows Home Server 2011 Launchpad")
Loop
Loop

Viewing all articles
Browse latest Browse all 5022

Trending Articles