Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Path variable confusion

Status
Not open for further replies.

gmail2

Programmer
Jun 15, 2005
987
IE
Hi all

I've just run into some strange behaviour on my Windows 7 machine which I have no explanation for and I'm hoping somebody can shed some light on it. To give you some background - I use the keyboard more than the mouse, and to launch more applications I do Windows + R and type the application name.

I recently started using another program as an alternative to notepad, but wanted to be able to still click Windows + R and type notepad to get this new application to open in place of notepad.

I know that I could rename/delete the notepad.exe, or replace it with my own notepad application - but I don't particularly want to go down that route as I personally don't want to tinker with the OS files etc. So instead, I added %programfiles%\MyNotepadApp to the path environment variable. I put it at the start of the variable so that will look there before looking in the windows directory. I then created a hard link under %programfiles%\MyNotepadApp called notepad.exe

Now for the strange part .... if I got to a command prompt and type notepad, my alternative notepad application opens. But if I click Start > Run and type notepad, I get the plain old Windows notepad application instead. Does anybody have any ideas why this is ???

Irish Poetry - Karen O'Connor
Irish Poetry and Short Stories - Doghouse Books
Garten und Landschaftsbau
 
Is there any difference between the user opening the Command Prompt and the user opening the Start Menu RUN box? I mean does the Command Prompt state the correct logged in user in the Prompt and not some Run As Administrator option?

Are the Environment Variables that you changed related to the user or system variables?

I think I would just create a Shortcut to the new program and place it on the Desktop and give it a launching Shortcut Key via the Properties.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top