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.

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?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

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

share|improve this answer
    
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 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. –  Harshil Sharma Apr 5 at 3:30
  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

share|improve this answer

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

share|improve this answer
    
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. –  Kevin Panko Apr 5 at 5:20
    
Do you have suggestions on how to do that? –  Doug Apr 5 at 10:31

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.