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.

    Want to create .reg file to switch game resolution

    Discussion in 'Windows OS and Software' started by andros_forever, Jan 14, 2011.

  1. andros_forever

    andros_forever Notebook Deity

    Reputations:
    141
    Messages:
    954
    Likes Received:
    0
    Trophy Points:
    30
    What I need help in doing is creating a .reg file on my desktop that I can double click on and will modify my registry key's hexadecimal value.

    HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\Video\reswidth
    and
    HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\Video\resheight
    are the ones I want to modify.

    The hexadecimal value of a 1920 width resolution is "720" and I want a .reg file on the desktop that will change that value to 1280 width resolution aka a hexadecimal value of "500". In the same file I would want the resheight key to be changed from 1200p resolution to 720p resolution.
    Then I can make another .reg file to switch back to 1920x1200 but if you have an idea I am open to suggestion.

    Do you know how I can do this?
     
  2. ViciousXUSMC

    ViciousXUSMC Master Viking NBR Reviewer

    Reputations:
    11,461
    Messages:
    16,824
    Likes Received:
    76
    Trophy Points:
    466
    just shortcut to rededit and change it each time?

    or export a reg backup of each version?

    If I was you I would just have 2 game .exe shortcuts and add the -reswidth and -resheight command line parameters to it, then the game exe itself will set the value.
     
  3. andros_forever

    andros_forever Notebook Deity

    Reputations:
    141
    Messages:
    954
    Likes Received:
    0
    Trophy Points:
    30
    I've tried using the -reswidth and -resheight parameters on shortcuts but they don't work for Wc3 and most other games unfortunately. And I don't want a reg backup of each version, I know there is a way to do this (maybe ever through a .bat file?)
     
  4. newsposter

    newsposter Notebook Virtuoso

    Reputations:
    801
    Messages:
    3,881
    Likes Received:
    0
    Trophy Points:
    105
    you want to be very very careful playing around with .reg files to do something as mundane as switching vid card resolutions.

    Have you looked at the driver for your vid card, then enthusiast boards for that vid card (not here), the enthusiast boards for your game, anyplace to see if there is a 'safer' utility that will let you manipulate things.

    Writing to the registry is not error checked, even after 10 years. The OS 'assumes' you know what you are doing and that there are no errors.

    If you make a mistake, if your system has a hiccup in the middle, you can easily end up with a machine that could be bootable into safe mode only or worse, not bootable at all.
     
  5. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205
    Backup just the "HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\Video" node. It will create a reg file. Copy it and make two versions one for each resolution you want.

    Gary
     
  6. Pirx

    Pirx Notebook Virtuoso

    Reputations:
    3,001
    Messages:
    3,005
    Likes Received:
    416
    Trophy Points:
    151
    That's not what he wants to do. All he wants is to change some setting for some stupic game or other. :D

    Gary's answer is the ticket.

    Of course not, because that's fundamentally impossible.
     
  7. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    The command line parameters are different for each game. For WoW, you specify it all at once:

    List of Command-Line Switches - WoWWiki - Your guide to the World of Warcraft

    So it'd look like
    Code:
    wow.exe -1920x1200
    or
    Code:
    wow.exe -1280x720
     
  8. andros_forever

    andros_forever Notebook Deity

    Reputations:
    141
    Messages:
    954
    Likes Received:
    0
    Trophy Points:
    30
    On another forum someone gave me and example of how to do this:
    -open notepad, type this:

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\Video]
    "reswidth"=dword:00000000
    "resheight"=dword:00000000

    then save the file as xxx.reg

    the dword is the hexadecimal value you want to change.

    I've made two .reg files for 1200p and 720p and they work perfectly as intended. Now I just want to know how to prevent the warning message from popping up every time I double click the file.
     
  9. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    That won't work. Just do it like I said and you won't have any messages, and it'll just work.

    Seriously... editing the registry is just a bad idea, doubly so when the game itself gives you the ability to start it with the options you want.
     
  10. andros_forever

    andros_forever Notebook Deity

    Reputations:
    141
    Messages:
    954
    Likes Received:
    0
    Trophy Points:
    30
    No, it actually worked perfectly. It would be dangerous if I was constantly changing the whole registry, but changing one key is no big deal, it's the same thing as changing the setting in-game. First I created a .reg file like this:

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\Video]
    "reswidth"=dword:00000780
    "resheight"=dword:000004b0

    then I created a .bat file like this:

    @echo off
    regedit.exe /s "C:\Users\Owner\Desktop\1200p Games\Frozen Throne 1200p.reg"
    START "" "frozen throne.exe"

    I placed that .bat in the Warcraft 3 folder, made a shortcut to the .bat and named it "Frozen Throne 1200p" and voila', the resolution sets itself to 1920x1200 without me having to go into the options. I made another shortcut "Frozen Throne 720p" for when I am using the Projector at 120hz in Stereo 3d and it works as intended with no messages.