Hello all, I am trying to install exe file silently. I use command prompt to see the command line options. I am giving the exact command line options but its not working, am i doing anything wrong. Can i install.exe file through command prompt, If its possible. Could you tell me the command for installation, In windows not in linux/ mac??
-->![Line Line](/uploads/1/2/5/0/125048907/514744990.jpg)
The Installer tool is a command-line utility that allows you to install and uninstall server resources by executing the installer components in specified assemblies. This tool works in conjunction with classes in the System.Configuration.Install namespace.
Command-line options for msiexec.exe for Windows Installer 3.0 and earlier. Provides a table showing options, parameters, and descriptions. Examples showing how to install products and other tasks. Linux commands on Windows How to install Bash shell command-line tool on Windows 10 If you're a developer working with both Linux and Windows, you can now add Bash shell on Windows 10 to run Linux.
This tool is automatically installed with Visual Studio. To run the tool, use the Developer Command Prompt for Visual Studio (or the Visual Studio Command Prompt in Windows 7). For more information, see Command Prompts.
At the command prompt, type the following:
Syntax
Parameters
Argument | Description |
---|---|
assembly | The file name of the assembly in which to execute the installer components. Omit this parameter if you want to specify the assembly's strong name by using the /AssemblyName option. |
Options
Option | Description |
---|---|
/h[elp] -or- /? | Displays command syntax and options for the tool. |
/help assembly-or- /? assembly | Displays additional options recognized by individual installers within the specified assembly, along with command syntax and options for InstallUtil.exe. This option adds the text returned by each installer component's Installer.HelpText property to the help text of InstallUtil.exe. |
/AssemblyName 'assemblyName,Version=major.minor.build.revision ,Culture=locale ,PublicKeyToken=publicKeyToken' | Specifies the strong name of an assembly, which must be registered in the global assembly cache. The assembly name must be fully qualified with the version, culture, and public key token of the assembly. The fully qualified name must be surrounded by quotes. For example, 'myAssembly, Culture=neutral, PublicKeyToken=0038abc9deabfle5, Version=4.0.0.0' is a fully qualified assembly name. |
/InstallStateDir=[ directoryName] | Specifies the directory of the .InstallState file that contains the data used to uninstall the assembly. The default is the directory that contains the assembly. |
/LogFile= [filename] | Specifies the name of the log file where installation progress is recorded. By default, if the /LogFile option is omitted, a log file named assemblyname.InstallLog is created. If filename is omitted, no log file is generated. |
/LogToConsole ={true |false } | If true , displays output to the console. If false (the default), suppresses output to the console. |
/ShowCallStack | Outputs the call stack to the log file if an exception occurs at any point during installation. |
/u [ninstall ] | Uninstalls the specified assemblies. Unlike the other options, /u applies to all assemblies regardless of where the option appears on the command line. |
Additional Installer Options
Individual installers used within an assembly may recognize options in addition to those listed in the Options section. To learn about these options, run InstallUtil.exe with the paths of the assemblies on the command line along with the
/?
or /help
option. To specify these options, you include them on the command line along with the options recognized by InstallUtil.exe.Note
Help text on the options supported by individual installer components is returned by the Installer.HelpText property. The individual options that have been entered on the command line are accessible programmatically from the Installer.Context property.
All options and command-line parameters are written to the installation log file. However, if you use the
/Password
parameter, which is recognized by some installer components, the password information will be replaced by eight asterisks (*) and will not appear in the log file.Important
In some cases, parameters passed to the installer may include sensitive or personally identifiable information, which, by default, is written to a plain text log file. To prevent this behavior, you can suppress the log file by specifying
/LogFile=
(with no filename argument) after Installutil.exe on the command line.Remarks
.NET Framework applications consist of traditional program files and associated resources, such as message queues, event logs, and performance counters that must be created when the application is deployed. You can use an assembly's installer components to create these resources when your application is installed and to remove them when your application is uninstalled. Installutil.exe detects and executes these installer components.
You can specify multiple assemblies on the same command line. Any option that occurs before an assembly name applies to that assembly's installation. Except for
/u
and /AssemblyName
, options are cumulative but overridable. That is, options specified for one assembly apply to all subsequent assemblies unless the option is specified with a new value.If you run Installutil.exe against an assembly without specifying any options, it places the following three files into the assembly's directory:
- InstallUtil.InstallLog - Contains a general description of the installation progress.
- assemblyname.InstallLog - Contains information specific to the commit phase of the installation process. For more information about the commit phase, see the Commit method.
- assemblyname.InstallState - Contains data used to uninstall the assembly.
Installutil.exe uses reflection to inspect the specified assemblies and to find all Installer types that have the System.ComponentModel.RunInstallerAttribute attribute set to
true
. The tool then executes either the Installer.Install or the Installer.Uninstall method on each instance of the Installer type. Installutil.exe performs installation in a transactional manner; that is, if one of the assemblies fails to install, it rolls back the installations of all other assemblies. Uninstall is not transactional.Installutil.exe cannot install or uninstall delay-signed assemblies, but it can install or uninstall strong-named assemblies.
Starting with the .NET Framework version 2.0, the 32-bit version of the common language runtime (CLR) ships with only the 32-bit version of the Installer tool, but the 64-bit version of the CLR ships with both 32-bit and 64-bit versions of the Installer tool. When using the 64-bit CLR, use the 32-bit Installer tool to install 32-bit assemblies, and the 64-bit Installer tool to install 64-bit and Microsoft intermediate language (MSIL) assemblies. Both versions of the Installer tool behave the same.
You cannot use Installutil.exe to deploy a Windows service that was created by using C++, because Installutil.exe cannot recognize the embedded native code that is produced by the C++ compiler. If you try to deploy a C++ Windows service with Installutil.exe, an exception such as BadImageFormatException will be thrown. To work with this scenario, move the service code to a C++ module, and then write the installer object in C# or Visual Basic.
Examples
The following command displays a description of the command syntax and options for InstallUtil.exe.
The following command displays a description of the command syntax and options for InstallUtil.exe. It also displays a description and list of options supported by the installer components in
myAssembly.exe
if help text has been assigned to the installer's Installer.HelpText property.The following command executes the installer components in the assembly
myAssembly.exe
.The following command executes the installer components in an assembly by using the
/AssemblyName
switch and a fully qualified name.The following command executes the installer components in an assembly specified by file name and in an assembly specified by strong name. Note that all assemblies specified by file name must precede assemblies specified by strong name on the command line, because the
/AssemblyName
option cannot be overridden.The following command executes the uninstaller components in the assembly
myAssembly.exe
.The following command executes the uninstaller components in the assemblies
myAssembly1.exe
and myAssembly2.exe
.Because the position of the
/u
option on the command line is not important, this is equivalent to the following command.The following command executes the installers in the assembly
myAssembly.exe
and specifies that progress information will be written to myLog.InstallLog
.The following command executes the installers in the assembly
myAssembly.exe
, specifies that progress information should be written to myLog.InstallLog
, and uses the installers' custom /reg
option to specify that updates should be made to the system registry.The following command executes the installers in the assembly
myAssembly.exe
, uses the installer's custom /email
option to specify the user's email address, and suppresses output to the log file.The following command writes the installation progress for
myAssembly.exe
to myLog.InstallLog
and writes the progress for myTestAssembly.exe
to myTestLog.InstallLog
.The Microsoft Repository is an object-oriented repository that ships as a component of Visual Basic (Version 5.0). It includes a set of ActiveX interfaces that a developer can use to define information models, and a repository engine that is the underlying storage mechanism for these information models. Microsoft update repository.
See also
Active3 years, 10 months ago
How do I run a .exe file from the command prompt?
For example, if the .exe file is located at
quack quixoteC:file.exe
, how do I run this file when the prompt is currently in another location like D:
?36.1k1111 gold badges9090 silver badges123123 bronze badges
maxy
Install Exe Command Line
migrated from stackoverflow.comDec 2 '09 at 1:23
This question came from our site for professional and enthusiast programmers.
6 Answers
You can either run it by using the explicit path:
or add its location to the path (I always have a c:bin directory to hold my little snippets - not really a kosher location for multiple-user Windows, but none of my Windows installs are multiple-user):
Note that, with that second solution, you should be setting up your path so that it's available whenever you start up (in autoexec.bat if you're really using DOS or from the
Control Panel -> System -> Environment
window if you're using Windows).And, do note that, if you use the control panel solution, that doesn't affect currently open command windows - you'll need to shut them down and re-open to pick up the new environment variable.
![Exe Exe](/uploads/1/2/5/0/125048907/697061549.jpg)
user53528
if you are on your D: drive you still able to type ' c:file.exe'
NettogrofNettogrof
You should add the c: path into your Windows system PATH so whatever drive you are in and when you execute the file.exe windows will look at your defined path and run your program there.
TO do this go to Windows -My computer-click right for Properties- Advanced Button- Environment Variables- at the buttom of the windows you will see the PATH - Edit it add ;c:and save This should work- I think it will need a reboot
Jonathan
To switch drives, just type
C:
and push enter. To change directories, type cd somedirectory
.Let's say I am at
BradBradD:Brad
and I want to run C:Windowsnotepad.exe
. You could either just type it's name explicitly like others have suggested, or you could do this:3,61844 gold badges3636 silver badges6868 bronze badges
The best way to run an EXE file that you don't known its full name is:
Assuming your file name is
Tamara WijsmanInstaller_4756873653.exe
but you don't know the full name after the Installer_
and the location of the file is C:
51k2525 gold badges166166 silver badges248248 bronze badges
kfirkfir
Create .bat or .cmd file and write content to
cd your_directory_onestart filename.exe
cd your_directory_secondstart filename.exe
it work for me
Loi PhamLoi Pham