How to change "My Documents" env var temporarily for a certain GUI program?

Discussion in 'Windows 7 Help and Support' started by pstein, Aug 12, 2011.

  1. pstein

    pstein Honorable Member

    Mar 20, 2010
    Likes Received:
    Ok, I know, I can change/set environment variables through
    Control Panel--->System

    The current environment variable values are fine for most of my programs.

    However there is one program which puts some config files into the folder which is currently defined as user variable "My Documents".
    I don't want that. I want to define my own, different folder for these files.
    And I don't want to change always the general environment variables in "System" dialog.

    Unfortunately there is no setting in the program in question to define a different location.

    So is there another smart way of temporarily, externally changing the environment variable for ONE particular GU based program?

    I could imagine that a batch script might be suitable with the following commands:

    set "My document"=D:\path\to\different\location\
    start myprogram123.exe

    This trick above does not work.
    But is there a similar way?

    Maybe there are Registry hacks which allow individual enviroment variables for ONE particular GUI programs.

    Thank you

Share This Page