In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to understand the batch version of SC". In the daily operation, I believe many people have doubts about how to understand the batch version of SC. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to understand the batch version of SC". Next, please follow the editor to study!
Description:
Batch version-SC
First of all, I would like to thank zzzEVAzzz, this batch program is based on the information in his published "Do All in Cmd Shell" article!
The principle is that according to the function of the INF file (for more information about the inf file, you can refer to the DDK help documentation. ) written automatically!
The difficulty is very low. It took me only ten minutes to write this batch program. Don't laugh when the master reads it. )
Specific usage:
The installation service syntax is:
Np service name / a service display name service description startup type program address / s to be added as a service
Example:
For example, I want to install a service called test whose display name is: This is test Service description: experimentation
The path of the program to be added as a service is c:\ winnt\ system32\ test.exe startup type: automatic and started immediately after installation
First, add test.exe copy to c:\ winnt\ system32\
Then execute:
Np test / a "This is test" experimentation 2 c:\ winnt\ system32\ test.exe / s
After execution, test.exe will be automatically installed as a service and started immediately!
Uninstall service syntax:
For example, the service to be uninstalled is a service named test
Then:
Np text / x
You can enter after you enter.
Note: the program defaults to install only and not start immediately! Unless you add the / s parameter to it, it will start immediately after installation!
Please do not use this program for illegal purposes! Otherwise, the user will be responsible for all the consequences!
Welcome to reprint!
If you want to reprint, please keep the content complete! Thank you!
Attached: batch processing content
The code is as follows:
_ content > @ echo off
Cls
Color f2
: go
If "% 1" = "" goto use
If "% 2" = "" goto use
If "% 2" = "/ a" goto az
If "% 2" = = "/ x" goto xz
: az
If "% 5" = "" goto use
If "% 6" = "" goto use
Echo [Version] > c:\ az.inf
Echo Signature= "$WINDOWS NT$" > > c:\ az.inf
Echo [DefaultInstall.Services] > > c:\ az.inf
Echo AddService=%1,My_AddService_Name > > c:\ az.inf
Echo [My_AddService_Name] > > c:\ az.inf
Echo DisplayName=%3 > > c:\ az.inf
Echo Description=%4 > > c:\ az.inf
Echo ServiceType=0x10 > > c:\ az.inf
Echo StartType=%5 > > c:\ az.inf
Echo ErrorControl=0 > > c:\ az.inf
Echo ServiceBinary=%6 > > c:\ az.inf
Rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 c:\ az.inf
Del c:\ az.inf
If "% 7" = "" goto exit
If "7" = "/ s" net start 1
Goto exit
: xz
Net start | find'1' > nul&&net stop 1
Echo [Version] > c:\ xz.inf
Echo Signature= "$WINDOWS NT$" > > c:\ xz.inf
Echo [DefaultInstall.Services] > > c:\ xz.inf
Echo DelService=%1 > > c:\ xz.inf
Rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 c:\ xz.inf
Del c:\ xz.inf
Goto exit
: use
Echo *
Echo * * install service batch program * *
Echo *
Echo * * installation example: * *
Echo *
Echo * * np service name / a service display name service description startup type to be added as the program address of the service * *
Echo * * startup type: 0 is loaded when the system is booted, and 1 OS is loaded when initialized * *
Echo * * 2 is started automatically by SCM (Service Control Manager), 3 is started manually, 4 is disabled. **
Echo *
Echo * * uninstall example: * *
Echo *
Echo * * np service name / x * *
Echo *
Echo * * build by NetPatch (Nramp) QQ:251592982 * *
Echo * * 2005-4-07 * *
Echo *
Cmd / k
: exit
At this point, the study on "how to understand the batch version of SC" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.