2

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

2
  • What is the Start in: path of the shortcut?
    – CharlieRB
    Jun 26, 2013 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, 2013 at 12:51

1 Answer 1

1

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.

1
  • Thanks, this was the solution. I changed the "Start in" field to %USERPROFILE%.
    – leifer85
    Jun 26, 2013 at 16:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .