21.09.2019
Posted by 
Install Program In Cmd Average ratng: 5,6/10 8175 reviews

First, cmd.exe (command prompt) is slowly being replaced by PowerShell. You should be using PowerShell and forget the command prompt.

  1. Install Program In Cmd

How to install program via command prompt (installation logs) When you install program on a Windows-based computer, you may receive some error messages depending on a specific system. 1) If your installation file has *.EXE extension then start to install the program. If it has *.MSI extension, go to pt.4. Users of Windows 7 and earlier can find an administrative command prompt in the Start Menu; Windows 8 users need to right-click the command prompt in the Start Screen, then click Run As Administrator at the bottom of the screen. You can now watch as the script downloads Chocolatey and starts the installation process. My computer will not install programs packed with Bitrock Installer. How do I get around this? I have used the command prompt in the past, but I forgot how.

Ok, now that you're using PowerShell, you should be using OneGet. This is a front-end PowerShell-based command line installer which interfaces with many different online repositories (Chocolatey, etc.). Speaking of Chocolatey, you can also just use that - - but I recommend OneGet because you can hook it right into the choco repo but also use your own (among several others). OneGet is an open-source project which can be installed on OS's as old as Win7 and comes as a part of Windows 10. It will give you commands like: install-package find-package uninstall-package etc. There are a couple ways, but they're not necessarily first-party supported or as smooth as Linux.

First, a couple of third-party 'package managers' do exist for the Windows platform. The one I hear most about is Chocolatey (available from ). This software will let you download and install packages from repositories maintained by third parties (or even your own repositories).

If you can wait until Windows 10, a package manager will be implemented with PowerShell. If you cannot wait until then, you can also do a poor-man's download and installation using the 'wget' command in PowerShell and launching the downloaded executable. There's a utility called and, in my opinion, it's better than the traditional sudo apt get install packagename. The commands for specific programs are way more intuitive. For instance: sudo apt-get install vlc browser-plugin-vlc becomes choco install vlc.

Cmd

Chocolatey is installed primarily using 3rd parties whereas many Linux repositories installed via CLI are from the direct sources. I personally prefer Chocolatey because of how intuitive it is to jump right into however there are alternatives that offer slightly better features.

Like for PowerShell, it offers various search features, nice simple commands, etc. Heres a tutorial for hooking up both.

Install Program In Cmd

Suppose I have a program named anyprogram.exe and my operating system drive is C. The location of the program is D: AnyFolder anyprogram.exe How do I start/execute that program via command prompt in Windows 8? I have tried the command line START anyprogram.exe, but it shows me an error that Windows cannot find 'anyprogram.exe'.

Make sure you typed the name correctly, and then try again. By the way, it worked perfectly in Windows 7. And, if I type START notepad.exe or START firefox.exe (Firefox is not installed in C: drive), it works in Windows 8. There are three basic ways to run a 'command' in the Command Prompt. builtins These are commands built into cmd itself, and do not require an external program invocation.

Install Program In Cmd

They also do not perform any searching, and will always be executed with the highest priority if matched. You can bypass builtins by wrapping the executable name in quotes: echo calls the builtin, but 'echo' would search following cmd rules.

Direct invocation This is when you directly specify a program name (without a path). For example, if you run cmd ( cmd.exe) or ipconfig ( ipconfig.exe) at the prompt, you are directly calling the external command. This performs implemented entirely within the Command Prompt, in this order:. The current directory. The directories that are listed in the PATH environment variable. (thanks to for the comments).

Through the start command When you try to execute a file through the start command, Command Prompt does not perform any searching. Instead, it passes the file name (and arguments) over to Windows itself (via the ShellExecuteEx API call), which must then search for the file's location. There are it searches in the following order:. Current working directory. Windows directory. Windows System32 directory. Directories listed in PATH environment variable.

Registry defined App Paths Note that the Run dialog also uses this search method. Normally, you can either navigate to the location of the file with cd /d D: AnyFolder ( /d means change drive) and just run anyprogram.exe. Alternatively, you can specify the full path D: AnyFolder anyprogram.exe. If you want to start it with start anyprogram.exe, you have a couple of options:. You can put it in the Windows or System32 directories, or any directory in the PATH environment variable. You can add the directory it is located in ( D: AnyFolder) to the PATH environment variable, see for details.

You can add it to the App Paths registry key, as Notepad and Firefox does. App Paths links a file keyword (such as firefox.exe) with the full path to the file, unlike the other options that deal with directories. See for more information. For completeness, it should be noted that running a program at the command prompt directly as anyprogram.exe does not search the App Paths key, while running it as start anyprogram.exe does e.g.

On a default Win7 install, entering wordpad at the prompt gives a not recognized error, while start wordpad successfully launches wordpad (based on its App Paths key). Technical reason is that the linked page refers to ShellExecuteEx (which start uses) while CreateProcess (which direct execution uses) specifically mentions that App Paths is not searched. – Nov 30 '15 at 4:08.

You have two options:. Add the program to your%PATH% variable. Use quotes in your shortcut Detail: Adding anyprogram.exe to path:. Go to 'Control Panel' -'Advanced System Settings'. Go to the Advanced tab. Click on 'Environment Variables' Add the folder in which anyprogram.exe resides. Edit the PATH Variable and add the folder in the end, separated by a;.

Install Program In Cmd

You can now use anyprogram.exe in the run dialog box (Try logging out and back to make sure your path variable changes are used.) Using complete path Instead of using anyprogram.exe in the Run dialog, you need to use the complete PATH. So type D: Stuff App anyprogram.exe in the run dialog instead.