NuclearVW Posted June 29, 2012 Share Posted June 29, 2012 Hello, I am looking to write a script that only runs when my laptop is in the docking station. How might I do this? If this is impossible,I could also use an if statement for if my laptop is connected to a specific network. Its my work laptop, and it only is connectd to the network if its docked, and I don't want my script to continue running if its not on the network. T.I.A Link to comment Share on other sites More sharing options...
jdelaney Posted June 29, 2012 Share Posted June 29, 2012 (edited) I like the idea of checking the network...another thing you can look into are your environment variables...run a CMD and enter Set with and without docking, and see if there are any differences you can key off of...possibly SESSIONNAME or USERDOMAIN Edited June 29, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
abberration Posted June 30, 2012 Share Posted June 30, 2012 Does this help? $var = RegRead("HKEY_CURRENT_USER\Control Panel\PowerCfg", "CurrentPowerPolicy") ;Your power policies are numbered. When docked, it will become a different number from being undocked. MsgBox(4096, "Your current power config policy is: ", $var) Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now