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.

    Vaio SR - Control volume with mode buttons

    Discussion in 'VAIO / Sony' started by Primes, Jan 5, 2010.

  1. Primes

    Primes Notebook Deity

    Reputations:
    919
    Messages:
    1,736
    Likes Received:
    718
    Trophy Points:
    131
    How to program your Vaio SR mode buttons to control volume.

    The buttons can be programmed to control volume up, down and mute, in addition to the normal launch programs and media functions. Click on the "setting" button (which launches Vaio Mode switch utility) and then double click on a buttons icon. You can select one of the preset items or manually select a program. We will use custom programs.

    To control volume we need to make 2 small VBScript files. One for Volume up and one for Volume down. You can also make one for mute, but since there is already a "preset" for mute we will use that.

    1. Open Notepad and copy the following code, then save each file with a .vbs extension:

    Volume up:
    Code:
    Set WshShell = CreateObject("WScript.Shell")
    
    WshShell.SendKeys(chr(175)) 
    Save this file as: volumeup.vbs


    Volume down:

    Code:
    Set WshShell = CreateObject("WScript.Shell")
    
    WshShell.SendKeys(chr(174)) 
    Save this file as: volumedown.vbs


    After saving the files you can test them out by clicking on each of them.

    You'll probably want to change the icon for each of these files so they look nice on the Vaio mode overlay. To do this create a shortcut for each file and right click on the shortcut then select properties > shortcut > change icon. you should see a bunch of icons to choose from, if not then browse to windows\system32\SHELL32.dll
    I choose the up and down arrows located next to the Internet Explorer "e". (note: I'm using Vista. Available Icons in other windows versions may be different)
    After you save your custom icons, take your 2 .vbs files and 2 shortcut files and put them in a new folder. I named my folder "sony volume".
    Now put this folder in your root c:/ drive. eg: c:/sony volume
    putting it in root will make it easier to work with later.

    - Now press your mode "Setting" button to launch Vaio mode switch utility.
    Double click on the button you want to change for Volume up. (I choose middle button).
    - Go to the "Explorer" tab at the top and expand "C:" drive and expand the new "sony volume" folder and select the "volumedown.lnk"
    - Repeat for Volume up.
    - For mute, I just used the Mute preset under "Recommended Functions" tab.
    - click "OK" to save and exit Vaio mode switch utility.

    Now that your done you should have a nice looking mode overlay like this:

    [​IMG]

    There are a couple limitation to using this. As far as I know you need to have Vaio mode switch utility installed and running. Also you can not hold the button down. You have to repeatedly press the button to change volume, and you can not repeatedly press the button too fast.

    You can also change the number in your .vbs code to do other things. For a full list of codes see this website:
    http://www.rolbe.com/2009/03/03/vb-keycode-chart/


    If you like this give rep :)

     
  2. alangt

    alangt Newbie

    Reputations:
    0
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    5
    Hey! I've registered to this forum just to say thanks for this post! The volume UP awesomely works like a charm... but the vol down... :( I just don't know why does not.
    I've googled for some answers, and all I find is that the 174 code should really work as the volume down.
    I'm using Windows 7 Home Premium 64bit on a VAIO VGN-SR430J.

    Any ideas from anybody?

    Thanks,
    Alan