1

Let's say I want to add the following path to the Windows environment variables: C:\Program Files (x86)\VideoLAN\VLC\vlc.exe Such that I can simply type the following from a command line without using the entire path: vlc.exe filename.avi

What is the easiest way to do this?

3 Answers 3

6

This should be able to be done by setting the "Path" when your computer starts up. So you're using Win 7... Just wondering why you're using the command line to launch these?? There are much easier and quicker ways....

The path is now managed by Windows 7 and not the autoexec.bat or autoexec.nt files. To change the system environment variables, follow the below steps.

1.From the desktop, right-click My Computer and click Properties.

2.In the System Properties window, click on the Advanced tab.

3.In the Advanced section, click the Environment Variables button.

4.Finally, in the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon.

Hope this helps

2
  • Why? I want to be able to run programs with command line parameters. Example: vlc.exe --video-splitter=wall --wall-cols=2 --wall-rows=1 --wall-element-aspect=16:10 --wall-active=1 --monitor-par=1:2 videofilename.mkv
    – Doug
    Apr 5, 2014 at 2:18
  • That's because some programs automatically add their path into the PATH variable. You can check your system's PATH variable to confirm that. Apr 5, 2014 at 3:30
3
  1. Run Regedit
  2. Go to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
  3. Create "VLC" subsection
  4. Add "Path" field of type REG_SZ with "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" value.

Here is an iteresting historical explanation of AppPaths from Raymond Chen: http://blogs.msdn.com/b/oldnewthing/archive/2011/07/25/10189298.aspx

1
  • I can't get this to work in Windows 10. Also, "running Wordpad by typing its name", like that article states, also doesn't work. Oct 20, 2017 at 11:34
1

This is the EASIEST way I have found: Path Editor - http://patheditor2.codeplex.com/

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. Apr 5, 2014 at 5:20
  • Do you have suggestions on how to do that?
    – Doug
    Apr 5, 2014 at 10:31

You must log in to answer this question.

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