Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a program installed on a Windows 7 machine which reads a start up config file. The program also opens up a Tcl console window.

The problem I am having is that when I launch the application the usual way (using launcher icons or from the start menu) it doesn't read the config file in my home directory, only the system-wide config file in the program folder. Using the Tcl console, pwd gives me the programs system folder (C:\Program Files\myprog\).

If I start the program using the command line ( e.g. C:\Program Files\myprog\myprog.exe) from the home directory, it does read the local config file, and pwd returns my home directory.

What is behind this inconsistency in Windows 7? More specifically, I am looking for a way to have the program launch from the home directory so the local config file is read no matter if a user clicks the icon or start menu.

Thanks

share|improve this question
    
What is the Start in: path of the shortcut? –  CharlieRB Jun 26 '13 at 12:48
    
By default Windows 7 will generate an application directory for all applications. Some applications are written the correct and store their configuration files in that location, others are written the incorrect way, and store it in any location they want. When that happens more often then not programs get confused. Sounds like you want to modify the shortcut being used to launch your program to indicate where the configuration file is. –  Ramhound Jun 26 '13 at 12:51
    
Thanks, that clarifies things a lot! –  leifer85 Jun 26 '13 at 16:53

1 Answer 1

up vote 1 down vote accepted

Right-click the icon you use to launch the application and click 'Properties'. Change the value of the "Start In" field to wherever the home directory is that contains the config file you want to use.

share|improve this answer
    
Thanks, this was the solution. I changed the "Start in" field to %USERPROFILE%. –  leifer85 Jun 26 '13 at 16:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.