• How to run a program from the command line? Run the file from the command line. Running Windows programs from the command line and cmd files

    Most operating room users Windows systems are used to launching the desired application or game double click by a shortcut located on the desktop, or by finding it in Start. Alternatively, you can open the folder in which it is installed and run the exe file from there.

    Since launching applications this way may not always be suitable, in this article let's look at a few in various ways, using which you can run the program from the command line.

    Method 1: launch the system application

    In order to run one of the following from the console system applications The “start” command is used and the desired name is indicated separated by a space. You need to enter the system name as the name. For Explorer - this is explorer, task manager - taskmgr, control panel - control, system configuration - msconfig.

    To open notepad write notepad , player Windows Media– wmplayer, Paint – mspaint, symbol table – charmap. If you type cmd , a new command prompt window will open.

    For example, let's open the symbol table. Type in the line:

    and press "Enter".

    Method 2: specifying the full path to the file

    If you need to run any other installed application, then you should specify the full path to the program executable file.

    For example, in my Downloads folder there is a program for installing Film Studio, let's open it. I go into the folder and click on the field where the path is written. This entire line needs to be written in command line(since copy-paste does not work there) and at the end add the name of the utility that we want to run.

    The console will write:

    c:\users\master\downloads\wlsetup-all

    After pressing “Enter”, preparations for installing the Film Studio began. As you can see, when writing the path it is not necessary to use capital letters; you can only enter small ones.

    If there are spaces in the path to the desired file, then a window will appear telling you what to find specified file it doesn't work. The problem is that the command line recognizes the path up to the first space, not the entire line you entered. In the example, it decided that I wanted to open c:\program .

    Now let's move a little away from the topic and look at how to find out the full path to the program that we want to run.

    To do this, find the executable file through the Explorer window desired application. To understand that this is it, make sure that “Application” is indicated opposite it in the “Type” field. Then click on the field at the top - this is the path.

    For example, Total Commander is launched by the file “totalcmd”, and it is located along the path: "c:\program files\total commander".

    Or another option. If there is a shortcut to the desired application on the desktop, you don’t have to search for it through Explorer. Just right-click on it and select "File location".

    The window we have already looked at will open. It will highlight the file that launches the utility, and at the top you can find out the path to it.

    Method 3: using path

    Using this command, we will save the path to the folder in which the executable file is located, and then run it.

    Let's consider the same Total Commander. In the console we write:

    path c:\program files\total commander

    Be sure to include a space after “path”. It is along this path that the “totalcmd” file we need is located. Press "Enter".

    The specified program will be launched. It is not necessary to specify the extension at the end. Thus, you can run any executable file in the specified folder.

    Method 4: using the cd command

    This command will open the specified folder, and from it we will launch the file we need. For example, let's go to the TeamViewer folder:

    cd c:\program files\teamviewer

    After "cd" put a space. Press "Enter".

    This folder contains the file that launches TeamViewer; it has the same name. So next I enter:

    I press “Enter” and the utility starts.

    If you need to open an application that is not installed on system disk, then you can use the path command. If I type:

    path d:\program files\ccleaner

    (after entering each line, press “Enter”), then CCleaner will open. It is installed in the specified path on drive D:.

    But this cannot be done using the cd command.

    Method 5: through the context menu

    To do this, find the folder in which the executable file is stored and right-click on it, while holding down the Shift key. Next in context menu select "Open command window".

    After this, the folder we need will immediately open in the command line. Enter the name of the file that runs the utility in the line and press Enter. We launched CCleaner, which is not located on the system drive (I have D:).

    If you need to run a program that is installed in the same place as the operating system, the steps are the same. Let's open the browser Google Chrome. We find the folder in which the file is stored that launches it, and select the item mentioned above.

    Then enter the name of the file with the extension .*exe: chrome, and press “Enter”. The browser will be launched.

    Method 6: path in quotes

    At the beginning, I mentioned that if there are spaces in the specified path, the file will not open. But if you write it in quotes, the console will understand everything. Quotes must be double and straight, not commas. They are installed using the combination “Shift + E” with the selected English keyboard layout.

    In them you need to write the full path and at the end indicate the file itself with the extension that will be launched:

    "c:\program files\total commander\totalcmd.exe"

    Often, for various programs, it is necessary to specify special command line parameters that must be activated when the program is launched. For example, in the QIP program, so as not to get bored unnecessary services, you must specify the “/isolated” key in the parameters. How to do this?

    By the way given key I personally always use QIP - it turns the program into the good old QIP that it once was, without a crowd of annoying services and all sorts of rubbish. All that remains is “ICQ” itself.

    Well, we digress. Running the program with command line parameters is easy. To do this, you must first create a shortcut for it on the desktop or in the taskbar.

    Click on the program icon in the folder Program Files or in the list All programs right click and select command Send to > Desktop (create shortcut).

    The shortcut will appear on the desktop. Right click on it and select command Properties. A window will open in which we are interested in the field Object. It is there, after the quotes, that we should add the command we need. IN in this case– key “/isolated”.

    However, this method seems somewhat labor-intensive to me. Create a shortcut, then enter parameters... wouldn’t it be easier to be able to immediately launch any program by specifying in the context menu required parameters command line? In other words, you just right-clicked on the file, specified the necessary parameters, and it was done.

    The ExecParm program will help us with this.

    Command line options with ExecParm

    First, download the program for the system of the required capacity.

    Download a regular archive, which you can unpack anywhere. It will contain only three files – ExecParm.txt, Execparm.dll and Execparm.inf.

    Where is the executable file, you ask, how to install it? Very simple. Just right-click on the Execparm.inf file and select the command Install.

    In essence, in this way system registry just add a few entries. Now just right-click on the program executable file and select the command Execute With Parameters(i.e. run with command line parameters).

    All that remains is to specify the necessary parameters and click on the OK button. Perhaps someone will like this method more than the first, more traditional option.

    From the command line, you can run the program installation in interactive or silent mode.

    Also, when installing the program from the command line, you can configure a username and password to access the program. The program will ask for a username and password when the user tries to uninstall or stop it, or change its settings.

    Most of the time our programs work just as well as we need them to, but every now and then you have one that is less than co-op and leaves you with an opportunity to fix the "attitude" problem. Run it so that the window does not close.

    Control the same action using the command line. You can create batch file, containing two lines. You can create a shortcut with the above. There is no need to write down any paths. Anything to add to the explanation? Typically, programmers write stand-alone scripts that are independent of live environments. Once the interpreter is called, it reads and interprets the file. Then you have to make the script executable using the following command.

    To run the program installation wizard from the command line,

    Type setup.exe or msiexec /i at the command prompt.

    To install a program or update a program version in silent mode (without running the Program Installation Wizard),

    enter in the command line setup.exe /pEULA=1 /pKSN=1|0 /pINSTALLLEVEL= /pALLOWREBOOT=1|0 /pSKIPPRODUCTCHECK=1|0 /pSKIPPRODUCTCUNINSTALL=1|0 /s

    A message will appear on your screen. For example, loops are repeated immediately unless they are part of a function. So it requires some mental planning. This is not necessarily a simple question. The letter may be different, and there may be other things after it, so you could just as easily see something like.

    Installing the program via the command line

    Depending on how your computer is configured and what else you've recently done to it. The interpreter reads your script, compiles it into bytecodes, and then executes the bytecodes to run your program. Then you should see something like. You started the interpreter in "interactive mode". Test it by entering a few expressions of your choice and seeing the results. Many people use the interactive mode as a convenient, but very programmable calculator.

    msiexec /i EULA=1 KSN=1|0 INSTALLLEVEL= ALLOWREBOOT=1|0 ADDLOCAL= SKIPPRODUCTCHECK=1|0 SKIPPRODUCTCHECK=1|0 SKIPPRODUCTCUNINSTALL=1|0 /qn ,

    • EULA=1 means you accept the terms License Agreement. The text of the License Agreement is included in. Acceptance of the provisions of the License Agreement constitutes a necessary condition to install a program or update a program version. If this parameter is not specified during a silent installation, the program will not be installed.
    • KSN=1|0 means consent (1) or refusal (0) to participate in the Kaspersky Security Network program (hereinafter also “KSN”). The text of the Regulations on Participation in KSN is included in the Kaspersky package. Endpoint Security. Specifying a parameter value is optional. If the command does not specify the value of the KSN parameter, then the first time you launch Kaspersky Endpoint Security, a window will open asking you to participate in the KSN program.
    • INSTALLLEVEL= indicates the type Kaspersky installations Endpoint Security. Specifying a parameter value is optional. If the command does not specify a value for the INSTALLLEVEL parameter, the default installation of the program is performed.

      Instead, you can specify the following values ​​for the INSTALLLEVEL parameter:

      Starts the interpreter as above. Once you've checked the directory, you need to add it to the startup routines your computer goes through. Note that if you have sufficient privileges, you may have the choice of setting options for either the current user or the system.

      If you are unsure about doing any of these steps yourself, get help! At this point, you can reboot your system to ensure the new setting has taken effect. A session to run this program might look like this. If you didn't want to change the current directory.

      • 100. In progress basic installation programs.
      • 200. The standard installation of the program is performed.
      • 300. All program components are installed.
    • ALLOWREBOOT=1|0 means consent (1) or prohibition (0) to automatically reboot the computer if it is required after installing or updating the program. Specifying a parameter value is optional. If the command does not specify a value for the ALLOWREBOOT parameter, the default automatic reboot computer after installing or updating the program is prohibited.

      You may need to restart your computer after updating the program version or if third-party anti-virus software is detected and removed during the installation of Kaspersky Endpoint Security.

      It's important to remember. Interactive mode is best used for testing that individual statements and expressions do what you think they do and for developing code through experimentation. This entry. First create new folder, in which we can save our program.

      IN text editor enter the following. Open new terminal and enter the following. Let's look at this program in more detail. The first line says this. This is called a package declaration. Packages are a way to organize and reuse code. Executable applications are those types of programs that we can run directly from the terminal.

    • ADDLOCAL= specifies which components should be installed in addition to those selected by default in standard installation mode. Specifying a parameter value is optional.

      Instead, you can specify the following values ​​for the ADDLOCAL parameter:

      • MSBitLockerFeature. The Microsoft BitLocker Manager component is being installed.
      • AntiAPTFeature. The KATA Endpoint Sensor component is being installed.
    • SKIPPRODUCTCHECK=1|0 means enable (1) or disable (0) checking for incompatible software. Specifying a parameter value is optional. If the SKIPPRODUCTCHECK parameter is not specified in the command, by default Kaspersky Endpoint Security scans and displays a list of detected incompatible programs.
    • SKIPPRODUCTUNINSTALL=1|0 means consent (1) or prohibition (0) to automatic removal found programs that are incompatible with Kaspersky Endpoint Security. Specifying a parameter value is optional. If the SKIPPRODUCTUNINSTALL parameter is not specified in the command, by default Kaspersky Endpoint Security tries to remove all found incompatible programs.

    To install the program or update the version of the program with a user name and password confirming the right to change program parameters and operate the program, follow these steps:

    Libraries are collections of code that we put together so that we can use them in other programs. We'll look at libraries in more detail later, but for now just include this line in any program you write. The next line is an empty line. Computers render symbols new line with special character. New lines, spaces, and tabs are called whitespace. Go mostly don't care about spaces, we use it to make programs easier to read.

    Using double quotes like this is known as a "string literal", which is a type of "expression". Strings are described in more detail in the next chapter, but at the moment It's important to remember that in the opening "the character must eventually be followed by another" character, and everything in between is included in the line. After this you will see the function declaration.

    • If you want to install a program or update a version of a program interactively, enter the following command at the command prompt:

      setup.exe /pKLLOGIN=

      msiexec /i KLLOGIN= KLPASSWD=***** KLPASSWDAREA= .

    • If you want to install a program or update a version of a program in silent mode, enter the following command at the command prompt:

      setup.exe /pEULA=1 /pKSN=1|0 /pINSTALLLEVEL= /pKLLOGIN= /pKLPASSWD=***** /pKLPASSWDAREA= /s

      They have inputs, outputs, and a series of steps called operations that are performed in order. This function has no parameters, returns nothing, and has only one statement. The main name function is special because it is a function called when the program is executed. The last part of our program is this line.

      This statement has three components. At this point we've already seen a lot of new terminology and you may be a little overwhelmed, sometimes it's helpful to consciously read your program out loud. One reading of the program we just wrote might look like this.

      msiexec /i EULA=1 KSN=1|0 INSTALLLEVEL= KLLOGIN= KLPASSWD=***** KLPASSWDAREA= ALLOWREBOOT=1|0/qn .

    Instead, you can specify one or more of the following values ​​for the KLPASSWDAREA parameter (separated by semicolons), corresponding to the operations that require confirmation:

    This function takes no arguments, returns nothing, and does the following: 1. You can find out more about this by typing the following in your terminal. Among other things, you should see this. Spaces are always added between operands and a new line is added.

    It returns the number of bytes written and the write error that occurred. Let's return to this function. Our program started with a basic package. . First download and install node. How you do this depends on the type of machine and operating system. Once node is installed, you can test your installation by entering the following at the command prompt.

    • SET. Changing program parameters.
    • EXIT. Termination of the program.
    • DISPROTECT. Disable protection components and stop scanning tasks.
    • DISPOLICY. Disabling the Kaspersky Security Center policy.
    • DISCTRL. Turning off control components.
    • REMOVELIC. Deleting a key.
    • UNINST. Removing, changing or restoring a program.
    • REPORTS. View reports.

    When installing a program or updating a program version, silent mode supports the use of the following files:

    How to launch any application via the command line

    This will respond to the version number of the version you just installed. The shell is great for practice, but we want to write programs, store them in files, and execute them on demand. Node's built-in console object allows you to write to the terminal. Technically it allows you to record your system's standard output and standard error streams, but we'll get to that later. Running your program is as simple as calling node on the file containing your program.

    Here's a couple simple applications, which seem to appear in introductory programming lessons. The first shows the powers of the two. And here is a simple program to record the first few lines of Pascal's famous triangle. And here is a program that generates a random hand of five card games every time it is run.

    • setup.ini containing general parameters installing the program;
    • configuration file install.cfg containing operating parameters for Kaspersky Endpoint Security;
    • setup.reg containing registry keys.

    The setup.ini, install.cfg and setup.reg files must be located in the same folder with the distribution package of Kaspersky Endpoint Security 10 Service Pack 2 for Windows.

    Of course, programs launched from the command line must have access to their arguments. For example, if we enter the following. If your script takes more than one or two command line arguments, we strongly recommend that you create named input arguments and use a command line parser. Available for node large number parameter parsers; choose any one you like.

    If they were allowed to do this, you could be taken to a malicious site that hosted a script that searched your file system for personal information and sent whatever it found back to its original server. And of course browser scripts can't write to your file system.

    This documentation has been archived and is no longer maintained.

    Installation from the command line - specifying parameters

    Applicable to: Forefront Protection for Exchange

    Section modified date: 2010-05-10

    The following table summarizes the options that you can use when you run the extracted installation package (setup.exe) from a command line:

    You can probably guess why not. However, the node allows you to read and write files. Let's give just one simple example. So this was a pretty quick introduction to using node to write command line scripts, but we've barely scratched the surface of what node is and what it can do.

    Especially in older installations, startup becomes more and more delayed as new programs are launched. If there are multiple programs in the Startup menu, the download process will take longer. The tool can launch programs and autorun tools with a delay, thereby solving system stutters caused by simultaneous programs. You need to take action. Once selected, the wizard installs the selected functions. The toolkit creates a log file from the analysis, which you can read later to detect system slowdowns.

    Parameter Description Requirements

    Installation without user intervention - does not appear on the screen

    Required parameter /a

    Optional parameter /c

    This works for every letter in every directory. Therefore, you should stop all programs that you are running before. This is the only way to ensure that all instruments and drivers are captured. In some cases, you may receive error messages in the form The user mode logger cannot be found in the active list of loggers. If this doesn't work, you can't use the toolkit for further analysis, or at least be limited, or with some extra work.

    First analysis of the boot process

    We'll show you how to do it. Loading. However, this is not particularly important for analysis, but only serves for later comparison. Kernel data file, that is, the beginning operating system and a file with user data. You can filter the display by the menu area, which is displayed by clicking on the left side of the window. To do this, click the icon to the left of the middle of the window. Various measurement ranges are currently available. If you uncheck the box, the corresponding chart in the viewer will also disappear.

    Passive installation - no prompts to the user, but displays progress

    Required parameter /a

    Optional parameter /c

    /aPathtoAnswerFile

    Specifies a required response file

    Answer file is required

    This way you can hide exactly what you need. The display is dynamic, which means you can hide hidden charts at any time and vice versa. Select a specific area and right-click on it. Then select PivotTable. Now you see in the table that the processes are delaying the start. If you click on the chart on the chart, you can zoom in on part of the ad. To do this, select the area with your mouse that you want to zoom in on and right-click. Use the "Scale to Select" menu command to initiate the scaling operation.

    /q or /p

    [/cPathtoConfigFile]

    Specifies an optional configuration file

    Configuration file is required

    Valid only with parameters /q or /p

    Before performing a passive or silent installation, you must extract the setup.exe file using the following command:

    In addition to graphics, you can also create tables for other areas by selecting " Pivot table» in the context menu. The table shows information similar to the task manager during the measured period. You can sort the view by clicking the appropriate column in the table. If you don't recognize the process, search for the executable file using a search engine.

    This way you will quickly discover the processes that are delaying the start. You should remove them from startup as much as possible to speed up system startup. However, be aware that some programs may not work if you disable AutoPlay features. In the context menu of entries and selecting Internet search, you can start searching through the program on the Internet. You don't need to install this tool, but you can run it directly. The “Login” tab is also important. Here you can see entries starting with the user's login.

    frontexchangesetup.exe /x: extractpath

    Silent installation allows you to run scripts during installation of Microsoft Forefront Protection 2010 for Exchange Server (FPE). This type of installation does not display any notifications about the installation status. All output is written to the installation log, program log, or event log. Silent installation can be used to perform automated and distributed installations on . Silent installation requires a response file, which is provided using the /a. A response file template that can be modified to suit your specific environment is provided in installation package along with an XML Schema (XSD file) that you can use to validate the resulting response file. If a valid response file is not provided, the installation is aborted and errors are logged. For information about viewing a sample answer file, see.

    After extracting the installation package ( additional information see section) you can run a silent installation with an answer file by entering the following at the command prompt:

    setup.exe /q /a PathtoAnswerFile

    The answer file contains answers to any questions you may have during the installation. This is a required parameter. In addition, you can specify the parameter /c

    setup.exe /q /a PathtoAnswerFile/

    Passive installation works in the same way as silent installation, but it displays a progress bar to show the installation progress.

    After you extract the installation package (see the section for more information), you can run the passive installation with the answer file by entering the following at the command prompt:

    setup.exe /p /a PathtoAnswerFile

    The answer file contains answers to any questions you may have during the installation. This is a required parameter. (See the section for information about viewing a sample answer file.) In addition, you can specify the parameter /c, which allows you to optionally import configuration settings to the server after installation is complete. These are settings that were exported from another server. The syntax should be as follows:

    setup.exe /p /a PathtoAnswerFile/

    Perhaps nothing affects the security of a system more than the user of the system itself, and sometimes administrators have to fight not so much with enemy Trojans as with a simple user. For these purposes, accounts with certain rights are used; created a group, assigned rules, added users and that’s it – let them enjoy the Start button and the scarf.

    The same situation is with the Internet, if you surf as an admin on the world wide web, then no matter how, there will be an evil virus that will penetrate the system and want to run the program from the command line for further dirty tricks, and for control, it will register in the registry. Another thing is a limited account - you can’t do much with it. But even in this case, you have to make exceptions - for example, you need to run the program through the command line not under your own account, and under another (with greater rights) or simply launch programs with additional parameters. For these purposes, two command line utilities will be considered - RUNAS(running a program via the command line under a different account without logging out) and START(run the program from the command line with additional parameters). Remember that to perform similar actions, the script server provides methods and .

    START utility - command line

    This utility provides a number of additional parameters:

    • launching programs in a certain mode;
    • open a browsing window for a given directory (folder);
    • open documents whose type is registered in Windows (that is, it is specified which application should open a document with a given extension).

    And so, let's get acquainted with the basic syntax of this utility:

    START ["header"] [command/program] [parameters]

    Provided the command/program defines an internal command line command ( DIR, COPY...) or a batch file, then to launch them in a new window (provided that the key is not specified /IN) the program starts automatically CMD.EXE from the command line with the switch /K. Under this condition, the new window will not be closed after the command is executed. Provided that it is not an internal CMD utility or a batch file that is being executed, then this program runs in a graphical or text window.

    Provided that the first element shell will word CMD without extension and file path, the command processor will replace it with the value of the variable COMSPEC(full path to the command interpreter). If the first element is the name of the program being executed without an extension, then the value will be used environment variable RATNECHT, this will make it possible to define name extensions executable files and search order the desired file. Typically, the RATNEXT variable contains the following values:

    RATNEXT=.COM;.EXE;.BAT;.CMD

    Provided that no files with the default extensions are found, the command interpreter will check whether the given name matches the directory name. If so, then START utility will launch Explorer and open the specified directory in it.

    "heading"– defines the title of the created window. For example:

    START "Copying data" copyier.bat

    /paththis parameter specifies the working directory when opening a new command window.

    /I– this key says that the new operating environment will be the original environment passed by the cmd.exe command interpreter, and not the current command window environment.

    /MIN– this parameter says that the command/program is launched via the command line in a minimized form, but if /MAX is used, then in a maximized (maximized) window.

    /SEPARATE– execution of a 16-bit application in a separate memory area

    /SHARED- execution of a 16-bit application in a shared memory area

    Keys /LOW | /NORMAL | /HIGH | /REALTIME| /ABOVENORMAL | /BELOWNORMAL set the priority of the task to be launched.

    /WAIT– run the program from the command line and wait for it to finish

    /IN- execution occurs without creating a new window (of course, if this is possible). Thus, if this key starts internal team cmd.exe or batch file then new copy command interpreter will be launched in the current command window.

    Examples of using the START utility:

    Need to run from a command prompt window as the main process Microsoft Word with automatic opening of two given files (the name of one of the files contains a space, so it is in quotes):

    START /MAX winword.exe "My document.doc" docum.doc

    Opening a browser window for the My Documents directory on the current drive:

    START "My documents"

    Opening a browser window for the current directory:

    Opening the My Favorite Document.doc file from the My Documents folder in a standard window:

    START "C:\My Documents\My Favorite Document.doc"

    RUNAS command line utility

    RUNAS utility The command line does not contain complex syntax, and is quite simple to use. It allows you to run a program via the command line as another user without terminating the current session. As a rule, it is used by administrators to perform small tasks. system commands. For example:

    runas/user: [email protected] regedit.com

    runas /user:dataAdmin regedit.exe

    Naturally, if you need to run an application under another user who has more authority and has a password, then of course you need to know the password, there’s no way without it:

    runas/user: [email protected] regedit.exe
    Enter password for [email protected]:
    Attempting to start “regedit.exe” as user
    "[email protected]"...

    Command in Command Prompt Window Runas/? provides detailed help on additional parameters this utility.

    It's no secret that users working on Linux based, always turn up their noses at those who work on Windows. They say that for Windows you need to install the application for at least 10 minutes, pressing a large number of buttons, fiddling with selection checkboxes. And before you actually install the application, you need to find the official website of the program without getting lost on the Internet. Linux users are proud that any utility
    can install from the terminal by running a certain command.

    In Windows, like in Linux, it is possible to install, remove or edit programs using commands.

    The developers claim that Windows 10 will also have the ability to quick installation, updates and deletions various support from the system terminal. We just have to wait for the official release. But you don’t have to wait for the release, but right now take advantage of an amazing feature that will allow the user to install the program from the command line. However, this is not all the surprises: the utility will also allow you to delete, update, open and close the program. Interesting? Let's get to know Chocolatey better.

    Installing the program via the command line

    Now we will try to manage programs more conveniently and very in a similar way on how this is done in Linux environment. And it will help us with this special service Chocolatey, package manager for Windows. The Chocolatey client is a utility designed to run in the console. Let's try to install it right away. To install, open a terminal with administrator rights. Right-click on the Start menu and click on Command Prompt (with administrator rights). Now let's copy the following code:


    Paste it in and press the Enter key. Now you need to close the console so that the data on the variables is refreshed.

    The Chocolatey service has a large catalog of utilities and applications: currently more than 2000 utilities. You can view them on the official website https://chocolatey.org/packages. So, it's time to learn how to install any program via the command line:

    Open the terminal again as administrator. We copy the text presented to the right of the program on the website https://chocolatey.org/packages. For example, to install the Google Chrome browser, the following code is provided:


    Copy it and paste it into the terminal. Don’t forget to write the combination -y after the code from the site. Press Enter. Now all that remains is to wait for the browser installation to complete. After which you can close the terminal window.

    As you might have noticed, Google browser Chrome installed very quickly. We didn't have to click any buttons or select a location to save the files (disk C is used by default). By the way, novice users can make a set of their favorite applications in a notepad, so as not to go to the Chocolatey service every time. To uninstall a program via the command line, enter the code uninstall, then the name of the program. For example, choco unistall ccleaner.

    ATTENTION. The service only works with packages that are installed through it. That is, if any software is not available for installation through Chocolatey, then you will not be able to remove it this way.

    How to run or uninstall a program via the command line

    Now let's look at a method that allows through the command line. This can be done in three very simple steps. Let's get started:

    1. Open a terminal of the Windows operating system.
    2. In the window that appears, write the full path to the location of the application launch file. For example, D:/Files/chrome.exe
    3. We press Enter and wait for the system to open what we need.

    It's time to learn how to close a program via the command line. For this we need additional taskkill software. Let's start:



    Let's sum it up

    Today we looked at what seemed, at first glance, to be a complex topic. But now you know that you can very easily install or uninstall some programs through the command line using the Chocolatey service. And you also know how to open or close an application through the same terminal. We hope that you managed to do everything correctly and that there are no questions left on the topic.