In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to achieve batch cmd desktop shortcut creation tool," interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "how to achieve batch cmd desktop shortcut creation tool" bar!
The core code is as follows
@echo offtitle Desktop shortcut creation tool!> nul 2>&1 REG.exe query "HKU\S-1-5-19" || ( ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs" ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs" "%TEMP%\Getadmin.vbs" DEL /f /q "%TEMP%\Getadmin.vbs" 2>nul Exit /b)set jb51name=Ditto3.lnkset jb51path=%~dp0set jb51exec=%~dp0Ditto.exemshta _VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\%jb51name%""):b.TargetPath=""%jb51exec%"":b.WorkingDirectory=""%jb51path%"":b.Save:close")
parameter description
>nul 2>&1 REG.exe query "HKU\S-1-5-19" || ( ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs" ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs" "%TEMP%\Getadmin.vbs" DEL /f /q "%TEMP%\Getadmin.vbs" 2>nul Exit /b)
The above paragraph is administrator privileges to run itself
set jb51name=Ditto3.lnk
set jb51path=%~dp0
set jb51exec=%~dp0Ditto.exe
jb51name stands for shortcut name
jb51path is path
jb51 exec is the path to the completed exe file, usually with the suffix exe.
In addition, %~dp0 in bat indicates the current directory.
in fact, it is to pass the reference for vbs through bat.
path
The renderings are as follows
Today, Xiaobian also sorted out a little knowledge test without problems.
Later, you can modify the document according to your own requirements.
The following is the code for deleting shortcuts.
Remove Desktop Shortcuts.bat
@echo offtitle Desktop Shortcuts Removal Tool!> nul 2>&1 REG.exe query "HKU\S-1-5-19" || ( ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs" ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs" "%TEMP%\Getadmin.vbs" DEL /f /q "%TEMP%\Getadmin.vbs" 2>nul Exit /b)ping -n 2 127.1>nuldel /f /q "%userprofile%"\Desktop\"Ditto.lnk"del /f /q "%userprofile%"\Desktop\"Ditto.lnk"exit Here, I believe that everyone has a deeper understanding of "How to realize batch cmd desktop shortcut creation tool", so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.