The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Hotkey.exe functions

    Discussion in 'Sager and Clevo' started by 0xsergy, Jan 14, 2013.

  1. 0xsergy

    0xsergy Notebook Geek

    Reputations:
    2
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    15
    I have some questions regarding the actions that the Hotkey software actually does. To start off with, the power conservation options(energy star, balanced, etc). What do they actually change? Is it some link to the mobo that changes some function in the computer or is it just changing various windows power plan options? Next off, is there any way to use a command line argument to change the power plan IN the hotkey application for you? Finally, is there any way to change what the default Hotkey power plan settings are(such as turning the camera off in the 'Performance' plan by default instead of On)? I've looked for a file but I don't see one so they're either hardcoded into the executable or stored in the registry somewhere.

    EDIT: I've found some registry keys regarding the Hotkey application(well, everything except the default power plan settings which appear to be hardcoded). If you're interested it's in "HKEY_CURRENT_USER\Software\hotkey". It still doesn't allow me to change the settings on the fly because hotkey will only read those settings on startup(I think). An option would be to stop the process and start it up again causing it to read the changes, which would work albeit a bit sloppy.
     
  2. Zymphad

    Zymphad Zymphad

    Reputations:
    2,321
    Messages:
    4,165
    Likes Received:
    355
    Trophy Points:
    151
    I don't understand hotkey myself. It uses a lot of processes to do very little. And I really don't understand it's power settings either. What's really irritating is you can't customize the power settings either. Lame.
     
  3. 0xsergy

    0xsergy Notebook Geek

    Reputations:
    2
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    15
    I've been fiddling with this since yesterday and I've got a halfassed method working as is. I've found that PowerBiosServer outputs an event log on every time the power is dis/connected. It also puts out a log for each time hotkey.exe closes, etc, but at least each event had a custom Event Data description. I've got a task schedule that watches for this specific description and every time it's seen it runs a batch file which switches various power settings(puts it in energy saver, changes power plan to Power Saver) and when it's next reconnected it'll do the opposite. Problem with this is that if you shutdown the computer on power and launch it on battery, well, things might not work so well then. It's the best option. I already experimented with running an infinite loop with PowerShell which /did/ work perfectly, albeit it used 13%(one core) of my cpu at all times no matter what and that just isn't acceptable in my mind. Anyway, I need to test a couple things then I'll throw the files up here with some basic instructions as to what you must do for it to work on your PC(for example I don't know if the signature used for power plans is universal across all versions of windows or if it changes every time windows is installed(ie random)).
     
  4. Zymphad

    Zymphad Zymphad

    Reputations:
    2,321
    Messages:
    4,165
    Likes Received:
    355
    Trophy Points:
    151
    I don't understand what you wrote, but for the simple person, is it better for power settings to just use Windows default and uninstall hotkey or not?
     
  5. 0xsergy

    0xsergy Notebook Geek

    Reputations:
    2
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    15
    Probably best to leave it as is. I just like to fiddle with things. Anyway, I'll throw up all the files I used and I'll give a basic description here. The RefreshTray.exe is intended to refresh the tray icons because after you force close hotkey.exe the tray icon persists until you mouseover. This is just a little solution to get by that. The batch file is the one that actually does anything but the use behind the VBS file is so that the batch file runs without popping up on screen(aka hidden). Finally, the Battery Power Switcher.xml is my task scheduler event. Right click in task scheduler, select import, and select this file. All of these files are configured to be used directly from the C:\Automation folder. If you want them elsewhere it will break all the links in between them and you'll have to change those.

    As for the power plans. You'll have to go to the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\SysTray\BattMeter\Flyout" directory in regedit.exe and there it will list all your power plans. I have mine configured to switch between balanced and power saver but you can set it up as you prefer. For me the top entry is Balanced, middle is High Performance, and bottom one is Power Saver. Like I said, I don't know if your values will be the same as mine are. To change which powerplan is set when entering battery mode open up the batch file in notepad and go to the :EnablePS section. In there you'll see 3 REG ADD lines. The center one will be the one with the power plan settings. Replace the values(keep the quotations mind you) with the ones you want for battery and save. The same goes for the power plan you want when plugged into AC. It's located in the same place under :EnablePRF. Don't mind :EnablePS2. It won't be doing anything at this point in time, it is just there if I feel like adding mode code to it. Also, if you want to use performance instead of balanced for EnergyStar change the value under :EnablePRFs first REG ADD key to "3" instead of "2".

    Also, I made the keyboard LEDs turn off on battery(since i'm OCD like a about excessive power waste). If you don't like this remove the 3rd REG ADD key from both :EnablePS and :Enable PRF. I think that covers just about everything. If you're unsure of something just ask.

    By downloading this file you accept all risks blah blah blah.
    View attachment 90388

    Also. If you shut down the laptop while plugged in and start it while on battery the cycle order will be reversed(this script relies on a very basic toggle as to minimize resource usage). Just create a shortcut to the VBS file and throw it in your start menu so that you can just quickly click that if needed to correct the order. It also requires Hotkey to be installed to work(as some of the settings are changed through the hotkey registry files).

    Alright, scratch everything. My file up there probably won't work anymore. For some reason PowerBIOSServer_OUT changed its behaviour. It now outputs two different codes for plugged in versus unplugged. No idea why.

    EDIT AGAIN: Alright, I see how it works now. The event log that I was hitching onto was actually just the PowerBIOSServer_OUT changing my brightness between battery vs ac mode(the default windows function). I gave my balanced profile a specific battery brightness(about halfway) which made it create a secondary event log when changing my brightness down vs back to full. Now I just need to figure out how to make this foolproof so that even if you change the brightness it resets it to default before leaving the profile.

    Another problem. This also severely limits your ability to change the brightness. I think that this is all a futile effort. Removed the download.
     
  6. beanwolf

    beanwolf Notebook Consultant

    Reputations:
    38
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    30
    As for power options, I've found the "Energy Star" setting does nothing but slow down your system to a crawl with no power benefit really. I run "Balanced" on battery and then "Performance" when plugged in. I wouldn't uninstall Hotkey though, best to probably leave it as it is.
     
  7. bodosko

    bodosko Notebook Consultant

    Reputations:
    32
    Messages:
    188
    Likes Received:
    52
    Trophy Points:
    41
    I just use it for FN hotkeys. It's really practice to see if trackpad/webcam are enabled or see current brightness/volume level.