. Net service installation and uninstallation command line bat cmd,. netbat
Based on. net 4.0
Install
@ ECHO OFFecho The installation service pauseREM The following directory is. NET 4.0 set DOTNETFX2 = % SystemRoot % \ Microsoft. NET \ Framework \ v4.0.30319set PATH = % PATH %; % DOTNETFX2 % echo installation service... echo ------------------------------------------------- InstallUtil/I service.exe echo --------------------------------------------------- the echo service has been successfully installed! Pause = ===
Uninstall
@ ECHO OFFecho prepare to uninstall The service pauseREM The following directory is. NET 4.0 set DOTNETFX2 = % SystemRoot % \ Microsoft. NET \ Framework \ v4.0.30319set PATH = % PATH %; % DOTNETFX2 % echo uninstall the service... echo response InstallUtil/u <span style = "font-family: Arial, Helvetica, sans-serif;"> service </span> <span style = "font-family: Arial, helvetica, sans-serif; ">. exe </span> echo ------------------ --------------------------------- Echo is installed and uninstalled successfully! Pause = ===
For command lines running in cmd, use bat to implement ???
After a new text document is created, input the above Code and save it, the document suffix is changed to. bat. You can become a batch file.
I want to use the cmd command to execute an uninstallation program, for example, detach 360. If you know how to solve this problem
Microsoft provides a Software Uninstall program under XP, SYSTEM32 \ msiexec.exe
After running CMD, enter msiexec/uninstall ProductCode/quiet.
For ProductCode, find it in the registry. Each software has a unique ProductCode.
------------------------------------------------------------------------------
Windows (R) Installer. V 3.01.4000.1823
Msiexec/Option <Required Parameter> [Optional Parameter]
Installation Options
</Package |/I> <Product. msi>
Install or configure the product
/A <Product. msi>
Manage and install-install products on the network
/J <u | m> <Product. msi> [/t <Transform List>] [/g <Language ID>]
Broadcasting product-m broadcasts to all users and u broadcasts to current users
</Uninstall |/x> <Product. msi | ProductCode>
Uninstall a product
Show options
/Quiet
Quiet Mode, no user interaction
/Passive
No way to participate in the mode-only display the process bar
/Q [n | B | r | f]
Set the User Interface Level
N-No user interface
B-Basic Interface
R-simplified interface
F-complete interface (default)
/Help
Help Information
Restart Option
/Norestart
Do not restart after installation
/Promptrestart
Prompt the user to restart (if necessary)
/Forcerestart
Always restart the computer after installation
Log options
/L [I | w | e | a | r | u | c | m | o | p | v | x | + |! | *] <LogFile>
I-status message
W-non-fatal warning
E-all error messages
A-Start Operation
R-operation-specific records
U-user request
C-initial interface parameters
M-out of memory or fatal exit Information
O-insufficient disk space message
P-terminal attributes
V-Detailed output
X-Additional debugging information
+-Extend to existing Log Files
! -Refresh each line to the log
*-Record all information except v and x
/Log <LogFile>
Same as/l * <LogFile>
Update options
/Update <Update1.msp> [; Update2.msp]
Application update
/Uninstall <PatchCodeGuid> [; Update2.msp]/package <Product. msi | ProductCode>
Delete product updates
Repair options
/F [p | e | c | m | s | o | d | a | u | v] <Product. msi | ProductCode>
Repair Product
P-only ...... the remaining full text>