Tag:BAT

  • Zabbix combined with bat script to achieve multiple application status monitoring method

    Time:2022-9-24

    Scenario simulation: Some domestic enterprises need to run certain window programs (ie. exe) to support important business operations. Once these important window programs are interrupted, it will cause huge economic losses or affect work efficiency, with such serious consequences. So I want to monitor the status of multiple programs through zabbix. Once these important window […]

  • How to hide the CMD window when running bat (BAT hides the window and hides the running bat file)

    Time:2022-6-25

    Here, developeppaper simply sorts out common methods for your convenience. All through VBScript code.The method of hiding CMD window when running bat can edit a vbs script to run batch program with hidden window. Copy codeThe codes are as follows: Set ws = CreateObject(“Wscript.Shell”)ws. Run “CMD /c batch program name”, vbhide Copy the above code […]

  • Methods for vbs script and bat batch to delete itself

    Time:2022-6-16

    Vbs script and bat batch self deletion method (suicide)Delete own: vbsSave the following script as selfkill VBS or selfkill vbe: Copy codeThe codes are as follows: Set fso = CreateObject(“Scripting.FileSystemObject”) f = fso.DeleteFile(WScript.ScriptName) WScript.Echo( WScript.ScriptName) Then run it to see if selfkill VBS magically disappeared? And the following dialog box is displayed normally^*^The above script […]

  • Description and use of uniq command in Linux operating system

    Time:2022-6-15

    The function of uniq command: display unique lines, and only display those lines that repeat consecutively once! Next, through practical examples: [[email protected] ~]# cat test boy took bat home boy took bat home girl took bat home dog brought hat home dog brought hat home dog brought hat home If you look at the contents […]

  • The method of using Windows bat script command to start MySQL service with one click

    Time:2022-6-13

    @echo off rem Copyright (c) 2019 Moses and/or its affiliates. rem Get Administrator Rights >nul 2>&1 “%SYSTEMROOT%\system32\cacls.exe” “%SYSTEMROOT%\system32\config\system” if ‘%errorlevel%’ NEQ ‘0’ ( goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt echo Set UAC = CreateObject^(“Shell.Application”^) > “%temp%\getadmin.vbs” echo UAC.ShellExecute “%~s0”, “”, “”, “runas”, 1 >> “%temp%\getadmin.vbs” “%temp%\getadmin.vbs” exit /B :gotAdmin if exist “%temp%\getadmin.vbs” […]

  • Vbs script for exe2bat (EXE to bat)

    Time:2022-6-1

    Script for exe2bat Copy codeThe codes are as follows: fp=wscript.arguments(0) fn=right(fp,len(fp)-instrrev(fp,””)) with createobject(“adodb.stream”) .type=1:.open:.loadfromfile fp:str=.read:sl=lenb(str) end with sll=sl mod 65536:slh=sl65536 with createobject(“scripting.filesystemobject”).opentextfile(fp&”.bat”,2,true) .write “@echo str=””” for i=1 to sl bt=ascb(midb(str,i,1)) if bt<16 then .write “0” .write hex(bt) if i mod 128=0 then .write “””_>>debug.vbs“+vbcrlf+”@echo +””” next .writeline “””>>debug.vbs”+vbcrlf+”@echo with wscript.stdout:r=vbcrlf”_ +”:for i=1 to len(str) step […]

  • Bat when performing set /a calculation after intercepting the date and time, 08 and 09 will be regarded as illegal octal digits

    Time:2022-5-31

    How to judge the time interval in batch bat? set XTHH=%time:~0,2% set XTMM=%time:~3,2% set JKSJ=%XTHH%%XTMM% if %JKSJ% leq 0830 ( echo 11111111111111 ) else ( if %JKSJ% geq 1730 ( echo 2222222222 ) else ( echo 333333333333333 ) ) Implementation function: when jksj (0830<=jksj<=1730), output 333333, otherwise output other (111111 or 2222222222).When jksj is less […]

  • Bat, which is often used in batch processing, is recommended

    Time:2022-2-2

    Batch processing of converting C disk to NTFS format Copy codeThe code is as follows: @ ECHO OFF  @ ECHO.  @ ECHO. Shuo [email protected] ECHO —————————————————————  @Echo # NTFS format is the format recommended by WinXP. Converting to NTFS format can improve the efficiency of hard disk [email protected]} efficiency, and access rights can be set to protect files. But NTFS format […]

  • Bat batch, VBScript batch installation, font script sharing

    Time:2022-1-18

    According to the requirements of the new system, it is often necessary to deploy some fonts that are not in the original system. In order to save trouble, I used to ask users to manually install font files. Although the ease of use of windows is quite good, it is still necessary to take care […]

  • Windows can automatically run nodejs application in the background through VBS + bat

    Time:2021-12-6

    Environment: Windows 8.1 The principle is to run bat files through VBS windowless background 1. Create a new. Bat file. The contents are as follows: ? 1 2 3 4 @ECHO ON  f: cd \repositories\yyper start /b nodemon index.js -f 2. Create a new. VBS file. The contents are as follows: ? 1 2 Set […]

  • Automatically run batch bat files as administrator (VBS and bat)

    Time:2021-9-24

    However, the batch script will not be run as an administrator by default. Generally, I will name the script “XXXXXX (please right-click and run as an administrator!). Bat”, but some users will ignore this prompt and run directly. At this time, the script fails due to insufficient permissions. We can use an alternative method. When […]

  • Bat decryption tool

    Time:2021-8-17

    @echo offmode con: cols=80 lines=25:indexcolor 27clsecho                    ╭──────────── ──╮echo                    │                             │echo     ╭─────────┤       Bat decryption tool     ├─────────╮echo    │              │                             │                  │echo    │              ╰────────── ────╯                  │echo    │                                                                 │echo    │                                                                 │echo     │     This tool is used to decrypt the encryption batch that confuses the text encoding type!             │echo    │                                                                 │echo     │     […]