|
楼主 |
发表于 2021-1-16 09:31:27
|
显示全部楼层
- @echo off
- Setlocal enabledelayedexpansion
- reg query HKU\S-1-5-20>nul || echo;CreateObject^("Shell.Application"^).ShellExecute "%~f0", "", "", "runas", 1 > "%temp%\getadmin.vbs" && cscript //b "%temp%\getadmin.vbs" && exit /b & del "%temp%\getadmin.vbs" /f /q>nul 2>nul
- pushd "%CD%"&& CD /D "%~dp0"
- for /f "delims=" %%a in ('mshta "%~f0"') do set path1=%%a
- del /s /q "%path1%\BOOT\USM1PE8F.WIM"
- del /s /q "%path1%\BOOT\USM1PE8L.WIM"
- del /s /q "%path1%\BOOT\USM7PE6L.WIM"
- del /s /q "%path1%\BOOT\USM7PE8L.WIM"
- del /s /q "%path1%\BOOT\USM8PE6F.WIM"
- del /s /q "%path1%\BOOT\USM8PE6L.WIM"
- del /s /q "%path1%\USM_TOOL\10DRV\Ncardx86.CAB"
- del /s /q "%path1%\USM_TOOL\10DRV\Scardx86.7z"
- del /s /q "%path1%\USM_TOOL\10DRV\Vcardx86.7z"
- del /s /q "%path1%\USM_TOOL\10DRV\Vcardx86.CAB"
- del /s /q "%path1%\USM_TOOL\8DRV\Ncardx64.CAB"
- del /s /q "%path1%\USM_TOOL\8DRV\Scardx64.7z"
- del /s /q "%path1%\USM_TOOL\8DRV\Vcardx64.7z"
- del /s /q "%path1%\USM_TOOL\8DRV\Vcardx64.CAB"
- <script>
- var Shell = new ActiveXObject("Shell.Application");
- var Folder = Shell.BrowseForFolder(0, "选择目标以操作", 0); //起始目录为:桌面
- if (Folder != null) {
- Folder = Folder.items();
- Folder = Folder.item();
- Folder = Folder.Path;
- new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(Folder);
- }
- close();
- </script>
复制代码 |
|