Wednesday, August 24, 2011

Run separate explorer window as Admin

This can be accomplished in 2 ways:

1. best, most reliable method, uses undocumented /separate switch, launches explorer in a separate process

runas /u:domain\username "explorer.exe /separate"

2. Per-user setting, but can be set in default user profile so that it works for all users

in an explorer window: Folder Options>View tab>Advanced Settings>Launch folder windows in a separate process.
If this setting is enabled, then the command below will work (without the /separate switch)

runas /u:domain\username explorer.exe

Wednesday, August 17, 2011

Change Windows 7 critical battery level

POWERCFG -SETDCVALUEINDEX a1841308-3541-4fab-bc81-f71556f20b4a e73a048d-bf27-4f12-9731-8b2076e8891f 9a66d8d7-4ff7-4ef9-b5a2-5a326ca2a469 1

POWERCFG -SETACVALUEINDEX a1841308-3541-4fab-bc81-f71556f20b4a e73a048d-bf27-4f12-9731-8b2076e8891f 9a66d8d7-4ff7-4ef9-b5a2-5a326ca2a469 1

Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)
Subgroup GUID: e73a048d-bf27-4f12-9731-8b2076e8891f (Battery)
Power Setting GUID: 9a66d8d7-4ff7-4ef9-b5a2-5a326ca2a469 (Critical battery level)
Current DC Power Setting Index: 1 (1%)

Google Chrome prevents Windows 7 from sleep

see http://www.google.com/support/forum/p/Chrome/thread?tid=3b1d41b0663a4d40&hl=en

in a command window:
powercfg -requestsoverride PROCESS chrome.exe awaymode display system

to remove the override:
powercfg -requestsoverride PROCESS chrome.exe

source:
http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A97E-CE7CE0D98DC2/AvailabilityRequests.docx.

more far-reaching fix if you have a 'Pro' version of windows 7 - editing local group policy:
start>Run>gpedit.msc
Computer Configuration>Administrative Templates>System>Power Management>Sleep Settings>

Set
Allow Applications to Prevent Automatic Sleep (On Battery)
and
Allow Applications to Prevent Automatic Sleep (Plugged In)

to disabled.

but this applies to ALL applications, not just chrome.