set "My Documents" env var temporarily for a certain GUI program?

pstein

New member
Member
VIP
Local time
5:35 AM
Messages
244
set "My Documents" env var temporarily for a certain GUI program?

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
Peter
 

My Computer My Computer

Computer type
PC/Desktop
OS
win7pro 64bit
As someone who has made a career out of avoiding programming, I can tell you I find this problem very frustrating for me too because I know the inability to change those environment variables is due entirely on programmer laziness.

Me, for example, I have Windows and hardware drivers on C drive, and everything else is somewhere on D. So when I install something new, I ALWAYS select "Custom Install" so I can tell the program where on D I want it (but also so I can opt out of all the other stuff they invariably want to foist on us). I have told Windows I want my Temp Internet Files on D. Office documents, downloads, etc. are saved on D - for just about everything, the defaults have all been changed to D. And in most cases - with the better coded programs, the option to do so is provided in the installation routine.

So when a program comes along that insists on installing under C:\Program Files, I get irritated, and will look for alternatives. But sometimes, like with Belarc Advisor which insists on installing on C, well, it is such a good program, I live with it - reluctantly. Same with MSE. :(

With some programs you can edit the Registry, if you can find the correct entry - and that can be tricky - the data is not always obvious. And of course, just dinking with the Registry can be tricky - and dangerous - always back it up first! With some programs, the default locations are just hard-coded in the program. And unless you are a programmer and can uncompile, edit, and recompile - or whatever it is they do, you are stuck.

So - pretty much I wasted your time because for a solution to your particular issue, I got nothing. Sorry. Maybe someone else reading does and we will both learn something. ;)
 

My Computer My Computer

Computer Manufacturer/Model Number
BrightWorks Systems B4
OS
Windows 7 Profession 64-bit
CPU
Intel Core i7-860 Quad
Motherboard
Gigabyte P55-UD4P
Memory
Mushkin 4x2Gb PC12800
Graphics Card(s)
Gigabyte GTX260 896Mb
Sound Card
Integrated 7.1 HD Dolby
Monitor(s) Displays
2 Samsung 2220wm-HAS 22"
Screen Resolution
1680 x 1050 | 1680 x 1050
Hard Drives
WD HE 1Tb
PSU
Corsair TX-750W
Case
Ultra M998
Cooling
OEM
Keyboard
MS Wireless Comfort 5000
Mouse
MS Wireless 5000
Internet Speed
Cable and pretty darn fast

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
Other Info
"The scale icon at the top right of a post or tutorial is how you can give rep to the member."
Back
Top