├── .gitattributes ├── C盘防毒批处理.bat ├── NB1_SW ├── DateAndTime │ ├── DateParts.bat │ ├── W32DOW.bat │ ├── W32tmSleep.bat │ ├── getTime.bat │ └── sleeptp.bat ├── HardwareCheck │ ├── ACCHK.CMD │ ├── AM7HWCHK.CMD │ ├── AM7HWCHK_normal.CMD │ ├── AM7OBEHW.CMD │ ├── AM7OBEHW_normal.CMD │ ├── AM7WPETST.CMD │ ├── BATTCHK.CMD │ ├── CAMCHK.CMD │ ├── CPUCHK.CMD │ ├── HDDCHK.CMD │ ├── LCDCHK.CMD │ ├── ODDCHK.CMD │ ├── RAMCHK.CMD │ ├── SEPPID.CMD │ ├── SEVTAG.CMD │ ├── WIRECHK.CMD │ └── wcfgset.cmd ├── Java │ ├── getJavaVersion.bat │ ├── javaDetect.bat │ ├── javaExtInstaller.bat │ └── javaHybrid.bat ├── LICENSE ├── Mainbatch │ ├── FOSP.CMD │ ├── ISRT.cmd │ ├── dell.txt │ ├── fdosdrv.cmd │ ├── flocaldrv.cmd │ ├── hdos.cmd │ ├── hship.cmd │ ├── htest.cmd │ ├── ip.txt │ ├── ipgetmacid.cmd │ ├── reset_model.cmd │ ├── setmainx64.cmd │ └── stnmainx64.cmd ├── ProcessesUtils │ ├── StartPID.bat │ └── startHidden.bat ├── README.md ├── dataStructures │ └── binaryTree.bat ├── discovers_and_bugs │ ├── bugs │ │ ├── EOFbreaker.bat │ │ ├── FORbreaker.bat │ │ ├── ParamExpansionAndDriveVars │ │ ├── callCrasher.bat │ │ ├── callForCallIf.txt │ │ ├── callbrackets.bat │ │ ├── forCrasher.bat │ │ ├── forEmptyTokens │ │ ├── ifCrasher.bat │ │ ├── ifDefined.bat │ │ ├── pipeIf.bat │ │ └── remCrasher.bat │ └── discovers │ │ ├── DPATH │ │ ├── FirmwareType.bat │ │ ├── anonymous.bat │ │ ├── callArgs.bat │ │ ├── callcolons.bat │ │ ├── certutil.txt │ │ ├── defaultJumpDir.bat │ │ ├── emptyTokens.bat │ │ ├── fileRedirection.bat │ │ ├── findEscapeQuote.bat │ │ ├── firmware_type.txt │ │ ├── forL.bat │ │ ├── internal_commands.txt │ │ ├── keys │ │ ├── msg.txt │ │ ├── negativeGOTO.bat │ │ ├── plainfor │ │ ├── promptFeatures.txt │ │ ├── tasklist │ │ └── typeList.bat ├── fileUtils │ ├── SHA512.bat │ ├── dirTimes.bat │ ├── encodingDetect.bat │ ├── extInstaller │ ├── fileModifiedTime.bat │ ├── fileTimes.bat │ ├── fileassembler.bat │ ├── firstLines.bat │ ├── firstLinesP.bat │ ├── folderOwner.bat │ ├── listFS.bat │ ├── md2.bat │ ├── md4.bat │ ├── md5.bat │ ├── progressCopy.bat │ ├── sha1.bat │ ├── sha256.bat │ ├── sha384.bat │ ├── splitBin.bat │ └── tailHead.bat ├── hybrids │ ├── .net │ │ ├── FileTimeFilerJS.bat │ │ ├── ProcessStartJS.bat │ │ ├── WebClientDownload.bat │ │ ├── bat2exe.bat │ │ ├── c │ │ │ ├── mouse.bat │ │ │ ├── mouseSniffer.bat │ │ │ ├── quickEdit.bat │ │ │ ├── screenCapture.bat │ │ │ └── windowMode.bat │ │ ├── colorInput.bat │ │ ├── coloroutput.bat │ │ ├── dirTimesNET.bat │ │ ├── fileTimesNET.bat │ │ ├── getCmdPID.bat │ │ ├── gzipJS.bat │ │ ├── keyStates.bat │ │ ├── keyreader.bat │ │ ├── listEncodings.bat │ │ ├── msbuild │ │ │ └── checkPort.bat │ │ ├── passHidder.bat │ │ ├── powershell │ │ │ └── checkRemotePort.bat │ │ ├── selectFolder.bat │ │ ├── split.net.bat │ │ └── systemSounds.bat │ ├── iexpress │ │ ├── OKPopup.bat │ │ ├── bat2exeIEXP.bat │ │ ├── hidder.bat │ │ ├── iexpYNButton.bat │ │ ├── licenseAgreement.bat │ │ └── read.me │ ├── jscript │ │ ├── FileTimeFilterJS.bat │ │ ├── ShellRunJS.bat │ │ ├── UIautoLogin.bat │ │ ├── WinHTTPDownloadJS.bat │ │ ├── XMLHTTPDownloadJS.bat │ │ ├── base64.bat │ │ ├── deleteJS.bat │ │ ├── dirTimesJS.bat │ │ ├── drivesInfoJS.bat │ │ ├── fileTImesJS.bat │ │ ├── imageProcessing │ │ │ └── convImg.bat │ │ ├── imgInfo.bat │ │ ├── jsonextractor.bat │ │ ├── jspopup.bat │ │ ├── julian.bat │ │ ├── mediarunner.bat │ │ ├── oneDriveSync.bat │ │ ├── pdfPageCounter.bat │ │ ├── phisycalDrives.bat │ │ ├── pinnerJS.bat │ │ ├── ppt2pdf.bat │ │ ├── printJS.bat │ │ ├── replacer.bat │ │ ├── sendKeys.bat │ │ ├── shortcutJS.bat │ │ ├── splitjs.bat │ │ ├── spplayer.bat │ │ ├── toHtmlEnt.bat │ │ ├── tooltipInfo.bat │ │ ├── winhttpjs.bat │ │ ├── xpath.bat │ │ └── zipjs.bat │ ├── makecab │ │ ├── cabSplitter.bat │ │ ├── cabdir.bat │ │ └── fileinf.bat │ ├── mshta │ │ ├── OpticalDrivesCount.bat │ │ ├── atob.bat │ │ ├── btoa.bat │ │ ├── freeMem.bat │ │ ├── printClip.bat │ │ ├── say.bat │ │ ├── soundPlayer.bat │ │ ├── start.bckgrnd.bat │ │ ├── ui.extensions │ │ │ ├── choose.button.bat │ │ │ ├── countdown.bat │ │ │ ├── passwordSubmiter.bat │ │ │ └── radioButtons.bat │ │ └── weekNumber.bat │ └── wsh │ │ ├── EjectCD.bat │ │ ├── vbexecutor.bat │ │ └── win32process.bat ├── math │ └── removeLeadingZeroes.bat ├── network │ ├── bitsDownloader.bat │ └── checkNet.bat ├── obe-auto │ ├── CrePar.txt │ ├── FixUSB.exe │ └── Setup.bat ├── other │ ├── ArrayListPOC.bat │ ├── continueEnter.bat │ ├── listBrosers.bat │ ├── listBrowsers.bat │ ├── officeVersion.bat │ ├── pushdCounter.bat │ ├── pushdCounterTmpF.bat │ └── setlocalLevelCounter.bat ├── printing │ └── printCHM.bat ├── qf7 │ └── SLT2_RUNIN_CHECK.bat ├── stringutils │ ├── countOfSubstrings.bat │ ├── endsWith.bat │ ├── indexOf.bat │ ├── lastIndexOf.bat │ ├── reverse.bat │ ├── split.bat │ ├── startsWith.bat │ ├── stringToHex.bat │ ├── strlen0.3 │ ├── strlen2.5 │ └── strlen2.9 └── system │ ├── checkPermissions.bat │ ├── chkPermissions.bat │ ├── monitorInfo.bat │ └── netVersions.bat ├── README.md ├── U盘做加密狗.bat ├── bat解密工具.bat ├── life-hack ├── AutoConnectWIFI.bat ├── ChangeLogContent.bat ├── Create_WIFI_SSID.bat ├── DisNetwork.BAT ├── EnNetwork.BAT ├── RouterX.bat ├── Setting_Windows_Reboot_Cycle.bat ├── TestMode.reg ├── Test_ChkWIFI.bat ├── Windows_Warmboot_Cycle.bat ├── basicset.bat ├── detect_drive_UDisk.bat ├── ipmapping copy.bat ├── ipmapping.bat ├── loop_reboot.bat ├── rename-snapshots-by-serial-number.bat └── windows_install.bat ├── lockcmd.bat ├── rar对指定数量的文件进行批量压缩.bat ├── vbstree.vbs ├── xp下确定最后的盘符.bat ├── 一分钟打造绿色版备份同步工具 ├── backup_to_office.cmd ├── get_backup_to_home.cmd ├── ncftpput.exe ├── rar.exe ├── unrar.exe ├── wget.exe ├── 使用方法.txt └── 文件列表.txt ├── 一键清理系统垃圾文件.bat ├── 一键转移桌面-收藏夹-文档多用户版.bat ├── 不显示扩展名.bat ├── 不显示隐藏文件.bat ├── 临时运行(bat).bat ├── 为Administrator改名.bat ├── 交换重命名(cmd).VBS ├── 交换重命名.vbs ├── 今天访问过的程序文件所在目录.cmd ├── 以文件夹名为名建立文本文件.cmd ├── 保存剪贴板中的文本.vbs ├── 保存剪贴板中的文本并编辑.vbs ├── 修复系统关联.bat ├── 修改GB搜索引擎.bat ├── 全删.bat ├── 全盘删除所有文件夹下的Thumbs.db.bat ├── 全盘禁止运行指定程序 ├── list.ini └── 全盘禁止运行指定程序.cmd ├── 删除历史记录.bat ├── 删除右键“新建”菜单项目.bat ├── 删除用户.bat ├── 删除重复行.bat ├── 判断光驱里有无光盘.bat ├── 判断分区格式.bat ├── 刷博客.vbs ├── 刷新策略.bat ├── 加密.bat ├── 卸载inf文件.CMD ├── 去除msconfig的开机提示.vbs ├── 发送邮件.vbs ├── 史上最牛X批处理工具包09年7月11日更新版 - Copy.bat ├── 史上最牛X批处理工具包09年7月11日更新版.bat ├── 右键菜单 显示隐藏扩展名及文件.bat ├── 右键菜单 ├── “添加管理快捷方式”加入到右键菜单.vbs ├── 右键添加新建BAT文件.bat └── 显示隐藏扩展名.bat ├── 合并同名的图片和rar文件.bat ├── 合并文本 ├── 1.txt ├── 2.txt ├── 合并文本.bat ├── 合并文本2.bat └── 合并文本3.bat ├── 同一目录下同一类型的文件名改成连续的数字名.bat ├── 启动OFFICE.bat ├── 在桌面创建快捷方式.vbs ├── 备份文件 ├── 备份文件并上传至FTP服务器.bat └── 备份服务.bat ├── 备份文件并上传至FTP服务器.bat ├── 复制文本内容.vbs ├── 复制目录结构.bat ├── 多功能系统优化设置.cmd ├── 字符串处理 ├── P91Test │ ├── P91.LOG │ ├── P91.bat │ └── P91Capture.bat ├── SubstituteTextContent.bat ├── substr │ ├── Motor_Back.bat │ ├── substr.bat │ └── uu1_result_motor_for_0414.bat ├── 取字符长度.bat └── 求字符串长度.bat ├── 安装inf文件.CMD ├── 定时关机.cmd ├── 定时备份文件并FTP上传至备份服务器(原版).bat ├── 宽带连接.bat ├── 将txt中的AAA替换为BBB.vbs ├── 将txt文件名写入首行(保留源文件).bat ├── 将所在目录的BAT文件合并成一个BAT文件,通过 选择 运行其中之一.bat ├── 将文件夹变为磁盘.bat ├── 将文本复制到剪贴板.vbs ├── 将文本复制到剪贴板2.vbs ├── 带密码的批处理.bat ├── 快速创建文件夹.bat ├── 快速清理垃圾文件安装修改版 ├── install.CMD ├── 快速清理垃圾文件.bat └── 注册右键.reg ├── 打开快捷方式指向的目录.bat ├── 打开系统自带命令行参考.bat ├── 批处理弹窗提示 ├── 1.txt └── 批处理弹窗提示.bat ├── 批处理生成注册表项.bat ├── 批处理生成的CMD命令帮助清单.bat ├── 批量修改系统图标.bat ├── 批量安装补丁并重启.bat ├── 批量建立文件夹.bat ├── 批量重命名 (按指定拓展名).bat ├── 批量重命名.bat ├── 指定每天运行的程序.bat ├── 按创建时间显示完整路径.cmd ├── 按扩展名分类.bat ├── 按软件分类建立文件夹.cmd ├── 换马甲.bat ├── 提取IE缓存的指定文件.bat ├── 提取两个文件内容的不同之处.cmd ├── 提示窗口 ├── 有图标.vbs └── 没有图标.vbs ├── 改名复制文件.cmd ├── 教程 ├── Run.txt ├── VBS初级教程.txt ├── Visual Basic 和 VBS 中的函数,msgbox.txt ├── XPWMP、OFFICE、FLASH补丁自动安装批处理.txt ├── del 语句的意思.txt ├── net user.txt ├── vbs运行完后删除自身.txt ├── 全功能右键邮(存在bug).txt ├── 常用注册表文件.CMD ├── 开启浏览器.txt ├── 批处理弹窗提示小结.txt ├── 提示窗口换行.vbs ├── 文件名.txt ├── 时间判断.txt ├── 查找行头或行尾.txt ├── 注册DLL文件.txt ├── 注销DLL文件.txt ├── 环境变量.txt ├── 组策略备份批处理.txt ├── 设置环境变量.txt ├── 设置目录.txt ├── 路径.txt ├── 进程控制.txt ├── 选择指令.txt └── 隐藏运行.txt ├── 文件备份器 ├── readme.txt └── 文件备份器V2.3修改版2.cmd ├── 文件夹伪装.bat ├── 文件夹变磁盘.bat ├── 文件归类整理器.bat ├── 文件替换能手 ├── .ReplacerTemp │ └── Clear_WFP_Message.vbs ├── Replacer.cmd ├── start.bat ├── 替换系统文件.txt └── 还原系统文件.txt ├── 断开ADSL连接.bat ├── 新建“当前日期文件夹” ├── reg.reg ├── 创建当前日期文件夹.bat └── 自动删除空文件夹并生成文件列表.bat ├── 新建带模板的批处理.bat ├── 显示所有分区的剩余空间(以MB为单位).cmd ├── 显示扩展名.bat ├── 显示自己的IP.bat ├── 显示隐藏文件.bat ├── 更换壁纸.bat ├── 替换txt中的文字.vbs ├── 查找最新的文件.bat ├── 模拟按键—键盘灯.vbs ├── 每隔2秒新建一个txt文件,文件名由1~10.bat ├── 注册表 ├── AutoRun.REG ├── reg转bat.bat ├── 图标尺寸.REG ├── 导入文件夹内所有注册表项.bat ├── 导入文件夹内的字体.bat ├── 导出注册表的键值.bat ├── 导出注册表的键值2.bat ├── 导出注册表的键值(完美版).bat ├── 批处理读注册表的Run下面的值.bat ├── 注册表权限设置.bat ├── 解锁注册表.BAT ├── 设注册表某个键的键值为变量1.bat ├── 设注册表某个键的键值为变量2.bat ├── 重新注册所有的dll.bat └── 锁注册表.BAT ├── 添加、删除新建菜单.vbs ├── 添加用户并注销.bat ├── 添加网址到收藏夹.bat ├── 瑞星杀毒软件2008批处理版.bat ├── 生成包含该批处理文件所在目录及所有子目录的所有文件超链接的网页.bat ├── 生成指定内容的文本文件.bat ├── 百度关键字搜索.bat ├── 确认bat后运行.bat ├── 碎片整理.bat ├── 移动文件.bat ├── 窗口设置 ├── 1.bat ├── 2.bat └── 3.bat ├── 第三方工具 ├── BAT反编译器 │ ├── BAT反编译器.exe │ └── 配置文件.ini ├── BeeNotice - 显示文字到屏幕上 │ ├── 1.txt │ ├── 2.bat │ ├── BeeNotice.bat │ ├── BeeNotice.exe │ └── 复件 2.bat ├── CMDOW │ ├── HOTFIX.CMD │ └── 新建 文本文档副本.txt ├── CSty │ ├── CSty.exe │ ├── 其他信息.txt │ ├── 普及讲解CSty.bat │ ├── 高级范例CSty-KeyPrs.bat │ ├── 高级范例Caps-Num.bat │ └── 高级范例Loading.bat ├── KeyPrs │ ├── KeyPrs.exe │ ├── 其他信息.txt │ └── 普及讲解KeyPrs.bat ├── PngMate.rar ├── SetWallPaper.7z ├── SetWallPaper │ ├── SetWallPaper.exe │ └── 例.txt ├── devcon │ ├── EULA.txt │ ├── i386 │ │ ├── 1.txt │ │ ├── devcon.exe │ │ ├── 删除U盘.bat │ │ ├── 启用U盘.bat │ │ ├── 禁用U盘.bat │ │ └── 连接U盘.bat │ └── ia64 │ │ └── devcon.exe ├── finfo │ ├── finfo.exe │ ├── 其他信息.txt │ └── 普及讲解Finfo.bat ├── mystart.exe ├── regjump 1.01 绿色版_可打开注册表指定位置.rar ├── setx.rar ├── wselect-双击选择文件(夹) │ ├── Wselect.exe │ ├── Wselect.txt │ └── 原版.bat ├── 中英文对照说明.xls ├── 凌枫☆气泡提示 │ ├── 凌枫☆气泡提示.exe │ └── 凌枫☆气泡提示.txt ├── 删除文件到回收站 │ ├── 2.txt │ ├── NewBAT.bat │ └── Recycle.exe ├── 又一个气泡工具 │ ├── estTrayTip.exe │ └── estTrayTip.txt ├── 图片处理 │ ├── nconvert.exe │ └── 批量将jpg变为bmp.bat ├── 批处理气泡程序BalloonTip │ ├── 范例.bat │ └── 说明.txt └── 第三方工具CIdo │ ├── CIdo.exe │ └── 普及讲解CIdo.bat ├── 系统优化.bat ├── 结束进程.bat ├── 美化文件夹背景.bat ├── 获取U盘盘符和可用容量.bat ├── 获取完整路径.bat ├── 获取当前用户名和密码.bat ├── 获取某路径下的所有文件名.cmd ├── 解密.bat ├── 让XP开口说话.vbs ├── 让屏幕显示硬件错误的信息(恶搞类).bat ├── 运行a.txt中的程序.bat ├── 运行剪贴板中的文件.vbs ├── 重启进程.bat ├── 限制条件批量建立文件夹.cmd ├── 随机替换欢迎界面和桌面.bat └── 隐藏批处理运行窗口(两段).vbs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /C盘防毒批处理.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/C盘防毒批处理.bat -------------------------------------------------------------------------------- /NB1_SW/DateAndTime/DateParts.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem gets Date Parts 3 | rem by Vasil "npocmaka" Arnaudov 4 | rem 21.01.15 - improvement was proposed by Ildar Shaimordanov - a.k.a siberia-man 5 | rem - to use empty folder to increase performance 6 | for /f "skip=10 tokens=2,3,4,5,6,7,8 delims=: " %%D in (' 7 | robocopy /l * "%windir%\System32\wbem\MOF\bad" "%windir%\System32\wbem\MOF\bad" /ns /nc /ndl /nfl /np /njh /XF * /XD * 8 | ') do ( 9 | set "dow=%%D" 10 | set "month=%%E" 11 | set "day=%%F" 12 | set "HH=%%G" 13 | set "MM=%%H" 14 | set "SS=%%I" 15 | set "year=%%J" 16 | ) 17 | 18 | echo Day of the week: %dow% 19 | echo Day of the month : %day% 20 | echo Month : %month% 21 | echo hour : %HH% 22 | echo minutes : %MM% 23 | echo seconds : %SS% 24 | echo year : %year% 25 | -------------------------------------------------------------------------------- /NB1_SW/DateAndTime/W32DOW.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | rem :: prints the day of the week 4 | rem :: works on Vista and above 5 | rem :: by Vasil "npocmaka" Arnaudov 6 | 7 | rem :: getting ansi date ( days passed from 1st jan 1601 ) , timer server hour and current hour 8 | FOR /F "skip=16 tokens=4,5 delims=:( " %%D in ('w32tm /stripchart /computer:localhost /samples:1 /period:1 /dataonly /packetinfo') do ( 9 | set "ANSI_DATE=%%D" 10 | set "TIMESERVER_HOURS=%%E" 11 | goto :end_for ) 12 | :end_for 13 | set "LOCAL_HOURS=%TIME:~0,2%" 14 | if "%TIMESERVER_HOURS:~0,1%0" EQU "00" set TIMESERVER_HOURS=%TIMESERVER_HOURS:~1,1% 15 | if "%LOCAL_HOURS:~0,1%0" EQU "00" set LOCAL_HOURS=%LOCAL_HOURS:~1,1% 16 | set /a OFFSET=TIMESERVER_HOURS-LOCAL_HOURS 17 | 18 | rem :: day of the week will be the modulus of 7 of local ansi date +1 19 | rem :: we need need +1 because Monday will be calculated as 0 20 | rem :: 1st jan 1601 was Monday 21 | 22 | rem :: if abs(offset)>12 we are in different days with the time server 23 | 24 | IF %OFFSET%0 GTR 120 set /a DOW=(ANSI_DATE+1)%%7+1 25 | IF %OFFSET%0 LSS -120 set /a DOW=(ANSI_DATE-1)%%7+1 26 | IF %OFFSET%0 LEQ 120 IF %OFFSET%0 GEQ -120 set /a DOW=ANSI_DATE%%7+1 27 | 28 | 29 | echo Day of the week: %DOW% 30 | exit /b 2147483648 31 | endlocal 32 | -------------------------------------------------------------------------------- /NB1_SW/DateAndTime/W32tmSleep.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: yet another sleep emulator working on everything from NT and above 3 | if "%~1"=="" goto :help 4 | ECHO.%*| FINDSTR /R /X /C:"[0-9][0-9]*" >NUL || goto :help 5 | IF %~1 LSS 0 goto :help 6 | 7 | setLocal 8 | set /a adj=%~1/2+1 9 | w32tm /stripchart /computer:localhost /period:1 /dataonly /samples:%adj% >nul 2>&1 10 | endLocal 11 | 12 | goto :eof 13 | :help 14 | echo. 15 | echo %~n0 16 | echo Sleep emulator 17 | echo Wait for a specified number of seconds. 18 | echo. 19 | echo Usage: CALL %~n0 seconds 20 | echo. 21 | echo seconds - seconds to wait 22 | echo. 23 | echo. 24 | echo by Vasil "npocmaka" Arnaudov 25 | -------------------------------------------------------------------------------- /NB1_SW/DateAndTime/getTime.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: gets time using typePerf command 4 | :: with put some effort to be made fast and maximum compatible 5 | 6 | setlocal 7 | ::check if windows is XP and use XP valid counter for UDP performance 8 | if defined USERDOMAIN_roamingprofile (set "v=v4") else (set "v=") 9 | set "mon=" 10 | for /f "skip=2 delims=," %%# in ('typeperf "\UDP%v%\*" -si 0 -sc 1') do ( 11 | if not defined mon ( 12 | for /f "tokens=1-7 delims=.:/ " %%a in (%%#) do ( 13 | set mon=%%a 14 | set date=%%b 15 | set year=%%c 16 | set hour=%%d 17 | set minute=%%e 18 | set sec=%%f 19 | set ms=%%g 20 | ) 21 | ) 22 | ) 23 | echo %year%.%mon%.%date% 24 | echo %hour%:%minute%:%sec%.%ms% 25 | endlocal 26 | -------------------------------------------------------------------------------- /NB1_SW/DateAndTime/sleeptp.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: yet another sleep emulator working on everything from NT and above 3 | if "%~1"=="" goto :help 4 | ECHO.%*| FINDSTR /R /X /C:"[0-9][0-9]*" >NUL 2>NUL || goto :help 5 | IF %~1 LSS 0 goto :help 6 | 7 | typeperf "\System\Processor Queue Length" -si %~1 -sc 1 >nul 8 | 9 | goto :eof 10 | :help 11 | echo. 12 | echo %~n0 13 | echo Sleep emulator 14 | echo Wait for a specified number of seconds. 15 | echo. 16 | echo Usage: CALL %~n0 seconds 17 | echo. 18 | echo seconds - seconds to wait 19 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/ACCHK.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | 3 | :acchk1 4 | cls 5 | if exist ac.cmd del ac.cmd 6 | windelay 3 7 | BatteryInfo.exe AC>x:\ac.cmd 8 | call x:\ac.cmd 9 | if "%AC%"=="Off" goto fail1 10 | goto pass 11 | 12 | :acchk2 13 | color 0f 14 | cls 15 | if exist ac.cmd del ac.cmd 16 | windelay 3 17 | BatteryInfo.exe AC>x:\ac.cmd 18 | call x:\ac.cmd 19 | if "%AC%"=="Off" goto fail 20 | goto pass 21 | 22 | :pass 23 | set AC_CHK=PASS 24 | goto end 25 | 26 | :fail1 27 | color 4f 28 | echo ************************************************************** 29 | echo *****AC Check Fail,pls Check AC Adapter if OK**** 30 | echo ************************************************************** 31 | pause 32 | pause 33 | pause 34 | pause 35 | pause 36 | windelay 30 37 | goto acchk2 38 | 39 | :fail 40 | set msg=AC Check Fail 41 | set AC_CHK=FAIL 42 | goto end 43 | 44 | :end 45 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/AM7WPETST.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | :start 3 | REM *********************************************************************** 4 | REM ** File Name: AM7WPETST.CMD 5 | REM ** 6 | REM ** Description: 7 | REM ** AM7WPETST.CMD is for AM7 model HW Test under WINPE 8 | REM ** 9 | REM ************************************************************************ 10 | 11 | echo. 12 | echo ******** Starting Test under WINPE for %Model% ********* 13 | echo. 14 | 15 | X: 16 | CD\ 17 | CALL INSTALL.BAT 18 | call x:\response.cmd 19 | 20 | SET AC_CHK= 21 | SET SEV_CHK= 22 | SET PPID_CHK= 23 | 24 | CALL ACCHK.CMD 25 | CALL SEVTAG.CMD 26 | CALL SEPPID.CMD 27 | 28 | IF "%AC_CHK%"=="PASS" IF "%SEV_CHK%"=="PASS" IF "%PPID_CHK%"=="PASS" GOTO START_HWCHK 29 | GOTO SPFAIL 30 | 31 | :START_HWCHK 32 | WINDELAY 3 33 | REM CALL WCFGDAT.CMD 34 | CALL AM7HWCHK.CMD 35 | IF NOT "%ERRLVL%"=="0" GOTO FAIL 36 | CALL REMOVE.BAT 37 | GOTO PASS 38 | 39 | :PASS 40 | SET ERRLVL=0 41 | GOTO END 42 | 43 | :SPFAIL 44 | ECHO ********************************************************* 45 | ECHO * SEVICETAG OR EPPID WRITE FAILED * 46 | ECHO ********************************************************* 47 | SET ERRLVL=1 48 | GOTO END 49 | 50 | :FAIL 51 | SET ERRLVL=1 52 | GOTO END 53 | 54 | :END 55 | CD X:\ 56 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/BATTCHK.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | REM *********************************************************************** 3 | REM ** Battery Check 4 | REM ** 5 | REM *********************************************************************** 6 | if exist BATT.CMD del BATT.CMD 7 | BatteryInfo.exe Cell>BATT.CMD 8 | 9 | windelay 1 10 | FIND /I "Cell=6" BATT.CMD 11 | if not errorlevel 1 goto cell6 12 | goto unknow 13 | 14 | :cell6 15 | set BATT=6 16 | goto end 17 | 18 | :unknow 19 | set msg=Battery Fail 20 | set BATT=UNKNOWN 21 | goto end 22 | 23 | :end 24 | 25 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/CAMCHK.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | REM *********************************************************************** 3 | REM ** Camera Check 4 | REM ** 5 | REM *********************************************************************** 6 | if exist usblist.txt del usblist.txt 7 | devcon find "USB\VID*" >usblist.txt 8 | windelay 1 9 | find /i "Cam" usblist.txt 10 | if errorlevel 1 goto camfail 11 | goto pass 12 | 13 | :camfail 14 | echo. 15 | echo ****** System have no install Camera Pls check ****** 16 | echo. 17 | set msg=Camera Fail 18 | set CAM_TP=NONE 19 | goto end 20 | 21 | :pass 22 | set CAM_TP=1 23 | goto end 24 | 25 | :end -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/CPUCHK.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | REM *********************************************************************** 3 | REM ** CPU Check 4 | REM ** 5 | REM *********************************************************************** 6 | if exist CPU.CMD del CPU.CMD 7 | PC_CPU /set>CPU.CMD 8 | 9 | windelay 1 10 | FIND /I "I5-4200H" CPU.CMD 11 | if not errorlevel 1 goto I5-4200H 12 | 13 | windelay 1 14 | FIND /I "I7-4710HQ" CPU.CMD 15 | if not errorlevel 1 goto I7-4710HQ 16 | 17 | windelay 1 18 | FIND /I "I7-4700HQ" CPU.CMD 19 | if not errorlevel 1 goto I7-4700HQ 20 | goto unknow 21 | 22 | :I5-4200H 23 | set CPU_TP=P1 24 | goto end 25 | 26 | :I7-4710HQ 27 | set CPU_TP=P2 28 | goto end 29 | 30 | :I7-4700HQ 31 | set CPU_TP=P3 32 | goto end 33 | 34 | 35 | :unknow 36 | set msg=CPU Fail 37 | set CPU_TP=UNKNOWN 38 | goto end 39 | 40 | :end 41 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/LCDCHK.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | REM *********************************************************************** 3 | REM ** LCD Check 4 | REM ** 5 | REM *********************************************************************** 6 | if exist EDID.CMD del EDID.CMD 7 | PC_EDID -EDID>EDID.CMD 8 | 9 | windelay 1 10 | FIND /I "KX2MW" EDID.CMD 11 | if not errorlevel 1 goto lcdset1 12 | FIND /I "MHFP8" EDID.CMD 13 | if not errorlevel 1 goto lcdset1 14 | FIND /I "4T17W" EDID.CMD 15 | if not errorlevel 1 goto lcdset1 16 | 17 | FIND /I "RN91N" EDID.CMD 18 | if not errorlevel 1 goto lcdset2 19 | FIND /I "M1WHV" EDID.CMD 20 | if not errorlevel 1 goto lcdset2 21 | goto unknow 22 | 23 | :lcdset1 24 | set LCDSZ=41 25 | goto end 26 | 27 | :lcdset2 28 | set LCDSZ=42 29 | goto end 30 | 31 | :unknow 32 | set msg=LCD Fail 33 | set LCDSZ=UNKNOWN 34 | goto end 35 | 36 | :end 37 | 38 | 39 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/ODDCHK.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | REM *********************************************************************** 3 | REM ** ODD Check 4 | REM ** 5 | REM *********************************************************************** 6 | REM if "%ODD_TP1%"=="******" goto NOODD 7 | if "%ODD_TP1%"=="000000" goto NOODD 8 | if exist X:\ODD.CMD del X:\ODD.CMD 9 | PC_ODD /set>X:\ODD.CMD 10 | x:\windelay 1 11 | CALL X:\ODD.CMD 12 | 13 | rem windelay 1 14 | rem if not "%User_Change_left%"=="5" goto oddfail 15 | 16 | windelay 1 17 | find /i "DVD+-RW" ODD.CMD 18 | if not errorlevel 1 goto oddset 19 | goto unknow 20 | 21 | :oddset 22 | set ODD_Type=D+-RW* 23 | goto end 24 | 25 | :NOODD 26 | REM set ODD_Type=****** 27 | set ODD_Type=000000 28 | goto end 29 | 30 | :oddfail 31 | echo *****ODD Region Code error***** 32 | goto end 33 | 34 | :unknow 35 | set msg=ODD Fail 36 | set ODD_Type=UNKNOWN 37 | goto end 38 | 39 | :end 40 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/SEPPID.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | 3 | :sppid 4 | cls 5 | if exist EPPID.CMD del EPPID.CMD 6 | sdtEPPID /w %BasePPID% 7 | if errorlevel 1 goto sppid 8 | windelay 3 9 | sdtEPPID /r>EPPID.CMD 10 | call x:\eppid.cmd 11 | if not "%BasePPID%"=="%EPPID%" goto fail 12 | goto pass 13 | 14 | :C1_Q1 15 | find /i "PAE4Q1" x:\response.cmd 16 | if errorlevel 1 goto C2_Q2 17 | >x:\HWChkCode.cmd echo set HWChkCode=P1*041505*****40********6101US00000******** 18 | goto pass 19 | 20 | :C2_Q2 21 | find /i "PAE4Q2" x:\response.cmd 22 | if errorlevel 1 goto C3_D1 23 | >x:\HWChkCode.cmd echo set HWChkCode=P2*041505*****40********6101US00000******** 24 | goto pass 25 | 26 | :C3_D1 27 | find /i "PAE4C1" x:\response.cmd 28 | if errorlevel 1 goto C4_D2 29 | >x:\HWChkCode.cmd echo set HWChkCode=P1*041505*****40**D+-RW*6101US00000******** 30 | goto pass 31 | 32 | :C4_D2 33 | find /i "PAE4C2" x:\response.cmd 34 | if errorlevel 1 goto fail 35 | >x:\HWChkCode.cmd echo set HWChkCode=P2*0421T5*****80**D+-RW*6102US10000******** 36 | goto pass 37 | 38 | 39 | :pass 40 | if exist x:\wcfgdat.cmd del x:\wcfgdat.cmd 41 | call x:\response.cmd 42 | call x:\wcfgset.cmd 43 | call x:\wcfgdat.cmd 44 | set PPID_CHK=PASS 45 | goto end 46 | 47 | :fail 48 | set msg=PPID Check Fail 49 | set PPID_CHK=FAIL 50 | goto end 51 | 52 | :end -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/SEVTAG.CMD: -------------------------------------------------------------------------------- 1 | @echo oN 2 | 3 | :sevtag 4 | cls 5 | if exist setsev.cmd del setsev.cmd 6 | call x:\response.cmd 7 | windelay 3 8 | sdtASSET -f -d 9 | windelay 3 10 | sdtASSET -f -s %SEVTag% 11 | if errorlevel 1 goto sevtag 12 | sdtASSET>setsev.cmd 13 | call x:\setsev.cmd 14 | if "%ServiceTag%"=="%SEVTag%" goto pass 15 | goto fail 16 | 17 | :pass 18 | set SEV_CHK=PASS 19 | goto end 20 | 21 | :fail 22 | set msg=Service Tag Check Fail 23 | set SEV_CHK=FAIL 24 | goto end 25 | 26 | :end 27 | 28 | 29 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/WIRECHK.CMD: -------------------------------------------------------------------------------- 1 | @echo on 2 | REM *********************************************************************** 3 | REM ** WLAN Check 4 | REM ** 5 | REM *********************************************************************** 6 | if exist wire.log del wire.log 7 | 8 | devcon find /i "PCI*">wire.log 9 | find /i "PCI\VEN_168C&DEV_0036&SUBSYS_020E1028&REV_01\4&2F8DC50F&0&00E3" wire.log 10 | if not errorlevel 1 goto Wlan_1707 11 | 12 | 13 | devcon find /i "PCI*">wire.log 14 | find /i "PCI\VEN_8086&DEV_08B3" wire.log 15 | if not errorlevel 1 goto Wlan_3160 16 | goto nowlan 17 | 18 | 19 | :Wlan_1707 20 | set WLAN_TP=1 21 | goto end 22 | 23 | :Wlan_3160 24 | set WLAN_TP=2 25 | goto end 26 | 27 | :nowlan 28 | set WLAN_TP=unkown 29 | goto end 30 | 31 | :end 32 | -------------------------------------------------------------------------------- /NB1_SW/HardwareCheck/wcfgset.cmd: -------------------------------------------------------------------------------- 1 | @echo on 2 | >wcfgdat.cmd echo set CPU_Type=%HWChkCode:~,2% 3 | >>wcfgdat.cmd echo set WWAN_Type=%HWChkCode:~2,2% 4 | >>wcfgdat.cmd echo set LCD_Size=%HWChkCode:~4,2% 5 | >>wcfgdat.cmd echo set HDD1_Size=%HWChkCode:~6,4% 6 | >>wcfgdat.cmd echo set HDD2_Size=%HWChkCode:~10,4% 7 | >>wcfgdat.cmd echo set RAMA_Size=%HWChkCode:~14,1% 8 | >>wcfgdat.cmd echo set RAMB_Size=%HWChkCode:~15,1% 9 | >>wcfgdat.cmd echo set RAMC_Size=%HWChkCode:~16,1% 10 | >>wcfgdat.cmd echo set RAMD_Size=%HWChkCode:~17,1% 11 | >>wcfgdat.cmd echo set ODD_TP1=%HWChkCode:~18,6% 12 | >>wcfgdat.cmd echo set BAT_TP=%HWChkCode:~24,1% 13 | >>wcfgdat.cmd echo set CCD=%HWChkCode:~25,1% 14 | >>wcfgdat.cmd echo set BT=%HWChkCode:~26,1% 15 | >>wcfgdat.cmd echo set WLAN=%HWChkCode:~27,1% 16 | >>wcfgdat.cmd echo set KB_TP=%HWChkCode:~28,2% 17 | >>wcfgdat.cmd echo set Backlight=%HWChkCode:~30,1% 18 | >>wcfgdat.cmd echo set FP=%HWChkCode:~31,1% 19 | >>wcfgdat.cmd echo set WIMAX=%HWChkCode:~32,1% -------------------------------------------------------------------------------- /NB1_SW/Java/getJavaVersion.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem : ------------------------------ 3 | rem : 4 | rem : sets java version as a number to jver 5 | rem : variable in one line. 6 | rem : by Vasil "npocmaka" Arnaudov 7 | rem : 8 | rem : ------------------------------ 9 | 10 | for /f tokens^=2-5^ delims^=.-_^" %%j in ('java -fullversion 2^>^&1') do set "jver=%%j%%k%%l%%m" 11 | 12 | rem : ------------------------------ 13 | rem : for execution directly to the command prompt use the line bellow 14 | rem : for /f tokens^=2-5^ delims^=.-_^" %j in ('java -fullversion 2^>^&1') do @set "jver=%j%k%l%m" 15 | rem : ------------------------------ 16 | -------------------------------------------------------------------------------- /NB1_SW/Java/javaDetect.bat: -------------------------------------------------------------------------------- 1 | :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 | @ECHO OFF 3 | set __COMPAT_LAYER=RunAsInvoker 4 | :: Export java settings from registry to a temporary file 5 | START /W REGEDIT /E %Temp%\java.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft" 6 | 7 | 8 | if not exist "%Temp%\java.reg" ( 9 | START /W REGEDIT /E %Temp%\java.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft" 10 | ) 11 | 12 | 13 | 14 | if not exist "%Temp%\java.reg" ( 15 | echo java not installed 16 | exit /b 1 17 | ) 18 | 19 | 20 | 21 | :: Find java location 22 | FOR /F "tokens=1* delims==" %%A IN ('TYPE %Temp%\java.reg ^| FIND "INSTALLDIR"') DO SET JAVA_HOME=%%B 23 | SET JAVA_HOME=%JAVA_HOME:"=% 24 | SET JAVA_HOME=%JAVA_HOME:\\=\% 25 | SET JAVA_HOME 26 | 27 | :: Get java version 28 | ::FOR /F "tokens=1* delims==" %%A IN ('TYPE %Temp%\java.reg ^| FIND "CurrentVersion"') DO SET JAVA_VERSION=%%B 29 | ::SET JAVA_VERSION=%JAVA_VERSION:"=% 30 | ::SET JAVA_VERSION 31 | ::SET JAVA_VERSION=%JAVA_VERSION:.=% 32 | ::SET JAVA_VERSION=%JAVA_VERSION:_=% 33 | ::SET /A JAVA_VERSION=%JAVA_VERSION% 34 | 35 | for /f tokens^=2-5^ delims^=.-_^" %%j in ('%JAVA_HOME%\bin\java.exe -fullversion 2^>^&1') do set "JAVA_VERSION=%%j%%k%%l%%m" 36 | 37 | :: Delete temp file 38 | rem @DEL %Temp%\java.reg /S /Q > NUL 2>&1 39 | set JAVA_VERSION 40 | :: Check java version compatibility 41 | IF %JAVA_VERSION% LSS 16020 ( 42 | ECHO. 43 | ECHO YOU NEED AT LEAST JAVA WITH VERSION 1.6.0_20 -- this is just an example echo. 44 | GOTO :EOF 45 | ) 46 | 47 | PAUSE 48 | ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 49 | -------------------------------------------------------------------------------- /NB1_SW/Java/javaExtInstaller.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: requires Admin permissions 3 | :: allows a files with .JAVA (in this case ) extension to act like .bat/.cmd files. 4 | :: Will create a 'caller.bat' asociated with the extension 5 | :: which will create a temp .bat file on each call (you can consider this as cheating) 6 | :: and will call it. 7 | :: Have on mind that the %0 argument will be lost. 8 | 9 | 10 | rem :: "installing" a caller. 11 | if not exist "c:\javaCaller.bat" ( 12 | echo @echo off 13 | echo copy "%%~nx1" "%%temp%%\%%~nx1.bat" /Y ^>nul 14 | echo "%%temp%%\%%~nx1.bat" %%* 15 | ) > c:\javaCaller.bat 16 | 17 | rem :: associating file extension 18 | assoc .java=javafile 19 | ftype javafile=c:\javaCaller "%%1" %%* 20 | -------------------------------------------------------------------------------- /NB1_SW/Java/javaHybrid.bat: -------------------------------------------------------------------------------- 1 | @Deprecated /* >nul 2>&1 2 | 3 | :: self compiled java/.bat hybrid 4 | :: 5 | :: deprecated is the only one annotation that can be used outside the class definition 6 | :: and is needed for 'mute' start of multi-line java comment 7 | :: that will be not printed by the batch file. 8 | :: though it still creates two files - the .class and the .java 9 | :: it still allows you to embed both batch and java code into one file 10 | 11 | @echo off 12 | setlocal 13 | java -version >nul 2>&1 || ( 14 | echo java not found 15 | exit /b 1 16 | ) 17 | 18 | ::find class name 19 | ::can be different than the script name 20 | for /f "usebackq tokens=3 delims=} " %%c in (`type %~f0 ^|find /i "public class"^|findstr /v "for /f"`) do ( 21 | set "javaFile=%%c" 22 | goto :skip 23 | ) 24 | :skip 25 | 26 | copy "%~f0" "%javaFile%.java" >nul 2>&1 27 | 28 | javac "%javaFile%.java" 29 | java "%javaFile%" 30 | 31 | ::optional 32 | ::del %javaFile%.* >nul 2>&1 33 | endlocal 34 | exit /b 0 35 | 36 | *******/ 37 | 38 | 39 | 40 | public class TestClass 41 | { 42 | public static void main(String args[]) 43 | { 44 | System.out.println("selfcompiled .bat/.java hybrid"); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /NB1_SW/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Vasil Arnaudov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /NB1_SW/Mainbatch/FOSP.CMD: -------------------------------------------------------------------------------- 1 | @echo off 2 | ::NB1 BTOA Team Mars 03/07 2011 3 | echo find os partition 4 | echo Usage: Please call osp.cmd in your batch files! 5 | 6 | echo list vol>vol.log 7 | diskpart /s vol.log>listvol.log 8 | find /i "NTFS" listvol.log>FAT32.log 9 | if exist x:\dfat32.log del x:\dfat32.log 10 | setlocal enabledelayedexpansion 11 | For /F "skip=2 tokens=3" %%i in (FAT32.log) do ( 12 | set part3=%%i 13 | echo !part3!>>dfat32.log 14 | ) 15 | rem setlocal disabledelayedexpansion 16 | for /f %%a in (dfat32.log) do ( 17 | if exist %%a:\BTOA\nul set OSP=%%a 18 | ) 19 | echo set OSP=%OSP%>OSP.cmd 20 | echo set OSP=%OSP% 21 | :end 22 | 23 | -------------------------------------------------------------------------------- /NB1_SW/Mainbatch/ISRT.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/NB1_SW/Mainbatch/ISRT.cmd -------------------------------------------------------------------------------- /NB1_SW/Mainbatch/dell.txt: -------------------------------------------------------------------------------- 1 | sel disk 0 2 | clean 3 | create part pri size=10000 4 | create part pri 5 | sel part 1 6 | format FS=NTFS QUICK COMPRESS 7 | assign 8 | sel part 2 9 | format FS=NTFS QUICK COMPRESS 10 | assign 11 | exit -------------------------------------------------------------------------------- /NB1_SW/Mainbatch/fdosdrv.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | ::NB1 BTOA Team Mars 01/13 2010 3 | echo Usage: Please call dosdrv.cmd in your batch files! 4 | 5 | echo list vol>vol.log 6 | diskpart /s vol.log>listvol.log 7 | find /i "FAT32" listvol.log>FAT32.log 8 | if exist x:\dfat32.log del x:\dfat32.log 9 | setlocal enabledelayedexpansion 10 | For /F "skip=2 tokens=3" %%i in (FAT32.log) do ( 11 | set part3=%%i 12 | echo !part3!>>dfat32.log 13 | ) 14 | rem setlocal disabledelayedexpansion 15 | for /f %%a in (dfat32.log) do ( 16 | if exist %%a:\%name%.flg set dosdrv=%%a 17 | ) 18 | echo set dosdrv=%dosdrv%>dosdrv.cmd 19 | echo set dosdrv=%dosdrv% 20 | 21 | :end 22 | 23 | -------------------------------------------------------------------------------- /NB1_SW/Mainbatch/flocaldrv.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | ::NB1 BTOA Team Mars 01/14 2010 3 | echo Usage: Please call localdrv.cmd in your batch files! 4 | 5 | echo list vol>vol.log 6 | diskpart /s vol.log>listvol.log 7 | find /i "FAT" listvol.log>FAT32.log 8 | if exist x:\dfat32.log del x:\dfat32.log 9 | setlocal enabledelayedexpansion 10 | For /F "skip=2 tokens=3" %%i in (FAT32.log) do ( 11 | set part3=%%i 12 | echo !part3!>>dfat32.log 13 | ) 14 | rem setlocal disabledelayedexpansion 15 | for /f %%a in (dfat32.log) do ( 16 | if exist %%a:\MFGMEDIA\nul set localdrv=%%a 17 | ) 18 | echo set localdrv=%localdrv%>localdrv.cmd 19 | echo set localdrv=%localdrv% 20 | :end 21 | 22 | -------------------------------------------------------------------------------- /NB1_SW/Mainbatch/ipgetmacid.cmd: -------------------------------------------------------------------------------- 1 | echo on 2 | set times=0 3 | 4 | :start 5 | set /a times+=1 6 | if exist x:\macidtmp.txt del x:\macidtmp.txt 7 | ipconfig /all | find /i "Physical Address" >x:\macidtmp.txt 8 | find /i "Physical Address" x:\macidtmp.txt 9 | if not errorlevel 1 goto get_mac 10 | if %times% LEQ 2 ( 11 | windelay.exe 10 12 | goto start 13 | ) 14 | 15 | goto fail 16 | 17 | :get_mac 18 | windelay.exe 1 19 | if exist x:\macid.cmd del x:\macid.cmd 20 | for /f "tokens=11,12,13,14,15,16 delims=:- " %%i in (x:\macidtmp.txt) do >x:\macid.cmd echo set MACID=%%i%%j%%k%%l%%m%%n 21 | call x:\macid.cmd 22 | set ID=%MACID:~1,8%.%MACID:~-3% 23 | >>x:\macid.cmd echo set ID=%ID% 24 | windelay.exe 1 25 | dir x:macid.cmd | find /i "45 bytes" 26 | if errorlevel 1 goto fail 27 | goto pass 28 | 29 | 30 | :fail 31 | color 4e 32 | set ERL=1 33 | echo ---------------------------- 34 | echo can not get MAC ID 35 | echo can not get MAC ID 36 | echo ---------------------------- 37 | goto end 38 | 39 | :pass 40 | set ERL=0 41 | goto end 42 | 43 | :end 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /NB1_SW/Mainbatch/setmainx64.cmd: -------------------------------------------------------------------------------- 1 | @echo on 2 | cls 3 | rem @echo off 4 | rem Revision History 5 | rem ******************************************** 6 | rem Rev 3A. 2014/07/16 Kevin Hong 7 | rem 1.First Release for WINPE4.0 8 | rem ******************************************** 9 | x: 10 | cd\ 11 | 12 | :model 13 | copy t:\hwcheckwp4x64\sdttoolsx64\sdtGetBIOSInfo_x64.exe x:\ /y 14 | CD\ 15 | windelay 2 16 | sdtGetBIOSInfo_x64.exe >x:\model.cmd 17 | call x:\model.cmd 18 | if "%ProductName%"=="Inspiron 7547" goto start 19 | if "%ProductName%"=="Inspiron 7548" goto start 20 | @echo Get Client NB MAC Address... >>%proc_track% 21 | 22 | 23 | :get_mac 24 | if exist x:\macid.cmd del x:\macid.cmd 25 | if exist x:\sdtmac.cmd del x:\sdtmac.cmd 26 | sdtGetMacAddress_x64.exe 0 >sdtmac.cmd 27 | call sdtmac.cmd 28 | set ID=%EthernetMAC:~1,8%.%EthernetMAC:~-3% 29 | >x:\macid.cmd echo set MACID=%EthernetMAC% 30 | >>x:\macid.cmd echo set ID=%ID% 31 | windelay.exe 1 32 | type x:\macid.cmd 33 | dir x:\macid.cmd | find /i "45 bytes" 34 | if errorlevel 1 goto failmac 35 | goto chkmacid 36 | 37 | 38 | :chkmacid 39 | call x:\macid.cmd 40 | @echo Check Client NB MAC Address whether abnormal... >>%proc_track% 41 | 42 | if #%MACID%#==#000000000000# goto failmac 43 | if #%MACID%#==#FFFFFFFFFFFF# goto failmac 44 | 45 | :start 46 | @call stnmainx64.cmd 47 | goto end 48 | 49 | :failmac 50 | echo **** FAIL!FAIL!FAIL! **** 51 | echo ***** MAC ID IS WRONG ***** 52 | echo MACID=%macid% 53 | pf MAC -R:255 54 | goto fail 55 | 56 | :fail 57 | pf.exe fail 58 | goto end 59 | 60 | :end 61 | 62 | -------------------------------------------------------------------------------- /NB1_SW/README.md: -------------------------------------------------------------------------------- 1 | batch.scripts 2 | ============= 3 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/EOFbreaker.bat: -------------------------------------------------------------------------------- 1 | :: http://ss64.org/viewtopic.php?id=1554 2 | :: redirecting to/from escaped EOF crashes the command prompt 3 | :: as explained in dbenham in the above link 4 | :: this was also featured here 5 | :: http://stackoverflow.com/questions/23284131/cmd-exe-parsing-bug-leads-to-other-exploits 6 | 7 | @echo off 8 | rem do not set new lines at the end or you'll break the breaker 9 | echo combobreaker |( goto :eof >^ 10 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/FORbreaker.bat: -------------------------------------------------------------------------------- 1 | ::http://ss64.org/viewtopic.php?id=1554 2 | 3 | @echo on 4 | :: this prints for %%A in ((nul)) do echo %%A 5 | :: before command prompt crash 6 | break | for %%A in () do echo %%A 7 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/ParamExpansionAndDriveVars: -------------------------------------------------------------------------------- 1 | C:\>for %I in (a: b: c: ">:" "&:") do @echo %~fI 2 | C:\>pushd c: 3 | C:\>set " 4 | 5 | the output is: 6 | 7 | =&:=&:\ 8 | 9 | =>:=>:\ 10 | 11 | =A:=A:\ 12 | 13 | =B:=B:\ 14 | 15 | =C:=C:\ 16 | 17 | .... 18 | 19 | 20 | 21 | Will not work if there's path attached to the mimic drives in the for set or if the "push ." (cd . also can be used) is skipped. 22 | Looks like the parameter expansion splits the paths in two parts - drive and the rest of the path and later concattanes them. 23 | And used drives are stored somewhere - and if there's no path part they are not deleted. CD and PUSHD resets drive variables. 24 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/callCrasher.bat: -------------------------------------------------------------------------------- 1 | :: Do not set any symbols after the closing bracket 2 | (call :: & :: ) 3 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/callForCallIf.txt: -------------------------------------------------------------------------------- 1 | :: http://stackoverflow.com/questions/19445153/why-i-cant-call-if-and-for-neither-in-batch-nor-in-the-cmd 2 | 3 | :: Call command cannot execute IF and FOR commands , despite syntax errors are detected 4 | :: Examples bellow (should be executed in command prompt but not from batch file) 5 | 6 | 7 | C:\Windows\system32>call @if a==a echo called 8 | ',' is not recognized as an internal or external command, 9 | operable program or batch file. 10 | 11 | C:\Windows\system32>call (@if a==a echo called) 12 | ';' is not recognized as an internal or external command, 13 | operable program or batch file. 14 | 15 | C:\Windows\system32>call if a==a echo called 16 | 'if' is not recognized as an internal or external command, 17 | operable program or batch file. 18 | 19 | C:\Windows\system32>call for %a in (1) do @echo called 20 | 'for' is not recognized as an internal or external command, 21 | operable program or batch file. 22 | 23 | C:\Windows\system32>call @for %a in (1) do @echo called 24 | '+' is not recognized as an internal or external command, 25 | operable program or batch file. 26 | 27 | C:\Windows\system32>call (@for %a in (1) do @echo called) 28 | ';' is not recognized as an internal or external command, 29 | operable program or batch file. 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/callbrackets.bat: -------------------------------------------------------------------------------- 1 | ::http://stackoverflow.com/questions/24418084/why-call-command-cannot-execute-a-command-enclosed-with-brackets 2 | :: 3 | :: Call command is unable to execute expression enclosed in brackets 4 | :: Examples bellow 5 | :: 6 | :: 7 | 8 | @echo off 9 | 10 | :: the echo that will never be 11 | call(echo echo echo) 12 | 13 | :: its the same with non-cmd internal commands 14 | call ( notepad.exe ) 15 | 16 | :: and even with a code that should fail 17 | call(gibberish) 18 | 19 | :: moreover the execution is successful 20 | call (gibberish)&&echo %errorlevel% 21 | 22 | :: though there's some parsing done 23 | call(this will print call help because contains "/?"-/?) 24 | 25 | :: and will detect a wrong syntax of some parsed-before-execution commands 26 | call ( if a==) 27 | 28 | :: and this too 29 | call (%~) 30 | 31 | :: same with labels 32 | call(:label) 33 | call(:no_label) 34 | :label 35 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/forCrasher.bat: -------------------------------------------------------------------------------- 1 | set "h=/?" && call if %%h%% 2 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/forEmptyTokens: -------------------------------------------------------------------------------- 1 | @@echo off 2 | :::this prints - 1:[i] 2:[] 3:[] 4:[] 5:[] 6:[] 7:[] 3 | for /f "tokens=1,1,1,1,1,1,1" %%a in ("i ii iii iv v vi vii") do ( 4 | @echo 1:[%%a] 2:[%%b] 3:[%%c] 4:[%%d] 5:[%%e] 6:[%%f] 7:[%%g] 5 | ) 6 | 7 | :::this prints - 1:[i] 2:[ii] 3:[iii] 4:[iv] 5:[] 6:[] 7:[%g] 8 | for /f "tokens=2,3,1-4" %%a in ("i ii iii iv v vi vii") do ( 9 | @echo 1:[%%a] 2:[%%b] 3:[%%c] 4:[%%d] 5:[%%e] 6:[%%f] 7:[%%g] 10 | ) 11 | 12 | :::this prints - 1:[i] 2:[ii] 3:[iii] 4:[] 5:[] 6:[] 7:[%g] 13 | for /f "tokens=1-3,1-3," %%a in ("i ii iii iv v vi vii") do ( 14 | @echo 1:[%%a] 2:[%%b] 3:[%%c] 4:[%%d] 5:[%%e] 6:[%%f] 7:[%%g] 15 | ) 16 | 17 | exit /b 0 18 | http://stackoverflow.com/questions/25950181/why-for-f-sets-empty-values-for-repeated-numbers-in-the-rest-of-tokens 19 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/ifCrasher.bat: -------------------------------------------------------------------------------- 1 | set "h=/?"&& call for %%h%% 2 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/ifDefined.bat: -------------------------------------------------------------------------------- 1 | :: Checking if variable that name contains spaces (or default delimiters - pointed by Liviu) 2 | :: is not so easy 3 | :: Escaping delimiters with ^ does not work and even its buggy 4 | :: 5 | :: To perform proper checking you need delayed expansion 6 | :: or FOR /F wrapping (proposed by penpen) 7 | :: 8 | :: http://www.dostips.com/forum/viewtopic.php?f=3&t=6148 9 | :: 10 | :: using delayed expansion 11 | 12 | :: some explantations here : http://stackoverflow.com/questions/28000194/why-if-checking-ignores-delimtersome-word-after-the-check-expression 13 | 14 | @echo off 15 | 16 | setlocal enableDelayedExpansion 17 | 18 | set sim salabim=magic 19 | set sim=simulation 20 | 21 | set "checker=sim salabim" 22 | 23 | if defined !checker! echo # 24 | 25 | rem the commented lines produce errors 26 | rem if defined sim salabim echo $ 27 | rem if defined %checker% echo @ 28 | rem if defined "sim salabim" echo * 29 | 30 | 31 | endlocal 32 | 33 | 34 | :: using FOR /F (penpen) 35 | 36 | @echo off 37 | setlocal disableDelayedExpansion 38 | set sim salabim=magic 39 | 40 | for %%a in ("sim salabim") do if defined %%~a echo --- 41 | endlocal 42 | goto :eof 43 | 44 | 45 | :: If defined parser bug demonstration 46 | 47 | @echo off 48 | 49 | setlocal 50 | 51 | set "undefined1=" 52 | set "undefined2=" 53 | set "undefined3=" 54 | 55 | set "var1=1" 56 | 57 | if defined var1^ undefined1^ undefined2^ undefined3 echo ### 58 | 59 | endlocal 60 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/pipeIf.bat: -------------------------------------------------------------------------------- 1 | :: http://www.dostips.com/forum/viewtopic.php?f=3&t=5539 2 | :: 3 | :: when something is piped to IF command the spaces before first operand are eaten (check the link above) 4 | :: While I've only found the problem - the root cause and the solution were found by jeb 5 | 6 | @echo off 7 | rem prints 1 is geq than 1 8 | echo.|if defined 1 geq 1 echo 1 is geq than 1 9 | rem prints 2 is gtr than 100 10 | echo.|if defined 2 gtr 100 echo 2 is gtr than 100 11 | 12 | rem prints 1 is gteater than 100 13 | echo.|if 1 gtr gtr 100 echo 1 is gteater than 100 14 | rem prints 100 is gteater and the same time less than 100 15 | echo.|if 100 lss gtr 100 echo 100 is gteater and the same time less than 100 16 | 17 | :: the root cause is visible by executing the following line in command prompt (found by jeb): 18 | ::C:\>echo pipe | if defined X lss Y echo %^cmdcmdline% 19 | :: In both cases - befora and after swalowing of the spaces syntax errors are detected (that's why the examples above works 20 | :: - a second comparison operator is added) 21 | 22 | 23 | :: the solution (proposed by jeb): 24 | 25 | 26 | @echo off 27 | set "myLine=if 1 lss 2 more" 28 | echo pipe | ( %%myLine%%) 29 | 30 | :: If command dows now swallow the pipe and passed string can be used both in IF and ELSE commands. 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/bugs/remCrasher.bat: -------------------------------------------------------------------------------- 1 | set "h=/?"&call rem %%h%% 2 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/DPATH: -------------------------------------------------------------------------------- 1 | @echo off 2 | dpath /? 3 | dpath 4 | type cmd.exe 5 | set /p=&1 >nul 20 | if "%0" == ":%anonymous%" ( 21 | echo Anonymous called 22 | exit /b 0 23 | )>&3 24 | 25 | 26 | rem example with code block ecnlosed with brackets 27 | echo Before anonymous call: 28 | echo %%1=%1 %%2=%2 %%3=%3 29 | 30 | for /l %%N in (1 1 5) do ( 31 | set /a N=%%N*2 32 | call :%%anonymous%% a b c 3>&1 >nul 33 | echo --- 34 | ) 35 | if "%0" == ":%anonymous%" ( 36 | echo( 37 | echo Anonymous call: 38 | echo %%1=%1 %%2=%2 %%3=%3 N=%N% 39 | exit /b 0 40 | )>&3 41 | 42 | echo( 43 | echo After anonymous call: 44 | echo %%1=%1 %%2=%2 %%3=%3 45 | 46 | 47 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/callArgs.bat: -------------------------------------------------------------------------------- 1 | :: using SHIFT and accessing arguments within same brackets context 2 | :: might cause troubles 3 | :: 4 | :: following code with this arg. line ich ni san shi go roku 5 | :: 6 | :: @echo off 7 | :: for /l %%c in (1=1=5) do ( 8 | :: echo --%1-- 9 | :: shift 10 | :: ) 11 | :: echo --%1-- 12 | :: 13 | :: gives following output 14 | :: 15 | :: --ich-- 16 | :: --ni-- 17 | :: --san-- 18 | :: --shi-- 19 | :: --go-- 20 | :: --roku-- 21 | :: 22 | :: the only way to access arguments in this case is using CALL 23 | :: http://ss64.org/viewtopic.php?id=1708 24 | 25 | @echo off 26 | for /l %%c in (1 ; 1 ; 5) do ( 27 | call echo --%%1-- 28 | shift 29 | ) 30 | echo --%1-- 31 | 32 | :: 33 | :: with delayed expansion 34 | :: 35 | 36 | setlocal enableDelayedExpansion 37 | set /a counter=0 38 | for /l %%x in (1 ; 1 ; 5) do ( 39 | set /a counter=!counter!+1 40 | call echo %%!counter! 41 | ) 42 | endlocal 43 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/callcolons.bat: -------------------------------------------------------------------------------- 1 | :: calling lables can be used like 2 | :: call ::label arguments 3 | 4 | @echo off 5 | 6 | call ::label 7 | echo -after- 8 | exit /b o 9 | :label 10 | echo printed 11 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/defaultJumpDir.bat: -------------------------------------------------------------------------------- 1 | :: For every drive there's dynamic environment variable 2 | :: that points to the last accessed directory e.g. : 3 | :: 4 | :: =D:=D:\someFolder 5 | :: 6 | :: defining same variable in-advance will 7 | :: allow direct jump to some directory by entering the drive 8 | :: (if directory does not exist it will print it as a message) 9 | :: This will not harm the command prompt. 10 | :: If different folder is entered the value of the variable will be changed durring the 11 | :: command prompt session. 12 | :: 13 | ::http://ss64.org/viewtopic.php?id=1559 14 | :: 15 | 16 | 17 | reg add HKCU\Environment /v "=D:" /d "Get out of here stalker" /f 18 | 19 | :: SETX won't allow defining variable starting with equal sign on every machine.So it's better to use REG 20 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/emptyTokens.bat: -------------------------------------------------------------------------------- 1 | :: http://stackoverflow.com/questions/25950181/why-for-f-sets-empty-values-for-repeated-numbers-in-the-rest-of-tokens 2 | 3 | :: For /f command set empty value for each requested token in options section 4 | :: Examples bellow 5 | 6 | :::this prints - 1:[i] 2:[] 3:[] 4:[] 5:[] 6:[] 7:[] 7 | for /f "tokens=1,1,1,1,1,1,1" %%a in ("i ii iii iv v vi vii") do ( 8 | @echo 1:[%%a] 2:[%%b] 3:[%%c] 4:[%%d] 5:[%%e] 6:[%%f] 7:[%%g] 9 | ) 10 | 11 | :::this prints - 1:[i] 2:[ii] 3:[iii] 4:[iv] 5:[] 6:[] 7:[%g] 12 | for /f "tokens=2,3,1-4" %%a in ("i ii iii iv v vi vii") do ( 13 | @echo 1:[%%a] 2:[%%b] 3:[%%c] 4:[%%d] 5:[%%e] 6:[%%f] 7:[%%g] 14 | ) 15 | 16 | :::this prints - 1:[i] 2:[ii] 3:[iii] 4:[] 5:[] 6:[] 7:[%g] 17 | for /f "tokens=1-3,1-3," %%a in ("i ii iii iv v vi vii") do ( 18 | @echo 1:[%%a] 2:[%%b] 3:[%%c] 4:[%%d] 5:[%%e] 6:[%%f] 7:[%%g] 19 | ) 20 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/fileRedirection.bat: -------------------------------------------------------------------------------- 1 | ::Only the last file in the sequence will be affected.Not existing files will be not created 2 | echo #>a>b>c>d>e>f 3 | ::Info will be red only from the last file in the row.Not existing files will be ignored 4 | set /p="a"b"""c""" 7 | type abc 8 | set /p= can be used as number separators in for /L 6 | echo\ 7 | for /L %%A in (1;1=5) do echo %%A 8 | 9 | :: everyting except first three numbers will be igonred 10 | :: 1000 will be ignored 11 | 12 | for /L %%A in (1;1=5,1000) do echo %%A 13 | 14 | :: every string not containing numbers in the first three items will be taken as 0 15 | 16 | for /l %%a in (null ; 1 ; 5) do echo %%a 17 | 18 | :: if a string starts with figits only the starting number will be taken into accoung 19 | 20 | set BottleRum=13DeadMen 21 | 22 | for /l %%P in (%BottleRum% 1;%BottleRum%) do set DevilDozen=%%P 23 | 24 | echo %DevilDozen% 25 | echo Yo-Ho-Ho! 26 | 27 | :: http://ss64.org/viewtopic.php?id=1667 28 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/internal_commands.txt: -------------------------------------------------------------------------------- 1 | Two internal commands were re-"discovered" here: 2 | 3 | http://ss64.org/viewtopic.php?id=1558 4 | 5 | 6 | KEYS and DPATH 7 | 8 | 9 | DPATH help message points to APPEND command and is not useful at all. 10 | It's syntax is the same as PATH command.Later Carlos Mortinez discovered that 11 | TYPE command uses %DPATH% variable set by DPATH command and can print files in DPATH 12 | directories like there in the same directory.The same with input redirection: 13 | http://ss64.org/viewtopic.php?id=1876 14 | http://ss64.org/viewtopic.php?id=1875 15 | 16 | 17 | KEYS command message also is missleading - it claims that has no effect but sets a %KEYS% vaiable (ON or OFF) 18 | despite the command itself does not rely on the environment variable to check its status. 19 | 20 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/keys: -------------------------------------------------------------------------------- 1 | @echo off 2 | keys /? 3 | set "keys=" 4 | keys off 5 | echo %keys% 6 | set "keys=" 7 | keys 8 | 9 | exit /b 0 10 | 11 | ::==== 12 | demonstrates the effects of keys command. 13 | I've mentioned the command here http://ss64.org/viewtopic.php?id=1558 14 | and later in the thread Dave Benham discovered that the command sets an environemnt 15 | variable , which means that the help message is wrong - it affects the current console. 16 | Keys does not relly on %keys% variable to display its state correctly 17 | ::===== 18 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/msg.txt: -------------------------------------------------------------------------------- 1 | http://ss64.org/viewtopic.php?id=2075 2 | Some tests I've made over MSG command (aware that you need installed terminal services to make this command available) showed that there are some special characters that cannot be set at the beginning of the message ( / and - ): 3 | msg "%username%" "--#" 4 | msg "%username%" "//#" 5 | both lines will print the help message . 6 | 7 | They can be esacped with \ (only the first appearance need to be escaped): 8 | msg "%username%" "\--#" 9 | msg "%username%" "\//#" 10 | 11 | it can be used also to put as message with quotes in : 12 | msg "%username%" "\"message with quotes\"" 13 | I havent found other special sequences that can be used with \ 14 | 15 | 16 | Max length of the symbols in the message is 255 17 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/negativeGOTO.bat: -------------------------------------------------------------------------------- 1 | :: Goto to not existing label exits the script and put in commpand prompt context 2 | :: so commands with negative conditional execution will be executed 3 | :: First I proposed using negative conditiontional execution here: 4 | :: http://stackoverflow.com/questions/23318951/how-to-treat-user-input-as-two-words-instead-of-one-in-batch 5 | :: later the user that I've answered to discovered that only the conditions on the same line will be executed: 6 | :: http://stackoverflow.com/questions/23327304/my-goto-redirect-is-not-working-but-works-with-echo 7 | :: Where jeb's found that the script goes to command prompt context 8 | :: And here I've found that the brackets and FOR contexts are not broken : 9 | :: http://www.dostips.com/forum/viewtopic.php?f=3&t=5928 10 | 11 | 12 | @echo off 13 | setlocal enableDelayedExpansion 14 | 15 | for /f "tokens=1,2,3" %%a in ("1 2 3 ") do ( 16 | set /a n=1+1 17 | goto :no_label_ >nul 2>&1 || break just fills the end of line 18 | echo brackets context is not broken 19 | echo( 20 | echo and so variables cannot be accessed 21 | set "n2=something else" 22 | echo -%n%- and -%n2%- 23 | echo but more delayed expansioon does not work --^> !n! :-( 24 | echo( 25 | echo and for context is not broken!!!! 26 | echo %%a--%%b--%%c 27 | echo pass a command line parameter to check the output of this: 28 | echo ~"%~1"~ 29 | 30 | ) 31 | echo never printed 32 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/plainfor: -------------------------------------------------------------------------------- 1 | @ 2 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/promptFeatures.txt: -------------------------------------------------------------------------------- 1 | Some undocumented prompt command features: 2 | (http://ss64.org/viewtopic.php?pid=7706#p7706) 3 | 4 | 5 | PROMPT - (Here I'll list some things ) 6 | 1.By default %PROMPT% variable is not defined (then prompt displays it's default value $P$G) 7 | 8 | 2.If %PROMPT% variable is defined or pre-set via registry deleting it will set again prompt to its default value. 9 | 10 | 3.PROMPT command is highly dependable on %PROMPT% variable and editing the variable will lead to the same results (e.g. SET "PROMPT=$P$G") 11 | 12 | 4. Everything after a dollar sign sequence that is not in the supported list ( $A $B $C $D $E $F $G $H $L $M $N $P $Q $S $T $V $_ $$ $+ ) will be ignored 13 | 14 | 5. Limitations for prompt length are 400 symbols in Windows XP and 511 from Vista and above . Hitting the limit also produces 15 | different results in XP/Vista and the fresher versions: 16 | 5.1.On XP it produces error message 17 | 5.2.On 7 and above it just only takes the first 511 symbols. 18 | 19 | On XP limitation can be worked-around by setting longer than 400 symbols value directly to PROMPT variable (For these I need clarification by more people so I'll start a separate thread) 20 | Special $-sequneces will be taken as a single symbol. 21 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/tasklist: -------------------------------------------------------------------------------- 1 | tasklist filters support wildcard (*) if it is put at the end -> 2 | http://stackoverflow.com/questions/36602024/regular-expression-or-wild-card-in-tasklist/36602530#36602530 3 | tasklist /FI "IMAGENAME eq cm*" 4 | 5 | 6 | And a double quotes can be escaped with \" unless they are not at the end. 7 | title "aa" 8 | tasklist /FI "WINDOWTITLE eq \"aa*" 9 | and backslash can be escaped with double backslash 10 | -------------------------------------------------------------------------------- /NB1_SW/discovers_and_bugs/discovers/typeList.bat: -------------------------------------------------------------------------------- 1 | :: Type command accepts wildcards and file lists 2 | :: Every time when a wildcard or a list of more than one 3 | :: file is used it will print file names in StdErr 4 | :: even if a single file applies to the wildcard expression 5 | :: or the file list 6 | :: http://ss64.org/viewtopic.php?id=1794 7 | 8 | @echo off 9 | echo hello>lang.en 10 | echo holla>lang.es 11 | echo hallo>lang.de 12 | 13 | echo -- 14 | echo -- testing type lang.?? 15 | echo -- 16 | type lang.?? 17 | 18 | echo -- 19 | echo -- testing type lang* 2^>nul 20 | echo -- 21 | type lang* 2>nul 22 | 23 | echo -- 24 | echo -- testing type lang* ^>nul 25 | echo -- 26 | type lang?* >nul 27 | 28 | echo -- 29 | echo -- testimg more lang* 30 | echo -- 31 | more lang* 32 | 33 | exit /b 0 34 | 35 | 36 | :: the output is 37 | 38 | -- 39 | -- testing type lang.?? 40 | -- 41 | 42 | lang.de 43 | 44 | 45 | hallo 46 | 47 | lang.en 48 | 49 | 50 | hello 51 | 52 | lang.es 53 | 54 | 55 | holla 56 | -- 57 | -- testing type lang* 2>nul 58 | -- 59 | hallo 60 | hello 61 | holla 62 | -- 63 | -- testing type lang* >nul 64 | -- 65 | 66 | lang.de 67 | 68 | 69 | 70 | lang.en 71 | 72 | 73 | 74 | lang.es 75 | 76 | 77 | -- 78 | -- testimg more lang* 79 | -- 80 | hallo 81 | hello 82 | holla 83 | 84 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/SHA512.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | if "%~1" equ "" ( 4 | echo no file passed 5 | echo pass -help to see the help message 6 | exit /b 1 7 | ) 8 | 9 | for %%# in (-h -help /h /help) do ( 10 | if "%~1" equ "%%~#" ( 11 | echo generates SHA512 checksum for a given file 12 | (echo() 13 | echo USAGE: 14 | (echo() 15 | echo %~nx0 file [variable] 16 | (echo() 17 | echo variable string in which the generated checksum will be stored 18 | (echo() 19 | exit /b 0 20 | ) 21 | ) 22 | 23 | if not exist "%~1" ( 24 | echo file %~1 does not exist 25 | exit /b 2 26 | ) 27 | 28 | if exist "%~1\" ( 29 | echo %~1 is a directory 30 | exit /b 3 31 | ) 32 | 33 | for %%# in (certutil.exe) do ( 34 | if not exist "%%~f$PATH:#" ( 35 | echo no certutil installed 36 | echo for Windows XP professional and Windows 2003 37 | echo you need Windows Server 2003 Administration Tools Pack 38 | echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 39 | exit /b 4 40 | ) 41 | ) 42 | 43 | set "SHA512=" 44 | for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" SHA512') do ( 45 | if not defined SHA512 ( 46 | for %%Z in (%%#) do set "SHA512=!SHA512!%%Z" 47 | ) 48 | ) 49 | 50 | if "%~2" neq "" ( 51 | endlocal && ( 52 | set "%~2=%SHA512%" 53 | ) 54 | ) else ( 55 | echo %SHA512% 56 | ) 57 | endlocal 58 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/dirTimes.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | for %%# in (/h /help -h -help) do ( 4 | if "%~1" equ "%%#" ( 5 | (echo() 6 | echo %~nx0 - Displays LastModified,LastAccessed and DateCreated times of a given directory 7 | echo in format YYYYMMDDhhmmss 8 | (echo() 9 | echo example: 10 | echo call %~nx0 "C:\directory\" 11 | ) 12 | ) 13 | 14 | if "%~1" equ "" ( 15 | echo no directory passed 16 | exit /b 1 17 | ) 18 | 19 | if not exist "%~f1" ( 20 | echo directory "%~f1" does not exist 21 | exit /b 2 22 | ) 23 | 24 | if exist "%~f1\" if not exist "%~f1" ( 25 | echo "%~f1" is a file but not a directory 26 | exit /b 3 27 | ) 28 | 29 | set "dirname=%~f1" 30 | set dirname=%dirname:\=\\% 31 | echo directory timestamps for %~f1 : 32 | (echo() 33 | for /f "useback delims=." %%t in (`"WMIC path Win32_Directory WHERE name="%dirname%" get LastModified,CreationDate,LastAccessed /format:value"`) do ( 34 | for /f %%$ in ("%%t") do if "%%$" neq "" echo %%$ 35 | ) 36 | endlocal && ( 37 | exit /b %errorlevel% 38 | ) 39 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/extInstaller: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: requires Admin permissions 3 | :: allows a files with .TEST (in this case ) extension to act like .bat/.cmd files. 4 | :: Will create a 'caller.bat' asociated with the extension 5 | :: which will create a temp .bat file on each call (you can consider this as cheating) 6 | :: and will call it. 7 | :: Have on mind that the %0 argument will be lost. 8 | 9 | 10 | rem :: "installing" a caller. 11 | if not exist "c:\caller.bat" ( 12 | echo @echo off 13 | echo copy "%%~nx1" "%%temp%%\%%~nx1.bat" /Y ^>nul 14 | echo "%%temp%%\%%~nx1.bat" %%* 15 | ) > c:\caller.bat 16 | 17 | rem :: associating file extension 18 | assoc .test=batps 19 | ftype batps=c:\caller "%1" %* 20 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/fileModifiedTime.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | for %%# in (/h /help -h -help) do ( 4 | if "%~1" equ "%%#" ( 5 | (echo() 6 | echo %~nx0 [rtnVar] - gets last modified time of a file in YYYY/MM/DD HH:mm:SS format 7 | echo rtnVar - optional variable name where the result will be stored 8 | (echo() 9 | echo example: 10 | echo call %~nx0 C:\file.ext lastModified 11 | ) 12 | ) 13 | 14 | if "%~1" equ "" ( 15 | echo no file passed 16 | exit /b 1 17 | ) 18 | 19 | if not exist "%~f1" ( 20 | echo file "%~f1" does not exist 21 | exit /b 2 22 | ) 23 | 24 | if exist "%~f1\" ( 25 | echo "%~f1" is a directory but not a file 26 | exit /b 3 27 | ) 28 | set "file_loc=%~f1" 29 | for %%# in ("%file_loc%") do set file_dir=%%~dp# 30 | for %%# in ("%file_loc%") do set file_name=%%~nx# 31 | pushd %file_dir% 32 | 33 | for /f "skip=2 tokens=1,2" %%a in ('robocopy "." "%temp%" /l /fat /ts /LEV:1 /NP /NC /NS /NJS /NJH /IF "%file_name%"') do ( 34 | echo last modified date of "%~f1" : 35 | echo %%a %%b 36 | set "fdate_time=%%a %%b" 37 | ) 38 | popd 39 | 40 | endlocal && ( 41 | if "%~2" neq "" set "%2=%fdate_time%" 42 | exit /b %errorlevel% 43 | ) 44 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/fileTimes.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | for %%# in (/h /help -h -help) do ( 4 | if "%~1" equ "%%#" ( 5 | (echo() 6 | echo %~nx0 - Displays LastModified,LastAccessed and DateCreated times of a given file 7 | echo in format YYYYMMDDhhmmss 8 | (echo() 9 | echo example: 10 | echo call %~nx0 C:\file.ext 11 | ) 12 | ) 13 | 14 | if "%~1" equ "" ( 15 | echo no file passed 16 | exit /b 1 17 | ) 18 | 19 | if not exist "%~f1" ( 20 | echo file "%~f1" does not exist 21 | exit /b 2 22 | ) 23 | 24 | if exist "%~f1\" ( 25 | echo "%~f1" is a directory but not a file 26 | exit /b 3 27 | ) 28 | 29 | set "file_loc=%~f1" 30 | set file_loc=%file_loc:\=\\% 31 | echo file timestamps for %~f1 : 32 | (echo() 33 | for /f "useback delims=." %%t in (`"WMIC DATAFILE WHERE name="%file_loc%" get LastModified,CreationDate,LastAccessed /format:value"`) do ( 34 | for /f %%$ in ("%%t") do if "%%$" neq "" echo %%$ 35 | ) 36 | endlocal && ( 37 | exit /b %errorlevel% 38 | ) 39 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/fileassembler.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%~1" EQU "" echo parameter not entered & exit /b 1 3 | set "parts=%~1.part" 4 | 5 | setlocal enableDelayedExpansion 6 | set numb=0 7 | for /f "delims=." %%P in ('dir /b %parts%*') do ( 8 | set /a numb=numb+1 9 | ) 10 | rem echo !numb! 11 | 12 | 13 | setlocal enableDelayedExpansion 14 | set "string=%~1.part.1" 15 | for /l %%n in (2;1;!numb!) do ( 16 | set "string=!string!+!parts!.%%n" 17 | ) 18 | rem echo !string! 19 | copy /y /b !string! %~1%~x1 20 | endlocal 21 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/firstLines.bat: -------------------------------------------------------------------------------- 1 | 2 | 3 | break>"%temp%\empty"&&fc "%temp%\empty" "%file_to_process%" /lb X /t |more +4 | findstr /B /E /V "*****" 4 | 5 | rem comperatively brief way to show first N lines of a file 6 | rem will fail the file contains ***** and MORE command will replace tab characters (if any) with space 7 | rem http://stackoverflow.com/questions/27509846/batch-script-to-overwrite-a-file-with-first-5-lines 8 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/firstLinesP.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableExtensions 3 | 4 | rem ------ validate parameters ------ 5 | :: parametrized version of batch.scripts/fileUtils/firstLiles.bat 6 | for %%H in ("/h" "-h" "-help" "/help") do if /I "%~1" EQU "%%~H" goto :help 7 | if "%~2" EQU "" goto :help 8 | if not exist "%~1" echo file does not exist && exit /b 3 9 | set /a "lines=%~2" 10 | if not defined lines echo pass a number bigger than 0 for the lines to be shown&&exit /b 1 11 | if defined lines if %lines%0 equ 0 echo pass a number bigger than 0 for the lines to be shown&&exit /b 2 12 | rem --------------------------------- 13 | 14 | ;break>"%temp%\empty" 15 | @@fc "%temp%\empty" "%~1" /lb %lines% /t |more +4 | findstr /B /E /V "*****" 16 | ;del /q /f "%temp%\empty" 17 | 18 | goto :eof 19 | endlocal 20 | 21 | :help 22 | echo Displays first lines of a given file 23 | echo. 24 | echo %~n0 file lines 25 | echo. 26 | echo. 27 | echo lines Number of lines to display.Must be bigger than 0. 28 | echo file Specifies the file. 29 | :: 30 | :: by Vasil "npocmaka" Arnaudov 31 | :: 32 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/folderOwner.bat: -------------------------------------------------------------------------------- 1 | :folderOwner 2 | @echo off 3 | 4 | set "folder=%%~1" 5 | 6 | for /f "tokens=* delims=" %%a in ("%folder%") do ( 7 | set "fpath=%%~pa" 8 | set "fname=%%~na" 9 | set "fdrive=%%~da" 10 | ) 11 | 12 | set "fpath=%fpath:\=\\%" 13 | 14 | for /f "usebackq tokens=* delims=" %%a in (`wmic path Win32_Directory where "path='%fpath%' and drive='%fdrive%' and filename='%fname%'" get CSName /format:value`) do ( 15 | for /f "tokens=* delims=" %%z in ("%%a") do ( 16 | 17 | if "%%z" neq "" ( 18 | set "%%z" 19 | ) 20 | ) 21 | ) 22 | 23 | echo %CSName% 24 | exit /b 0 25 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/listFS.bat: -------------------------------------------------------------------------------- 1 | fltmc volumes | find ":" 2 | rem :: lists file system types (NTFS,FAT32,CDFS ..) on all drivres 3 | rem as fltmc utility is not listed in technet A-Z reference it's rather an example how can it be used 4 | rem requires less code than fsutil 5 | rem http://stackoverflow.com/questions/6995813/how-can-i-use-batch-to-determine-if-a-computer-is-using-fat32-or-ntfs 6 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/md2.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | if "%~1" equ "" ( 4 | echo no file passed 5 | echo pass -help to see the help message 6 | exit /b 1 7 | ) 8 | 9 | for %%# in (-h -help /h /help) do ( 10 | if "%~1" equ "%%~#" ( 11 | echo generates MD2 checksum for a given file 12 | (echo() 13 | echo USAGE: 14 | (echo() 15 | echo %~nx0 file [variable] 16 | (echo() 17 | echo variable string in which the generated checksum will be stored 18 | (echo() 19 | exit /b 0 20 | ) 21 | ) 22 | 23 | if not exist "%~1" ( 24 | echo file %~1 does not exist 25 | exit /b 2 26 | ) 27 | 28 | if exist "%~1\" ( 29 | echo %~1 is a directory 30 | exit /b 3 31 | ) 32 | 33 | for %%# in (certutil.exe) do ( 34 | if not exist "%%~f$PATH:#" ( 35 | echo no certutil installed 36 | echo for Windows XP professional and Windows 2003 37 | echo you need Windows Server 2003 Administration Tools Pack 38 | echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 39 | exit /b 4 40 | ) 41 | ) 42 | 43 | set "MD2=" 44 | for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" MD2') do ( 45 | if not defined MD2 ( 46 | for %%Z in (%%#) do set "MD2=!MD2!%%Z" 47 | ) 48 | ) 49 | 50 | if "%~2" neq "" ( 51 | endlocal && ( 52 | set "%~2=%MD2%" 53 | ) 54 | ) else ( 55 | echo %MD2% 56 | ) 57 | endlocal 58 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/md4.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | if "%~1" equ "" ( 4 | echo no file passed 5 | echo pass -help to see the help message 6 | exit /b 1 7 | ) 8 | 9 | for %%# in (-h -help /h /help) do ( 10 | if "%~1" equ "%%~#" ( 11 | echo generates MD4 checksum for a given file 12 | (echo() 13 | echo USAGE: 14 | (echo() 15 | echo %~nx0 file [variable] 16 | (echo() 17 | echo variable string in which the generated checksum will be stored 18 | (echo() 19 | exit /b 0 20 | ) 21 | ) 22 | 23 | if not exist "%~1" ( 24 | echo file %~1 does not exist 25 | exit /b 2 26 | ) 27 | 28 | if exist "%~1\" ( 29 | echo %~1 is a directory 30 | exit /b 3 31 | ) 32 | 33 | for %%# in (certutil.exe) do ( 34 | if not exist "%%~f$PATH:#" ( 35 | echo no certutil installed 36 | echo for Windows XP professional and Windows 2003 37 | echo you need Windows Server 2003 Administration Tools Pack 38 | echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 39 | exit /b 4 40 | ) 41 | ) 42 | 43 | set "MD4=" 44 | for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" MD4') do ( 45 | if not defined MD4 ( 46 | for %%Z in (%%#) do set "MD4=!MD4!%%Z" 47 | ) 48 | ) 49 | 50 | if "%~2" neq "" ( 51 | endlocal && ( 52 | set "%~2=%MD4%" 53 | ) 54 | ) else ( 55 | echo %MD4% 56 | ) 57 | endlocal 58 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/md5.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | if "%~1" equ "" ( 4 | echo no file passed 5 | echo pass -help to see the help message 6 | exit /b 1 7 | ) 8 | 9 | for %%# in (-h -help /h /help) do ( 10 | if "%~1" equ "%%~#" ( 11 | echo generates MD5 checksum for a given file 12 | (echo() 13 | echo USAGE: 14 | (echo() 15 | echo %~nx0 file [variable] 16 | (echo() 17 | echo variable string in which the generated checksum will be stored 18 | (echo() 19 | exit /b 0 20 | ) 21 | ) 22 | 23 | if not exist "%~1" ( 24 | echo file %~1 does not exist 25 | exit /b 2 26 | ) 27 | 28 | if exist "%~1\" ( 29 | echo %~1 is a directory 30 | exit /b 3 31 | ) 32 | 33 | for %%# in (certutil.exe) do ( 34 | if not exist "%%~f$PATH:#" ( 35 | echo no certutil installed 36 | echo for Windows XP professional and Windows 2003 37 | echo you need Windows Server 2003 Administration Tools Pack 38 | echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 39 | exit /b 4 40 | ) 41 | ) 42 | 43 | set "md5=" 44 | for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" MD5') do ( 45 | if not defined md5 ( 46 | for %%Z in (%%#) do set "md5=!md5!%%Z" 47 | ) 48 | ) 49 | 50 | if "%~2" neq "" ( 51 | endlocal && ( 52 | set "%~2=%md5%" 53 | ) 54 | ) else ( 55 | echo %md5% 56 | ) 57 | endlocal 58 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/sha1.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | if "%~1" equ "" ( 4 | echo no file passed 5 | echo pass -help to see the help message 6 | exit /b 1 7 | ) 8 | 9 | for %%# in (-h -help /h /help) do ( 10 | if "%~1" equ "%%~#" ( 11 | echo generates SHA1 checksum for a given file 12 | (echo() 13 | echo USAGE: 14 | (echo() 15 | echo %~nx0 file [variable] 16 | (echo() 17 | echo variable string in which the generated checksum will be stored 18 | (echo() 19 | exit /b 0 20 | ) 21 | ) 22 | 23 | if not exist "%~1" ( 24 | echo file %~1 does not exist 25 | exit /b 2 26 | ) 27 | 28 | if exist "%~1\" ( 29 | echo %~1 is a directory 30 | exit /b 3 31 | ) 32 | 33 | for %%# in (certutil.exe) do ( 34 | if not exist "%%~f$PATH:#" ( 35 | echo no certutil installed 36 | echo for Windows XP professional and Windows 2003 37 | echo you need Windows Server 2003 Administration Tools Pack 38 | echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 39 | exit /b 4 40 | ) 41 | ) 42 | 43 | set "SHA1=" 44 | for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" SHA1') do ( 45 | if not defined SHA1 ( 46 | for %%Z in (%%#) do set "SHA1=!SHA1!%%Z" 47 | ) 48 | ) 49 | 50 | if "%~2" neq "" ( 51 | endlocal && ( 52 | set "%~2=%SHA1%" 53 | ) 54 | ) else ( 55 | echo %SHA1% 56 | ) 57 | endlocal 58 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/sha256.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | if "%~1" equ "" ( 4 | echo no file passed 5 | echo pass -help to see the help message 6 | exit /b 1 7 | ) 8 | 9 | for %%# in (-h -help /h /help) do ( 10 | if "%~1" equ "%%~#" ( 11 | echo generates SHA256 checksum for a given file 12 | (echo() 13 | echo USAGE: 14 | (echo() 15 | echo %~nx0 file [variable] 16 | (echo() 17 | echo variable string in which the generated checksum will be stored 18 | (echo() 19 | exit /b 0 20 | ) 21 | ) 22 | 23 | if not exist "%~1" ( 24 | echo file %~1 does not exist 25 | exit /b 2 26 | ) 27 | 28 | if exist "%~1\" ( 29 | echo %~1 is a directory 30 | exit /b 3 31 | ) 32 | 33 | for %%# in (certutil.exe) do ( 34 | if not exist "%%~f$PATH:#" ( 35 | echo no certutil installed 36 | echo for Windows XP professional and Windows 2003 37 | echo you need Windows Server 2003 Administration Tools Pack 38 | echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 39 | exit /b 4 40 | ) 41 | ) 42 | 43 | set "SHA256=" 44 | for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" SHA256') do ( 45 | if not defined SHA256 ( 46 | for %%Z in (%%#) do set "SHA256=!SHA256!%%Z" 47 | ) 48 | ) 49 | 50 | if "%~2" neq "" ( 51 | endlocal && ( 52 | set "%~2=%SHA256%" 53 | ) 54 | ) else ( 55 | echo %SHA256% 56 | ) 57 | endlocal 58 | -------------------------------------------------------------------------------- /NB1_SW/fileUtils/sha384.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | if "%~1" equ "" ( 4 | echo no file passed 5 | echo pass -help to see the help message 6 | exit /b 1 7 | ) 8 | 9 | for %%# in (-h -help /h /help) do ( 10 | if "%~1" equ "%%~#" ( 11 | echo generates SHA384 checksum for a given file 12 | (echo() 13 | echo USAGE: 14 | (echo() 15 | echo %~nx0 file [variable] 16 | (echo() 17 | echo variable string in which the generated checksum will be stored 18 | (echo() 19 | exit /b 0 20 | ) 21 | ) 22 | 23 | if not exist "%~1" ( 24 | echo file %~1 does not exist 25 | exit /b 2 26 | ) 27 | 28 | if exist "%~1\" ( 29 | echo %~1 is a directory 30 | exit /b 3 31 | ) 32 | 33 | for %%# in (certutil.exe) do ( 34 | if not exist "%%~f$PATH:#" ( 35 | echo no certutil installed 36 | echo for Windows XP professional and Windows 2003 37 | echo you need Windows Server 2003 Administration Tools Pack 38 | echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 39 | exit /b 4 40 | ) 41 | ) 42 | 43 | set "SHA384=" 44 | for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" SHA384') do ( 45 | if not defined SHA384 ( 46 | for %%Z in (%%#) do set "SHA384=!SHA384!%%Z" 47 | ) 48 | ) 49 | 50 | if "%~2" neq "" ( 51 | endlocal && ( 52 | set "%~2=%SHA384%" 53 | ) 54 | ) else ( 55 | echo %SHA384% 56 | ) 57 | endlocal 58 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/.net/getCmdPID.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /* JScript comment 2 | @echo off 3 | setlocal 4 | 5 | for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do ( 6 | set "jsc=%%v" 7 | ) 8 | 9 | 10 | if not exist "%~n0.exe" ( 11 | "%jsc%" /nologo /out:"%~n0.exe" "%~dpsfnx0" 12 | ) 13 | 14 | %~n0.exe 15 | 16 | ::pause 17 | endlocal & exit /b %errorlevel% 18 | 19 | */ 20 | 21 | //http://stackoverflow.com/questions/2531837/how-can-i-get-the-pid-of-the-parent-process-of-my-application 22 | import System; 23 | import System.Diagnostics; 24 | import System.ComponentModel; 25 | import System.Management; 26 | 27 | var myId = Process.GetCurrentProcess().Id; 28 | var query = String.Format("SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = {0}", myId); 29 | var search = new ManagementObjectSearcher("root\\CIMV2", query); 30 | var results = search.Get().GetEnumerator(); 31 | if (!results.MoveNext()) { 32 | Console.WriteLine("Error"); 33 | Environment.Exit(-1); 34 | } 35 | var queryObj = results.Current; 36 | var parentId = queryObj["ParentProcessId"]; 37 | var parent = Process.GetProcessById(parentId); 38 | Console.WriteLine(parent.Id); 39 | Environment.Exit(parent.Id); 40 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/.net/keyStates.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /* JScript comment 2 | @echo off 3 | setlocal 4 | 5 | set "jsc=" 6 | for /r "%SystemRoot%\Microsoft.NET\Framework\" %%# in ("*jsc.exe") do set "jsc=%%#" 7 | 8 | if not exist "%jsc%" ( 9 | echo no .net framework installed 10 | exit /b 10 11 | ) 12 | 13 | 14 | ::if not exist "%~n0.exe" ( 15 | call "%jsc%" /r:"System.Windows.Forms.dll" /nologo /out:"%~n0.exe" "%~dpsfnx0"||( 16 | exit /b %errorlevel% 17 | ) 18 | ::) 19 | 20 | "%~n0.exe" 21 | 22 | endlocal & exit /b %errorlevel% 23 | 24 | */ 25 | 26 | import System; 27 | import Accessibility; 28 | import System.Windows.Forms; 29 | import System.Drawing; 30 | 31 | var caps="CAPS LOCK : OFF"; 32 | var num="NUM LOCK : OFF"; 33 | var scroll="SCROLL LOCK : OFF" 34 | 35 | if (Control.IsKeyLocked(Keys.CapsLock)) { 36 | caps="CAPS LOCK : ON"; 37 | } 38 | 39 | if (Control.IsKeyLocked(Keys.NumLock)) { 40 | caps="NUM LOCK : ON"; 41 | } 42 | 43 | if (Control.IsKeyLocked(Keys.Scroll)) { 44 | caps="SCROL LLOCK : ON"; 45 | } 46 | 47 | 48 | Console.WriteLine(caps); 49 | Console.WriteLine(num); 50 | Console.WriteLine(scroll); 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/.net/listEncodings.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /****** jscript comment ****** 2 | 3 | @echo off 4 | :::::::::::::::::::::::::::::::::::: 5 | ::: compile the script :::: 6 | :::::::::::::::::::::::::::::::::::: 7 | setlocal 8 | 9 | if exist "%~n0.exe" goto :skip_compilation 10 | 11 | :: searching the latest installed .net framework 12 | for /f "tokens=* delims=" %%v in ('dir /b /s /a:d /o:-n "%SystemRoot%\Microsoft.NET\Framework\v*"') do ( 13 | if exist "%%v\jsc.exe" ( 14 | rem :: the javascript.net compiler 15 | set "jsc=%%~dpsnfxv\jsc.exe" 16 | goto :break_loop 17 | ) 18 | ) 19 | echo jsc.exe not found && exit /b 0 20 | :break_loop 21 | 22 | 23 | call %jsc% /nologo /out:"%~n0.exe" "%~nx0" 24 | :::::::::::::::::::::::::::::::::::: 25 | ::: end of compilation :::: 26 | :::::::::::::::::::::::::::::::::::: 27 | :skip_compilation 28 | 29 | :: 30 | :::::::::: 31 | "%~n0.exe" 32 | :::::::: 33 | :: 34 | 35 | exit /b 0 36 | 37 | ## http://msdn.microsoft.com/en-us/library/system.text.encoding.getencodings.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2 38 | ## 39 | ****** end of jscript comment ******/ 40 | 41 | import System; 42 | import System.Text; 43 | 44 | Console.Write( "CodePage identifier and name " ); 45 | Console.Write( "BrDisp BrSave " ); 46 | Console.Write( "MNDisp MNSave " ); 47 | Console.WriteLine( "1-Byte ReadOnly " ); 48 | 49 | var ei= new Object(); 50 | var encs=new Enumerator(Encoding.GetEncodings()); 51 | 52 | while(!encs.atEnd()) { 53 | var enc=encs.item(); 54 | var e=enc.GetEncoding(); 55 | 56 | Console.Write( "{0,-6} {1,-25} ", enc.CodePage, enc.Name ); 57 | Console.Write( "{0,-8} {1,-8} ", e.IsBrowserDisplay, e.IsBrowserSave ); 58 | Console.Write( "{0,-8} {1,-8} ", e.IsMailNewsDisplay, e.IsMailNewsSave ); 59 | Console.WriteLine( "{0,-8} {1,-8} ", e.IsSingleByte, e.IsReadOnly ); 60 | 61 | encs.moveNext(); 62 | } 63 | 64 | 65 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/.net/passHidder.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /* JScript comment 2 | @echo off 3 | setlocal enableDelayedExpansion 4 | 5 | for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do ( 6 | set "jsc=%%v" 7 | ) 8 | 9 | if not exist "%~n0.exe" ( 10 | "%jsc%" /nologo /out:"%~n0.exe" "%~dpsfnx0" 11 | ) 12 | 13 | for /f "tokens=* delims=" %%p in ('"%~n0.exe"') do ( 14 | set "pass=%%p" 15 | ) 16 | 17 | echo your password is !pass! 18 | 19 | endlocal & exit /b %errorlevel% 20 | 21 | */ 22 | 23 | 24 | 25 | import System; 26 | 27 | 28 | 29 | var pwd = ""; 30 | var key; 31 | 32 | Console.Error.Write("Enter password: "); 33 | 34 | do { 35 | key = Console.ReadKey(true); 36 | 37 | if ( (key.KeyChar.ToString().charCodeAt(0)) >= 20 && (key.KeyChar.ToString().charCodeAt(0) <= 126) ) { 38 | pwd=pwd+(key.KeyChar.ToString()); 39 | Console.Error.Write("*"); 40 | } 41 | 42 | if ( key.Key == ConsoleKey.Backspace && pwd.Length > 0 ) { 43 | pwd=pwd.Remove(pwd.Length-1); 44 | Console.Error.Write("\b \b"); 45 | } 46 | 47 | 48 | } while (key.Key != ConsoleKey.Enter); 49 | Console.Error.WriteLine(); 50 | Console.WriteLine(pwd); 51 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/.net/powershell/checkRemotePort.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | for %%h in (/h /help -help -h "") do ( 4 | if /I "%~1" equ "%%~h" ( 5 | goto :printHelp 6 | ) 7 | ) 8 | 9 | if "%~2" equ "" goto :printHelp 10 | 11 | set "HOST=%~1" 12 | set /a PORT=%~2 13 | 14 | set "host=google.com" 15 | set /a port=443 16 | 17 | for /f %%a in ('powershell "$t = New-Object Net.Sockets.TcpClient;try{$t.Connect("""%HOST%""", %PORT%)}catch{};$t.Connected"') do set "open=%%a" 18 | 19 | if "%open%" equ "true" ( 20 | echo open 21 | endlocal & exit /b 0 22 | ) else ( 23 | echo closed 24 | endlocal & exit /b 1 25 | ) 26 | 27 | 28 | :printHelp 29 | echo Checks if port is open on a remote server 30 | echo( 31 | echo Usage: 32 | echo %~nx0 host port 33 | echo( 34 | echo If the port is not accessible an errorlevel 1 is set 35 | endlocal & exit /b 0 36 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/.net/selectFolder.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /* JScript comment 2 | @echo off 3 | 4 | :: FolderSelectorJS.bat 5 | setlocal 6 | 7 | for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do ( 8 | set "jsc=%%v" 9 | ) 10 | 11 | if not exist "%~n0.exe" ( 12 | "%jsc%" /nologo /out:"%~n0.exe" "%~dpsfnx0" 13 | ) 14 | 15 | for /f "tokens=* delims=" %%p in ('"%~n0.exe"') do ( 16 | set "folder=%%p" 17 | ) 18 | if not "%folder%" == "" ( 19 | echo selected folder is %folder% 20 | ) 21 | 22 | endlocal & exit /b %errorlevel% 23 | 24 | */ 25 | 26 | import System; 27 | import System.Windows.Forms; 28 | 29 | var f=new FolderBrowserDialog(); 30 | f.SelectedPath=System.Environment.CurrentDirectory; 31 | f.Description="Please choose a folder."; 32 | f.ShowNewFolderButton=true; 33 | if( f.ShowDialog() == DialogResult.OK ){ 34 | Console.Write(f.SelectedPath); 35 | } 36 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/.net/split.net.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /* JScript comment 2 | @echo off 3 | setlocal 4 | 5 | for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do ( 6 | set "jsc=%%v" 7 | ) 8 | 9 | if not exist "%~n0.exe" ( 10 | "%jsc%" /nologo /out:"%~n0.exe" "%~dpsfnx0" 11 | ) 12 | 13 | %~n0.exe %* 14 | 15 | endlocal & exit /b %errorlevel% 16 | 17 | */ 18 | 19 | import System; 20 | import System.IO; 21 | 22 | var arguments:String[] = Environment.GetCommandLineArgs(); 23 | 24 | if (arguments.length<3){ 25 | Console.WriteLine("Wrong arguments"); 26 | Console.WriteLine("usage:"); 27 | Console.WriteLine(arguments[0]+"file_to_split size_in_bytes"); 28 | Environment.Exit(1); 29 | } 30 | 31 | var file=arguments[1]; 32 | var max_size=parseInt(arguments[2]); 33 | 34 | if (max_size<=0){ 35 | Console.WriteLine("size must be bigger than zero"); 36 | Environment.Exit(2); 37 | } 38 | 39 | if (!File.Exists(file)){ 40 | Console.WriteLine("file"+file+" does not exist"); 41 | Environment.Exit(3); 42 | } 43 | 44 | function writeData(file,data:byte[]){ 45 | Console.WriteLine(data.Length); 46 | var writer = new BinaryWriter(File.Open(file, FileMode.Create)); 47 | writer.Write(data); 48 | writer.Close(); 49 | } 50 | 51 | function chunker(inputFile, chunkSize){ 52 | 53 | var part=0; 54 | var reader= new BinaryReader(File.Open(inputFile, FileMode.Open)); 55 | var data:byte[]=reader.ReadBytes(chunkSize); 56 | 57 | while(reader.BaseStream.Position !== reader.BaseStream.Length) { 58 | part++; 59 | Console.WriteLine("Processing part " + part); 60 | writeData(inputFile+".part."+part,data); 61 | data=reader.ReadBytes(chunkSize); 62 | 63 | } 64 | if (data.Length !== 0) { 65 | part++; 66 | Console.WriteLine("Processing part " + part) 67 | writeData(inputFile+".part."+part,data); 68 | } 69 | reader.Close(); 70 | } 71 | 72 | chunker(file,max_size); 73 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/.net/systemSounds.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /* JScript comment 2 | @echo off 3 | 4 | setlocal 5 | 6 | for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do ( 7 | set "jsc=%%v" 8 | ) 9 | 10 | if not exist "%~n0.exe" ( 11 | "%jsc%" /nologo /out:"%~n0.exe" "%~dpsfnx0" 12 | ) 13 | 14 | "%~n0.exe" %* 15 | 16 | 17 | endlocal & exit /b %errorlevel% 18 | 19 | end oj jscript comment*/ 20 | 21 | import System; 22 | import System.Media; 23 | import System.Threading; 24 | 25 | 26 | var arguments:String[] = Environment.GetCommandLineArgs(); 27 | 28 | function printHelp( ) { 29 | print(arguments[0] + " [beep] [asterisk] [hand] [beep] [question]"); 30 | 31 | } 32 | 33 | if ( arguments.length == 1 || arguments[1].toLowerCase() == "-h" || arguments[1].toLowerCase() == "-help" ) { 34 | printHelp(); 35 | Environment.Exit(0); 36 | } 37 | 38 | 39 | 40 | for (var arg = 1; arg <= arguments.length-1; arg++ ) { 41 | 42 | if ( arguments[arg].toLowerCase() == "beep" ) { 43 | SystemSounds.Beep.Play(); 44 | System.Threading.Thread.Sleep(300); 45 | } 46 | 47 | if ( arguments[arg].toLowerCase() == "asterisk" ) { 48 | SystemSounds.Asterisk.Play(); 49 | System.Threading.Thread.Sleep(300); 50 | } 51 | 52 | if ( arguments[arg].toLowerCase() == "exclamation" ) { 53 | SystemSounds.Exclamation.Play(); 54 | System.Threading.Thread.Sleep(300); 55 | } 56 | 57 | if ( arguments[arg].toLowerCase() == "hand" ) { 58 | SystemSounds.Hand.Play(); 59 | System.Threading.Thread.Sleep(300); 60 | } 61 | 62 | if ( arguments[arg].toLowerCase() == "question" ) { 63 | SystemSounds.Question.Play(); 64 | System.Threading.Thread.Sleep(300); 65 | } 66 | 67 | } 68 | 69 | 70 | /* 71 | Asterisk 72 | Beep 73 | Exclamation 74 | Hand 75 | Question 76 | */ 77 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/iexpress/OKPopup.bat: -------------------------------------------------------------------------------- 1 | ;@echo off 2 | ;setlocal 3 | 4 | ;set ppopup_executable=popupe.exe 5 | ;set "message2=click OK to continue" 6 | ; 7 | ;del /q /f %tmp%\yes >nul 2>&1 8 | ; 9 | ;copy /y "%~f0" "%temp%\popup.sed" >nul 2>&1 10 | 11 | ;(echo(FinishMessage=%message2%)>>"%temp%\popup.sed"; 12 | ;(echo(TargetName=%cd%\%ppopup_executable%)>>"%temp%\popup.sed"; 13 | ;(echo(FriendlyName=%message1_title%)>>"%temp%\popup.sed" 14 | ; 15 | ;iexpress /n /q /m %temp%\popup.sed 16 | ;%ppopup_executable% 17 | ;rem del /q /f %ppopup_executable% >nul 2>&1 18 | 19 | ;pause 20 | 21 | ;endlocal 22 | ;exit /b 0 23 | 24 | 25 | [Version] 26 | Class=IEXPRESS 27 | SEDVersion=3 28 | [Options] 29 | PackagePurpose=InstallApp 30 | ShowInstallProgramWindow=1 31 | HideExtractAnimation=1 32 | UseLongFileName=0 33 | InsideCompressed=0 34 | CAB_FixedSize=0 35 | CAB_ResvCodeSigning=0 36 | RebootMode=N 37 | InstallPrompt=%InstallPrompt% 38 | DisplayLicense=%DisplayLicense% 39 | FinishMessage=%FinishMessage% 40 | TargetName=%TargetName% 41 | FriendlyName=%FriendlyName% 42 | AppLaunched=%AppLaunched% 43 | PostInstallCmd=%PostInstallCmd% 44 | AdminQuietInstCmd=%AdminQuietInstCmd% 45 | UserQuietInstCmd=%UserQuietInstCmd% 46 | SourceFiles=SourceFiles 47 | [SourceFiles] 48 | SourceFiles0=C:\Windows\System32\ 49 | [SourceFiles0] 50 | %FILE0%= 51 | 52 | 53 | [Strings] 54 | AppLaunched=subst.exe 55 | PostInstallCmd= 56 | AdminQuietInstCmd= 57 | UserQuietInstCmd= 58 | FILE0="subst.exe" 59 | DisplayLicense= 60 | InstallPrompt= 61 | 62 | 63 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/iexpress/bat2exeIEXP.bat: -------------------------------------------------------------------------------- 1 | ;@echo off 2 | ; rem https://github.com/npocmaka/batch.scripts/edit/master/hybrids/iexpress/bat2exeIEXP.bat 3 | ;if "%~2" equ "" ( 4 | ; echo usage: %~nx0 batFile.bat target.Exe 5 | ;) 6 | ;set "target.exe=%__cd__%%~2" 7 | ;set "batch_file=%~f1" 8 | ;set "bat_name=%~nx1" 9 | ;set "bat_dir=%~dp1" 10 | 11 | ;copy /y "%~f0" "%temp%\2exe.sed" >nul 12 | 13 | ;(echo()>>"%temp%\2exe.sed" 14 | ;(echo(AppLaunched=cmd.exe /c "%bat_name%")>>"%temp%\2exe.sed" 15 | ;(echo(TargetName=%target.exe%)>>"%temp%\2exe.sed" 16 | ;(echo(FILE0="%bat_name%")>>"%temp%\2exe.sed" 17 | ;(echo([SourceFiles])>>"%temp%\2exe.sed" 18 | ;(echo(SourceFiles0=%bat_dir%)>>"%temp%\2exe.sed" 19 | ;(echo([SourceFiles0])>>"%temp%\2exe.sed" 20 | ;(echo(%%FILE0%%=)>>"%temp%\2exe.sed" 21 | 22 | 23 | ;iexpress /n /q /m %temp%\2exe.sed 24 | 25 | ;rem del /q /f "%temp%\2exe.sed" 26 | ; exit /b 0 27 | 28 | [Version] 29 | Class=IEXPRESS 30 | SEDVersion=3 31 | [Options] 32 | PackagePurpose=InstallApp 33 | ShowInstallProgramWindow=0 34 | HideExtractAnimation=1 35 | UseLongFileName=1 36 | InsideCompressed=0 37 | CAB_FixedSize=0 38 | CAB_ResvCodeSigning=0 39 | RebootMode=N 40 | InstallPrompt=%InstallPrompt% 41 | DisplayLicense=%DisplayLicense% 42 | FinishMessage=%FinishMessage% 43 | TargetName=%TargetName% 44 | FriendlyName=%FriendlyName% 45 | AppLaunched=%AppLaunched% 46 | PostInstallCmd=%PostInstallCmd% 47 | AdminQuietInstCmd=%AdminQuietInstCmd% 48 | UserQuietInstCmd=%UserQuietInstCmd% 49 | SourceFiles=SourceFiles 50 | 51 | [Strings] 52 | InstallPrompt= 53 | DisplayLicense= 54 | FinishMessage= 55 | FriendlyName=- 56 | PostInstallCmd= 57 | AdminQuietInstCmd= 58 | UserQuietInstCmd= 59 | ; 60 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/iexpress/hidder.bat: -------------------------------------------------------------------------------- 1 | ;:: uses AppLaunched and ShowInstallProgramWindow options in iexpress sed files 2 | ;:: to start a hidden process 3 | ;:: could require admin privileges 4 | ;::http://www.dostips.com/forum/viewtopic.php?f=3&t=5901 5 | 6 | 7 | ;@echo off 8 | ;setlocal 9 | ; rem https://github.com/npocmaka/batch.scripts/edit/master/hybrids/iexpress/bat2exeIEXP.bat 10 | ;if "%~2" equ "" ( 11 | ; echo usage: %~nx0 batFile.bat target.Exe 12 | ;) 13 | ;set "target.exe=%__cd__%%~2" 14 | ;set "app_file=%~f1" 15 | ;set "app_name=%~nx1" 16 | ;set "app_dir=%~dp1" 17 | 18 | ;copy /y "%~f0" "%temp%\2exe.sed" >nul 19 | 20 | ;(echo()>>"%temp%\2exe.sed" 21 | ;if "%app_name:~-4%" equ ".bat" ( 22 | ;(echo(AppLaunched=cmd.exe /c "%app_name%")>>"%temp%\2exe.sed" 23 | ;) else ( 24 | ;echo(AppLaunched="%app_name%")>>"%temp%\2exe.sed" 25 | ;) 26 | ;(echo(TargetName=%target.exe%)>>"%temp%\2exe.sed" 27 | ;(echo(FILE0="%app_name%")>>"%temp%\2exe.sed" 28 | ;(echo([SourceFiles])>>"%temp%\2exe.sed" 29 | ;(echo(SourceFiles0=%app_dir%)>>"%temp%\2exe.sed" 30 | ;(echo([SourceFiles0])>>"%temp%\2exe.sed" 31 | ;(echo(%%FILE0%%=)>>"%temp%\2exe.sed" 32 | 33 | 34 | ;iexpress /n /q /m %temp%\2exe.sed 35 | 36 | ;rem del /q /f "%temp%\2exe.sed" 37 | ; exit /b 0 38 | 39 | [Version] 40 | Class=IEXPRESS 41 | SEDVersion=3 42 | [Options] 43 | PackagePurpose=InstallApp 44 | ShowInstallProgramWindow=1 45 | HideExtractAnimation=1 46 | UseLongFileName=1 47 | InsideCompressed=1 48 | CAB_FixedSize=0 49 | CAB_ResvCodeSigning=0 50 | RebootMode=N 51 | InstallPrompt=%InstallPrompt% 52 | DisplayLicense=%DisplayLicense% 53 | FinishMessage=%FinishMessage% 54 | TargetName=%TargetName% 55 | FriendlyName=%FriendlyName% 56 | AppLaunched=%AppLaunched% 57 | PostInstallCmd=%PostInstallCmd% 58 | AdminQuietInstCmd=%AdminQuietInstCmd% 59 | UserQuietInstCmd=%UserQuietInstCmd% 60 | SourceFiles=SourceFiles 61 | 62 | [Strings] 63 | InstallPrompt= 64 | DisplayLicense= 65 | FinishMessage= 66 | FriendlyName=- 67 | PostInstallCmd= 68 | AdminQuietInstCmd= 69 | UserQuietInstCmd= 70 | ; 71 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/iexpress/licenseAgreement.bat: -------------------------------------------------------------------------------- 1 | ;::Uses DisplayLicense option in express sed file 2 | ;:: It requires a path to the text file with the license agreement which will 3 | ;:: be built-in produced exe file and later can be deleted if 4 | ;:: the .exe will be reused 5 | 6 | 7 | ;@echo off 8 | ;setlocal 9 | 10 | ;set "message1_title=Are you agree?" 11 | ;set "license_file=%windir%\win.ini" 12 | ;set ppopup_executable=popupe.exe 13 | 14 | ; 15 | ;del /q /f %tmp%\yes >nul 2>&1 16 | ; 17 | ;copy /y "%~f0" "%temp%\popup.sed" >nul 2>&1 18 | ;(echo(DisplayLicense=%license_file%)>>"%temp%\popup.sed" 19 | ;(echo(TargetName=%cd%\%ppopup_executable%)>>"%temp%\popup.sed"; 20 | ;(echo(FriendlyName=%message1_title%)>>"%temp%\popup.sed" 21 | ; 22 | ;iexpress /n /q /m %temp%\popup.sed 23 | ;%ppopup_executable% 24 | ;del /q /f %ppopup_executable% >nul 2>&1 25 | 26 | ;if exist "%tmp%\yes" (set ans=yes) else (set ans=no) 27 | ;echo %ans% 28 | ;pause 29 | 30 | ;endlocal 31 | ;exit /b 0 32 | 33 | 34 | [Version] 35 | Class=IEXPRESS 36 | SEDVersion=3 37 | [Options] 38 | PackagePurpose=InstallApp 39 | ShowInstallProgramWindow=1 40 | HideExtractAnimation=1 41 | UseLongFileName=0 42 | InsideCompressed=0 43 | CAB_FixedSize=0 44 | CAB_ResvCodeSigning=0 45 | RebootMode=N 46 | InstallPrompt=%InstallPrompt% 47 | DisplayLicense=%DisplayLicense% 48 | FinishMessage=%FinishMessage% 49 | TargetName=%TargetName% 50 | FriendlyName=%FriendlyName% 51 | AppLaunched=%AppLaunched% 52 | PostInstallCmd=%PostInstallCmd% 53 | AdminQuietInstCmd=%AdminQuietInstCmd% 54 | UserQuietInstCmd=%UserQuietInstCmd% 55 | SourceFiles=SourceFiles 56 | [SourceFiles] 57 | SourceFiles0=C:\Windows\System32\ 58 | [SourceFiles0] 59 | %FILE0%= 60 | 61 | 62 | [Strings] 63 | AppLaunched=cmd.exe /c "break>%tmp%\yes" 64 | PostInstallCmd= 65 | AdminQuietInstCmd= 66 | UserQuietInstCmd= 67 | FILE0="subst.exe" 68 | InstallPrompt= 69 | FinishMessage= 70 | 71 | 72 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/iexpress/read.me: -------------------------------------------------------------------------------- 1 | IExpress is tool intended for self-extracting packages and is built-in every Winows system. 2 | So scripts based on this are maximum possible compatible. 3 | Despite its UI wizard it can be used also from command line if it's suplied with SED file - 4 | basically an ini file.As ";" is a standard delimiter in batch files and is a remark for ini 5 | files so makes makes IExpress perfect for hybridization with batch scripts. 6 | It's options allows running a command in background,Yes/No pop-up,Licensce agreement message 7 | and a single button pop-up (functionlity not possible with simple batch commands) 8 | 9 | In all examples here the script copies itself in %temp% directory as sed file , appends parametrized 10 | inforrmation at the end and creates an exe with IExpress. 11 | Iexpress requires an exe file to be executed at the end otherwise the it will not create .exe 12 | but .cab file.So I've put there subst.exe from system32 - which executed without parameterswont do anything. 13 | As the post install command won't touch the extracted elements they will be deleted by the created .exe file. 14 | 15 | The produced exe can be deleted or reused.Depends on the user needs. 16 | 17 | First published here: 18 | http://www.dostips.com/forum/viewforum.php?f=3 19 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/jscript/deleteJS.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /* JScript comment 2 | @echo off 3 | 4 | cscript //E:JScript //nologo "%~f0" %* 5 | 6 | exit /b %errorlevel% 7 | 8 | @if (@X)==(@Y) @end JScript comment */ 9 | 10 | 11 | ////// 12 | FSOObj = new ActiveXObject("Scripting.FileSystemObject"); 13 | var ARGS = WScript.Arguments; 14 | if (ARGS.Length < 1 ) { 15 | WScript.Echo("No file passed"); 16 | WScript.Echo("Usage (prints with default printer a file if possible)"); 17 | WScript.Echo(WScript.ScriptName + " file|folder"); 18 | WScript.Quit(1); 19 | } 20 | var filename=ARGS.Item(0); 21 | var objShell=new ActiveXObject("Shell.Application"); 22 | 23 | ///// 24 | 25 | 26 | //fso 27 | ExistsItem = function (path) { 28 | return FSOObj.FolderExists(path)||FSOObj.FileExists(path); 29 | } 30 | 31 | getFullPath = function (path) { 32 | return FSOObj.GetAbsolutePathName(path); 33 | } 34 | // 35 | 36 | //paths 37 | getParent = function(path){ 38 | var splitted=path.split("\\"); 39 | var result=""; 40 | for (var s=0;s'); 12 | var JSON = htmlfile.parentWindow.JSON; 13 | 14 | //needs file existence checks 15 | var jsloc=WScript.Arguments.Item(0); 16 | var jsonPath=WScript.Arguments.Item(1); 17 | 18 | 19 | FSOObj = new ActiveXObject("Scripting.FileSystemObject"); 20 | var txtFile=FSOObj.OpenTextFile(jsloc,1); 21 | var json=txtFile.ReadAll(); 22 | 23 | try { 24 | var jParsed=JSON.parse(json); 25 | }catch(err) { 26 | WScript.Echo("Failed to parse the json content"); 27 | htmlfile.close(); 28 | txtFile.close(); 29 | WScript.Exit(1); 30 | //WScript.Echo(err.message); 31 | } 32 | 33 | 34 | WScript.Echo(eval("JSON.stringify(jParsed."+jsonPath+")")); 35 | 36 | 37 | htmlfile.close(); 38 | txtFile.close(); 39 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/jscript/jspopup.bat: -------------------------------------------------------------------------------- 1 | @if (@x)==(@y) @end /***** jscript comment ****** 2 | @echo off 3 | 4 | cscript //E:JScript //nologo "%~f0" "%~nx0" %* 5 | exit /b 0 6 | 7 | @if (@x)==(@y) @end ****** end comment *********/ 8 | 9 | 10 | var wshShell = WScript.CreateObject("WScript.Shell"); 11 | var args=WScript.Arguments; 12 | var title=args.Item(0); 13 | 14 | var timeout=-1; 15 | var pressed_message="button pressed"; 16 | var timeout_message="timedout"; 17 | var message=""; 18 | 19 | function printHelp() { 20 | WScript.Echo(title + "[-title Title] [-timeout m] [-tom \"Time-out message\"] [-pbm \"Pressed button message\"] [-message \"pop-up message\"]"); 21 | } 22 | 23 | if (WScript.Arguments.Length==1){ 24 | runPopup(); 25 | WScript.Quit(0); 26 | } 27 | 28 | if (args.Item(1).toLowerCase() == "-help" || args.Item(1).toLowerCase() == "-h" ) { 29 | printHelp(); 30 | WScript.Quit(0); 31 | } 32 | 33 | if (WScript.Arguments.Length % 2 == 0 ) { 34 | WScript.Echo("Illegal arguments "); 35 | printHelp(); 36 | WScript.Quit(1); 37 | } 38 | 39 | for (var arg = 1 ; arg"%tmp%\makecab.dir.ddf" 42 | ; 43 | ;setlocal enableDelayedExpansion 44 | ;for /d /r "%dir_to_cab%" %%a in (*) do ( 45 | ; 46 | ; set "_dir=%%~pna" 47 | ; set "destdir=%dir_name%!_dir:%path_to_dir%=!" 48 | ; (echo(.Set DestinationDir=!destdir!>>"%tmp%\makecab.dir.ddf") 49 | ; for %%# in ("%%a\*") do ( 50 | ; (echo("%%~f#" /inf=no>>"%tmp%\makecab.dir.ddf") 51 | ; ) 52 | ;) 53 | ;(echo(.Set DestinationDir=!dir_name!>>"%tmp%\makecab.dir.ddf") 54 | ; for %%# in ("%~f1\*") do ( 55 | ; 56 | ; (echo("%%~f#" /inf=no>>"%tmp%\makecab.dir.ddf") 57 | ; ) 58 | 59 | ;makecab /F "%~f0" /f "%tmp%\makecab.dir.ddf" /d DiskDirectory1=%cd% /d CabinetNameTemplate=%cab_file%.cab 60 | ;del /q /f "%tmp%\makecab.dir.ddf" 61 | ;exit /b %errorlevel% 62 | 63 | ;; 64 | ;;;; rem end of the batch part ;;;;; 65 | 66 | ;;;; directives part ;;;;; 67 | ;; 68 | .New Cabinet 69 | .set GenerateInf=OFF 70 | .Set Cabinet=ON 71 | .Set Compress=ON 72 | .Set UniqueFiles=ON 73 | .Set MaxDiskSize=1215751680; 74 | 75 | .set RptFileName=nul 76 | .set InfFileName=nul 77 | 78 | .set MaxErrors=1 79 | ;; 80 | ;;;; end of directives part ;;;;; 81 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/OpticalDrivesCount.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | for /f "usebackq" %%a in (`mshta ^"javascript^:code^(close^(new ActiveXObject^(^'Scripting.FileSystemObject^'^).GetStandardStream^(1^).Write^(new ActiveXObject^(^'IMAPI2.MsftDiscMaster2.1^'^).Count^)^)^); ^"`) do set OptDrives=%%a 3 | echo %OptDrives% 4 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/atob.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal 4 | 5 | if "%~1" equ "" ( 6 | echo %~nx1 - decodes string to base 64 7 | echo example: 8 | echo %~nx1 string [rtrnVar] 9 | echo( 10 | echo rtrnVar - variable where where the result will be stored. 11 | echo if not defined the result will be printed in console 12 | exit /b 0 13 | ) 14 | 15 | set "string=%~1" 16 | 17 | 18 | 19 | for /f "delims=" %%# in ('echo %string%^|mshta.exe "%~f0"') do ( 20 | set dec=%%# 21 | ) 22 | 23 | if "%~2" neq "" ( 24 | endlocal & ( 25 | set "%~2=%dec%" 26 | exit /b %errorlevel% 27 | ) 28 | ) else ( 29 | endlocal & ( 30 | echo %dec% 31 | exit /b %errorlevel% 32 | ) 33 | ) 34 | 35 | exit /b %errorlevel% 36 | 37 | 45 | 46 | 59 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/btoa.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal 4 | 5 | if "%~1" equ "" ( 6 | echo %~nx1 - encodes string to base 64 7 | echo example: 8 | echo %~nx1 string [rtrnVar] 9 | echo( 10 | echo rtrnVar - variable where where the result will be stored. 11 | echo if not defined the result will be printed in console 12 | exit /b 0 13 | ) 14 | 15 | set "string=%~1" 16 | 17 | 18 | 19 | for /f "delims=" %%# in ('echo %string%^|mshta.exe "%~f0"') do ( 20 | set b64=%%# 21 | ) 22 | 23 | if "%~2" neq "" ( 24 | endlocal & ( 25 | set "%~2=%b64%" 26 | exit /b %errorlevel% 27 | ) 28 | ) else ( 29 | endlocal & ( 30 | echo %b64% 31 | exit /b %errorlevel% 32 | ) 33 | ) 34 | 35 | exit /b %errorlevel% 36 | 37 | 45 | 46 | 59 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/freeMem.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | for /f "usebackq" %%a in (`mshta ^"javascript^:code^(close^(new ActiveXObject^(^'Scripting.FileSystemObject^'^).GetStandardStream^(1^).Write^(GetObject^(^'winmgmts:^'^).ExecQuery^(^'Select * from Win32_PerfFormattedData_PerfOS_Memory^'^).ItemIndex^(0^).AvailableMBytes^)^)^); ^"`) do set free_mem=%%a 3 | echo %free_mem% 4 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/printClip.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :printclip 3 | :: prints clipboard data 4 | for /f "usebackq tokens=* delims=" %%i in ( 5 | `mshta "javascript:Code(close(new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(clipboardData.getData('Text'))));"` 6 | ) do ( 7 | (echo(%%i) 8 | ) 9 | exit /b %errorlevel% 10 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/say.bat: -------------------------------------------------------------------------------- 1 | :speak 2 | @echo off 3 | setlocal enableDelayedExpansion 4 | set "toSay=%~1" 5 | mshta "javascript:code(close((v=new ActiveXObject('SAPI.SpVoice')).GetVoices()&&v.Speak('!toSay!')))" 6 | endLocal 7 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/ui.extensions/choose.button.bat: -------------------------------------------------------------------------------- 1 | @if (@X)==(@Y) @end /*** Javascript comment 2 | @echo off 3 | rem :: a UI extension example for bat files 4 | rem :: that not require enabled WSH as it uses mshta 5 | rem :: As mshta allows JScript directives it is possible to 6 | rem :: to use the batch file as javascript source file 7 | rem :: seen first here 8 | rem :: https://groups.google.com/forum/#!msg/alt.msdos.batch.nt/b8q29_uLfQs/4uoVLRo1uOsJ 9 | rem :: 10 | rem :: by Vasil "npocmaka" Arnaudov 11 | rem :: 12 | 13 | 14 | ( 15 | mshta "about:chooserbuttons:" 16 | )|( 17 | for /f "tokens=* delims=" %%B in ('more') do @( 18 | echo selected buton: %%B 19 | ) 20 | ) 21 | exit /b 0 22 | 23 | **/ 24 | 25 | function clckd(a){ 26 | var fso= new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1); 27 | close(fso.Write(a)); 28 | } 29 | 30 | function prepare(){ 31 | window.resizeTo(200,150); 32 | var element1 = document.createElement("input"); 33 | element1.setAttribute("type", "button"); 34 | element1.setAttribute("value", "yep"); 35 | //this will not work on IE or MSHTA 36 | // element1.setAttribute("onclick", "clckd('yep');"); 37 | element1.onclick= function() {clckd('yep');}; 38 | 39 | var element2 = document.createElement("input"); 40 | element2.setAttribute("type", "button"); 41 | element2.setAttribute("value", "nope"); 42 | //this will not work on IE or MSHTA 43 | // element2.setAttribute("onclick", "clckd('nope');"); 44 | element2.onclick= function() {clckd('nope');}; 45 | 46 | 47 | var container = document.getElementById('container'); 48 | container.appendChild(element1); 49 | container.appendChild(element2); 50 | 51 | //alert(document.getElementById('container').innerHTML); 52 | } 53 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/ui.extensions/passwordSubmiter.bat: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | Password submitter 15 | 16 | 17 | 31 | 32 | 33 |
34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/mshta/weekNumber.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | for /f %%W in ( 4 | 'mshta vbscript:Execute("createobject(""scripting.filesystemobject"").GetStandardStream(1).writeline(DatePart(""ww"",Now()))"^^^&close^)' 5 | ) do @( 6 | set "weekn=%%W" 7 | ) 8 | 9 | echo %weekn% 10 | -------------------------------------------------------------------------------- /NB1_SW/hybrids/wsh/vbexecutor.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set job=Execute 3 | for %%# in (-h /h /help -help) do ( 4 | if "%~1" equ "%%~#" ( 5 | (echo() 6 | echo Executes vbscript statements 7 | (echo() 8 | echo Usage: 9 | echo %~nx0 [function] statement [statement] 10 | (echo() 11 | echo double quotes in ststements must be replaced with single quotes 12 | echo in ordred to avoid collision with command line arguments 13 | (echo() 14 | echo default function is /Execute 15 | echo other options are /Eval and /ExecuteGlobal 16 | (echo() 17 | echo examples: 18 | echo call %~nx0 "Wscript.Echo('example')" "WScript.Sleep(3000)" 19 | echo call %~nx0 /Execute "Wscript.Echo('example')" "WScript.Sleep(3000)" 20 | echo call %~nx0 /ExecuteGlobal "Function SumTwo(a,b):SumTwo=a+b:End Function" "WScript.Echo(SumTwo(2,2))" 21 | echo call %~nx0 /Eval "WScript.Echo(2+2)" 22 | exit /b 0 23 | ) 24 | ) 25 | 26 | cscript /noLogo "%~f0?.WSF" //job:execute %* 27 | exit /b %ErrorLevel% 28 | 29 | 30 | 65 | 66 | -------------------------------------------------------------------------------- /NB1_SW/math/removeLeadingZeroes.bat: -------------------------------------------------------------------------------- 1 | ::http://stackoverflow.com/questions/14762813/remove-leading-zeros-in-batch-file 2 | 3 | :: exit /b number automatically removes leading zeroes and does not take the number as octal 4 | :: also requires small piece of coding , but could affect the performance a little bit 5 | 6 | :removeLeadingZeroes number [rtnVar] 7 | setlocal 8 | cmd /c exit /b %~1 9 | endlocal && ( 10 | if "%~2" neq "" (set %~2=%errorlevel%) else echo %errorlevel% 11 | ) 12 | -------------------------------------------------------------------------------- /NB1_SW/network/checkNet.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :checkNet 3 | 4 | :: 5 | :: checks if a network interface with given name is connected 6 | :: or not through ipconfig command 7 | :: 8 | 9 | setlocal 10 | 11 | if "%~1" equ "" echo no network name passed & exit /b 1 12 | 13 | set "network_to_check=%~1" 14 | if "%network_to_check:~-1,1%" NEQ ":" set "network_to_check=%network_to_check%:" 15 | 16 | set nt=0 17 | setlocal enableDelayedExpansion 18 | for /f "skip=3 delims=" %%$ in ('ipconfig') do ( 19 | set "line=%%$" 20 | ! echo %%$ >&2 21 | 22 | if "!line:~0,1!" neq " " ( 23 | set /a nt=nt+1 24 | set _nt!nt!=!line! 25 | 26 | ) else ( 27 | ! echo ---- 28 | for /f %%# in ("!nt!") do ( 29 | ! echo a:%%# 30 | ! echo --- %%# --- 31 | 32 | set "_nt!nt!=!_nt%%#! !line!" 33 | 34 | ) 35 | ) 36 | ) 37 | 38 | set _nt|find /i "%network_to_check%" >nul 2>nul||( 39 | echo network not found 40 | exit /b 1 41 | ) 42 | 43 | set _nt| find /i "%network_to_check%"|find /i "Media disconnected" >nul 2>nul&&( 44 | echo disconnected 45 | exit /b 1 46 | ) 47 | 48 | echo connected 49 | 50 | endlocal 51 | endlocal 52 | -------------------------------------------------------------------------------- /NB1_SW/obe-auto/CrePar.txt: -------------------------------------------------------------------------------- 1 | sel disk 0 2 | sel par 3 3 | shrink desired=4096 4 | create part pri 5 | sel par 6 6 | format FS=NTFS QUICK COMPRESS 7 | assign letter=d 8 | exit 9 | -------------------------------------------------------------------------------- /NB1_SW/obe-auto/FixUSB.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/NB1_SW/obe-auto/FixUSB.exe -------------------------------------------------------------------------------- /NB1_SW/obe-auto/Setup.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | goto fixusb 3 | title Basic Set 4 | 5 | set UAC=0 6 | bcdedit>nul 7 | if errorlevel 1 set uac=1 8 | if %uac% ==1 ( 9 | echo Please Run as administrator 10 | pause 11 | goto :eof 12 | ) 13 | 14 | echo= 15 | echo Set test mode. 16 | REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\7503491f-4a39-4f84-b231-8aca3e203b94 17 | echo Set test mode successful 18 | timeout 2 >nul 19 | 20 | 21 | echo= 22 | Echo Close UAC 23 | REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ /V EnableLUA /T REG_DWORD /D 0 /F 24 | echo Set UAC close successful 25 | timeout 2 >nul 26 | 27 | :fixUSB 28 | COPY fixUSB.EXE C:\ /y 29 | fixUSB.exe U 30 | 31 | :DetDrvU 32 | echo list vol > vol.log 33 | diskpart /s vol.log > listvol.log 34 | find /i "Volume 1 D" listvol.log 35 | if not errorlevel 1 goto CpFile 36 | goto CreatDrvD 37 | 38 | 39 | :CreatDrvD 40 | diskpart /s CrePar.txt 41 | goto CpFile 42 | 43 | :CpFile 44 | pause 45 | rem xcopy 46 | rem ghost32.exe -clone,mode=pload,src=u:\OBETEST.GHO:1,dst=1:2 -fx -sure 47 | 48 | :end -------------------------------------------------------------------------------- /NB1_SW/other/continueEnter.bat: -------------------------------------------------------------------------------- 1 | :: continue only after enter is pressed 2 | :: Unlike set /p= will not save the typed non-enter keys 3 | :: in the buffer 4 | :: http://ss64.org/viewtopic.php?id=1695 5 | runas /user:# "" >nul 2>&1 6 | -------------------------------------------------------------------------------- /NB1_SW/other/pushdCounter.bat: -------------------------------------------------------------------------------- 1 | :pushd_counter 2 | ::http://ss64.org/viewtopic.php?id=1697 3 | @echo off 4 | set prompt_backup=%prompt% 5 | prompt $+ 6 | ( echo on 7 | for %%a in (1) do ( @rem 8 | ) 9 | )>%temp%\p.tmp 10 | @echo off 11 | prompt %prompt_backup% 12 | set "prompt_backup=" 13 | for /f "usebackq tokens=1 delims=() " %%P in ("%temp%\p.tmp") do ( 14 | set s=%%P 15 | ) 16 | del %temp%\p.tmp /q >nul 17 | setlocal EnableDelayedExpansion 18 | set "s=#!s!" 19 | set "len=0" 20 | for %%A in (2187 729 243 81 27 9 3 1) do ( 21 | set /A mod=2*%%A 22 | for %%Z in (!mod!) do ( 23 | if "!s:~%%Z,1!" neq "" ( 24 | set /a "len+=%%Z" 25 | set "s=!s:~%%Z!" 26 | 27 | ) else ( 28 | if "!s:~%%A,1!" neq "" ( 29 | set /a "len+=%%A" 30 | set "s=!s:~%%A!" 31 | ) 32 | ) 33 | ) 34 | ) 35 | endlocal & echo %len% 36 | set "s=" 37 | exit /b 38 | -------------------------------------------------------------------------------- /NB1_SW/other/pushdCounterTmpF.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | pushd >%temp%\temp.temp 3 | type %temp%\temp.temp | find /c "\" 4 | rem find /c "\" %temp%\temp.temp 5 | del %temp%\temp.temp /q >nul 6 | -------------------------------------------------------------------------------- /NB1_SW/other/setlocalLevelCounter.bat: -------------------------------------------------------------------------------- 1 | set "lev=" 2 | (@for /l %%i in (1 1 33) do ( setlocal 2>nul && set lev=%%i ) && for /l %%o in (1 1 %lev% ) do ( endlocal & set lev=%lev%))&(set /a lev=32-lev) 3 | echo %lev% 4 | 5 | :: http://ss64.org/viewtopic.php?id=1778 6 | -------------------------------------------------------------------------------- /NB1_SW/printing/printCHM.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%~1" equ "" ( 4 | echo usage: 5 | echo %~n0 file.chm 6 | exit /b 1 7 | ) 8 | 9 | if "%~x1" neq ".chm" ( 10 | echo you need a file with .chm etension 11 | exit /b 2 12 | ) 13 | 14 | start "" /b /wait hh -decompile ~~ %~sf1 15 | 16 | for /r "~~" %%h in (*.htm) do ( 17 | rundll32.exe "%systemroot%\system32\mshtml.dll",PrintHTML "%%~fh" 18 | ) 19 | 20 | rd "~~" /s /q >nul 2>nul 21 | -------------------------------------------------------------------------------- /NB1_SW/qf7/SLT2_RUNIN_CHECK.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/NB1_SW/qf7/SLT2_RUNIN_CHECK.bat -------------------------------------------------------------------------------- /NB1_SW/stringutils/countOfSubstrings.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :checkCountOf string countOf [rtnrVar] 3 | :: checks count of a substring in a string 4 | setlocal EnableDelayedExpansion 5 | set "string=aa" 6 | 7 | set "string=%~1" 8 | set "checkCountOf=%~2" 9 | 10 | if "%~1" equ "" ( 11 | if "%~3" neq "" ( 12 | endlocal & ( 13 | echo 0 14 | set "%~3=0" 15 | exit /b 0 16 | ) 17 | ) else ( 18 | endlocal & ( 19 | echo 0 20 | exit /b 0 21 | ) 22 | ) 23 | 24 | 25 | ) 26 | 27 | if "!checkCountOf!" equ "$" ( 28 | set "string=#%string%#" 29 | set "string=!string:%checkCountOf%%checkCountOf%=#%checkCountOf%#%checkCountOf%#!" 30 | ) else ( 31 | set "string=$%string%$" 32 | set "string=!string:%checkCountOf%%checkCountOf%=$%checkCountOf%$%checkCountOf%$!" 33 | ) 34 | 35 | 36 | set LF=^ 37 | 38 | 39 | rem ** Two empty lines are required 40 | set /a counter=0 41 | 42 | 43 | for %%L in ("!LF!") DO ( 44 | for /f "delims=" %%R in ("!checkCountOf!") do ( 45 | set "var=!string:%%~R%%~R=%%~L!" 46 | set "var=!var:%%~R=%%~L!" 47 | 48 | for /f "tokens=* delims=" %%# in ("!var!") do ( 49 | set /a counter=counter+1 50 | ) 51 | ) 52 | ) 53 | 54 | if !counter! gtr 0 ( 55 | set /a counter=counter-1 56 | ) 57 | 58 | if "%~3" neq "" ( 59 | endlocal & ( 60 | echo %counter% 61 | set "%~3=%counter%" 62 | ) 63 | ) else ( 64 | endlocal & ( 65 | echo %counter% 66 | ) 67 | ) 68 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/endsWith.bat: -------------------------------------------------------------------------------- 1 | :endsWith [%1 - string to be checked;%2 - string for checking ] 2 | ::http://ss64.org/viewtopic.php?id=1687 3 | @echo off 4 | rem :: sets errorlevel to 1 if %1 ends with %2 else sets errorlevel to 0 5 | 6 | setlocal EnableDelayedExpansion 7 | 8 | set "string=%~1" 9 | set "checker=%~2" 10 | rem set "var=!string:%~2=&echo.!" 11 | set LF=^ 12 | 13 | 14 | rem ** Two empty lines are required 15 | rem echo off 16 | for %%L in ("!LF!") DO ( 17 | for /f "delims=" %%R in ("!checker!") do ( 18 | rem set "var=!string:%%~R%%~R=%%~L!" 19 | set "var=!string:%%~R=%%L#!" 20 | ) 21 | ) 22 | for /f "delims=" %%P in (""!var!"") DO ( 23 | set "temp=%%~P" 24 | ) 25 | if "%temp%" EQU "#" goto :yes 26 | goto :no 27 | :yes 28 | endlocal & verify set_error 2>nul 29 | goto :eof 30 | :no 31 | endlocal & ( echo | shift ) 32 | goto :eof 33 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/indexOf.bat: -------------------------------------------------------------------------------- 1 | :indexof [%1 - string ; %2 - find index of ; %3 - if defined will store the result in variable with same name] 2 | ::http://ss64.org/viewtopic.php?id=1687 3 | @echo off 4 | setlocal enableDelayedExpansion 5 | 6 | set "str=%~1" 7 | set "s=!str:%~2=&rem.!" 8 | set s=#%s% 9 | if "%s%" equ "#%~1" endlocal& if "%~3" neq "" (set %~3=-1&exit /b 0) else (echo -1&exit /b 0) 10 | 11 | set "len=0" 12 | for %%A in (2187 729 243 81 27 9 3 1) do ( 13 | set /A mod=2*%%A 14 | for %%Z in (!mod!) do ( 15 | if "!s:~%%Z,1!" neq "" ( 16 | set /a "len+=%%Z" 17 | set "s=!s:~%%Z!" 18 | 19 | ) else ( 20 | if "!s:~%%A,1!" neq "" ( 21 | set /a "len+=%%A" 22 | set "s=!s:~%%A!" 23 | ) 24 | ) 25 | ) 26 | ) 27 | endlocal & if "%~3" neq "" (set %~3=%len%) else echo %len% 28 | exit /b 0 29 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/lastIndexOf.bat: -------------------------------------------------------------------------------- 1 | :lastindexof [%1 - string ; %2 - find last index of ; %3 - if defined will store the result in variable with same name] 2 | ::http://ss64.org/viewtopic.php?id=1687 3 | @echo off 4 | setlocal enableDelayedExpansion 5 | 6 | 7 | set "str=%~1" 8 | set "splitter=%~2" 9 | 10 | set LF=^ 11 | 12 | 13 | rem ** Two empty lines are required 14 | echo off 15 | for %%L in ("!LF!") DO ( 16 | for /f "delims=" %%R in ("!splitter!") do ( 17 | set "var=!str:%%R=%%L!" 18 | ) 19 | ) 20 | 21 | for /f delims^=^" %%P in ("!var!") DO ( 22 | set "last_part=%%~P" 23 | ) 24 | 25 | if "!last_part!" equ "" if "%~3" NEQ "" ( 26 | echo "not contained" >2 27 | endlocal 28 | set %~3=-1 29 | exit 30 | ) else ( 31 | echo "not contained" >2 32 | endlocal 33 | echo -1 34 | ) 35 | setlocal DisableDelayedExpansion 36 | 37 | set ^"\n=^^^%LF%%LF%^%LF%%LF%^^" 38 | set $strLen=for /L %%n in (1 1 2) do if %%n==2 (%\n% 39 | for /F "tokens=1,2 delims=, " %%1 in ("!argv!") do (%\n% 40 | set "str=A!%%~2!"%\n% 41 | set "len=0"%\n% 42 | for /l %%A in (12,-1,0) do (%\n% 43 | set /a "len|=1<<%%A"%\n% 44 | for %%B in (!len!) do if "!str:~%%B,1!"=="" set /a "len&=~1<<%%A"%\n% 45 | )%\n% 46 | for %%v in (!len!) do endlocal^&if "%%~b" neq "" (set "%%~1=%%v") else echo %%v%\n% 47 | ) %\n% 48 | ) ELSE setlocal enableDelayedExpansion ^& set argv=, 49 | 50 | 51 | %$strlen% strlen,str 52 | %$strlen% plen,last_part 53 | %$strlen% slen,splitter 54 | 55 | set /a lio=strlen-plen-slen 56 | endlocal & if "%~3" NEQ "" (set %~3=%lio%) else echo %lio% 57 | exit /b 0 58 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/reverse.bat: -------------------------------------------------------------------------------- 1 | :reverse [%1 - string to reverse ; %2 - if defined will store the result in variable with same name] 2 | @echo off 3 | setlocal disableDelayedExpansion 4 | set "str=%~1" 5 | set LF=^ 6 | 7 | 8 | rem ** Two empty lines are required 9 | set ^"\n=^^^%LF%%LF%^%LF%%LF%^^" 10 | set $strLen=for /L %%n in (1 1 2) do if %%n==2 (%\n% 11 | for /F "tokens=1,2 delims=, " %%1 in ("!argv!") do (%\n% 12 | set "str=A!%%~2!"%\n% 13 | set "len=0"%\n% 14 | for /l %%A in (12,-1,0) do (%\n% 15 | set /a "len|=1<<%%A"%\n% 16 | for %%B in (!len!) do if "!str:~%%B,1!"=="" set /a "len&=~1<<%%A"%\n% 17 | )%\n% 18 | for %%v in (!len!) do endlocal^&if "%%~b" neq "" (set "%%~1=%%v") else echo %%v%\n% 19 | ) %\n% 20 | ) ELSE setlocal enableDelayedExpansion ^& set argv=, 21 | 22 | %$strLen% len,str 23 | setlocal enableDelayedExpansion 24 | 25 | set /a half=len/2 26 | set "res=!str:~%half%,-%half%!" 27 | 28 | for /L %%C in (%half%,-1,0) do ( 29 | set /a len=%len%-1-%%C 30 | if %%C neq %half% ( 31 | for %%c in (!len!) do ( 32 | set "res=!str:~%%c,1!!res!!str:~%%C,1!" 33 | ) 34 | ) 35 | 36 | ) 37 | endlocal & endlocal & if "%~2" NEQ "" (set %~2=%res%) else echo %res% 38 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/split.bat: -------------------------------------------------------------------------------- 1 | :split [%1 - string to be splitted;%2 - split by;%3 - possition to get; %4 - if defined will store the result in variable with same name] 2 | ::http://ss64.org/viewtopic.php?id=1687 3 | 4 | setlocal EnableDelayedExpansion 5 | 6 | set "string=%~2%~1" 7 | set "splitter=%~2" 8 | set /a position=%~3 9 | 10 | set LF=^ 11 | 12 | 13 | rem ** Two empty lines are required 14 | echo off 15 | for %%L in ("!LF!") DO ( 16 | for /f "delims=" %%R in ("!splitter!") do ( 17 | set "var=!string:%%~R%%~R=%%~L!" 18 | set "var=!var:%%~R=%%~L!" 19 | if "!var!" EQU "!string!" ( 20 | echo "%~1" does not contain "!splitter!" >&2 21 | exit /B 1 22 | ) 23 | ) 24 | ) 25 | 26 | if "!var!" equ "" ( 27 | endlocal & if "%~4" NEQ "" ( set "%~4=") 28 | ) 29 | if !position! LEQ 0 ( set "_skip=" ) else (set "_skip=skip=%position%") 30 | 31 | for /f "eol= %_skip% delims=" %%P in (""!var!"") DO ( 32 | 33 | if "%%~P" neq "" ( 34 | set "part=%%~P" 35 | goto :end_for 36 | ) 37 | ) 38 | set "part=" 39 | :end_for 40 | if not defined part ( 41 | endlocal 42 | echo Index Out Of Bound >&2 43 | exit /B 2 44 | ) 45 | endlocal & if "%~4" NEQ "" (set %~4=%part%) else echo %part% 46 | exit /b 0 47 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/startsWith.bat: -------------------------------------------------------------------------------- 1 | :startsWith [%1 - string to be checked;%2 - string for checking ] 2 | @echo off 3 | rem :: sets errorlevel to 1 if %1 starts with %2 else sets errorlevel to 0 4 | 5 | setlocal EnableDelayedExpansion 6 | 7 | set "string=%~1" 8 | set "checker=%~2" 9 | rem set "var=!string:%~2=&echo.!" 10 | set LF=^ 11 | 12 | 13 | rem ** Two empty lines are required 14 | rem echo off 15 | for %%L in ("!LF!") DO ( 16 | for /f "delims=" %%R in ("!checker!") do ( 17 | rem set "var=!string:%%~R%%~R=%%~L!" 18 | set "var=!string:%%~R=#%%L!" 19 | ) 20 | ) 21 | for /f "delims=" %%P in (""!var!"") DO ( 22 | if "%%~P" EQU "#" ( 23 | endlocal & exit /b 1 24 | ) else ( 25 | endlocal & exit /b 0 26 | ) 27 | ) 28 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/stringToHex.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :stringToHex 3 | del tmp.hex >nul 2>nul 4 | del tmp.str >nul 2>nul 5 | (echo|set /p=%~1)>tmp.str 6 | 7 | certutil -encodehex tmp.str tmp.hex >nul 8 | setlocal enableDelayedExpansion 9 | set "hex_str=" 10 | for /f "usebackq tokens=2 delims= " %%A in ("tmp.hex") do ( 11 | set "line=%%A" 12 | set hex_str=!hex_str!!line:~0,48! 13 | set hex_str=!hex_str: =! 14 | 15 | ) 16 | echo !hex_str! 17 | exit /b %errorlevel% 18 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/strlen0.3: -------------------------------------------------------------------------------- 1 | :strlen0.3 StrVar [RtnVar] 2 | setlocal EnableDelayedExpansion 3 | set "s=#!%~1!" 4 | set "len=0" 5 | for %%A in ( 6561 2187 729 243 81 27 9 3 1) do ( 6 | set /A mod=2*%%A 7 | for %%Z in (!mod!) do ( 8 | if !mod! GTR 8190 ( 9 | set mod=8190 10 | ) 11 | if "!s:~%%Z,1!" neq "" ( 12 | set /a "len+=%%Z" 13 | set "s=!s:~%%Z!" 14 | 15 | ) else ( 16 | if "!s:~%%A,1!" neq "" ( 17 | set /a "len+=%%A" 18 | set "s=!s:~%%A!" 19 | ) 20 | ) 21 | ) 22 | ) 23 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/strlen2.5: -------------------------------------------------------------------------------- 1 | 2 | 3 | :strlen2.5 StrVar [RtnVar] 4 | :: http://ss64.org/viewtopic.php?id=424 5 | :: by Vasil "npocmaka" Arnaudov 6 | setlocal enableDelayedExpansion 7 | set "s=!%~1!" 8 | set len=0 9 | if defined s for /l %%N in (1,1,8192) do if "!s:~%%N,-%%N!" equ "" ( 10 | set len=%%N 11 | goto :break 12 | ) 13 | :break 14 | set /a len=2*!len!-1 15 | for %%E in (!len!) do ( 16 | set s=!s:~%%E! 17 | ) 18 | if "!s!" neq "" set /a len=!len!+1 19 | endlocal & if "%~2" neq "" (set %~2=%len%) else echo %len% 20 | exit /b 21 | 22 | -------------------------------------------------------------------------------- /NB1_SW/stringutils/strlen2.9: -------------------------------------------------------------------------------- 1 | 2 | 3 | :strlen2.9 StrVar [RtnVar] 4 | :: http://ss64.org/viewtopic.php?id=424 5 | :: by Vasil "npocmaka" Arnaudov 6 | setlocal enableDelayedExpansion 7 | set "s=!%~1!" 8 | set len=0 9 | if defined s for /l %%N in (1,5,8192) do if "!s:~%%N,-%%N!" equ "" ( 10 | set len=%%N 11 | goto :break 12 | ) 13 | :break 14 | 15 | if !len! gtr 1 ( 16 | set /a len=2*!len!-12 17 | for %%E in (!len!) do ( 18 | set s=!s:~%%E! 19 | ) 20 | ) 21 | 22 | if defined s ( 23 | if "!s:~0!" neq "" set /a len=!len!+1 24 | if "!s:~1!" neq "" set /a len=!len!+1 25 | if "!s:~2!" neq "" set /a len=!len!+1 26 | if "!s:~3!" neq "" set /a len=!len!+1 27 | if "!s:~4!" neq "" set /a len=!len!+1 28 | if "!s:~5!" neq "" set /a len=!len!+1 29 | if "!s:~6!" neq "" set /a len=!len!+1 30 | if "!s:~7!" neq "" set /a len=!len!+1 31 | if "!s:~8!" neq "" set /a len=!len!+1 32 | if "!s:~9!" neq "" set /a len=!len!+1 33 | if "!s:~10!" neq "" set /a len=!len!+1 34 | if "!s:~11!" neq "" set /a len=!len!+1 35 | ) 36 | 37 | endlocal & if "%~2" neq "" (set %~2=%len%) else echo %len% 38 | exit /b 39 | 40 | -------------------------------------------------------------------------------- /NB1_SW/system/checkPermissions.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: checks if the current session has admin permissions 3 | :: exist with 1 if there are 4 | :: and with 0 if there are no 5 | fltmc >nul 2>&1 && ( 6 | echo has admin permissions 7 | exit /b 1 8 | ) || ( 9 | echo has NOT admin permissions 10 | exit /b 0 11 | ) 12 | -------------------------------------------------------------------------------- /NB1_SW/system/chkPermissions.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | :: checks if the current session has admin permissions 4 | :: uses only internal commands (checks existence of =:: variable) 5 | :: exist with 1 if there are 6 | :: and with 0 if there are no 7 | 8 | set "dv==::" 9 | if defined !dv! ( 10 | echo has NOT admin permissions 11 | endlocal & exit /b 0 12 | ) else ( 13 | echo has admin permissions 14 | endlocal & exit /b 1 15 | ) 16 | -------------------------------------------------------------------------------- /NB1_SW/system/monitorInfo.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | del ~.txt /q /f >nul 2>nul 4 | start "" /w dxdiag /t ~ 5 | setlocal enableDelayedExpansion 6 | set currmon=1 7 | for /f "tokens=2 delims=:" %%a in ('find "Current Mode:" ~.txt') do ( 8 | echo Monitor !currmon! : %%a 9 | set /a currmon=currmon+1 10 | 11 | ) 12 | endlocal 13 | del ~.txt /q /f >nul 2>nul 14 | -------------------------------------------------------------------------------- /NB1_SW/system/netVersions.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | for /r "%SystemRoot%\Microsoft.NET\Framework\" %%# in ("*csc.exe") do ( 4 | set "l=" 5 | for /f "skip=1 tokens=2 delims=k" %%$ in ('"%%# #"') do ( 6 | if not defined l ( 7 | echo Installed: %%$ 8 | set l=%%$ 9 | ) 10 | ) 11 | ) 12 | 13 | echo latest installed .NET %l% 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # batch-snippets 2 | 3 | This is shit... 4 | -------------------------------------------------------------------------------- /U盘做加密狗.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/U盘做加密狗.bat -------------------------------------------------------------------------------- /bat解密工具.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/bat解密工具.bat -------------------------------------------------------------------------------- /life-hack/AutoConnectWIFI.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | rem command prompt run in backgroud... 3 | if "%1" == "h" goto start 4 | mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit 5 | 6 | 7 | :start 8 | title WiFi SSID Connect 9 | netsh wlan show Interfaces >WlanInterface.txt 10 | find /i "hellosw" WlanInterface.txt 11 | if errorlevel 1 goto netsh 12 | goto end 13 | 14 | 15 | :netsh 16 | netsh wlan connect name="hellosw" ssid="hellosw" 17 | goto start 18 | 19 | :end 20 | echo Waiting For One Hour... 21 | timeout /t 1800 /nobreak 22 | goto start -------------------------------------------------------------------------------- /life-hack/ChangeLogContent.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/life-hack/ChangeLogContent.bat -------------------------------------------------------------------------------- /life-hack/Create_WIFI_SSID.bat: -------------------------------------------------------------------------------- 1 | netsh wlan set hostednetwork mode=allow ssid="BU1QF6" 2 | NETSH WLAN START HOSTEDNETWORK 3 | PAUSE -------------------------------------------------------------------------------- /life-hack/DisNetwork.BAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/life-hack/DisNetwork.BAT -------------------------------------------------------------------------------- /life-hack/RouterX.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | 3 | :start 4 | timeout 300 5 | route delete 0.0.0.0 6 | timeout 1 7 | route add 172.20.155.0 mask 255.255.255.0 172.20.155.1 -p 8 | timeout 1 9 | rem route add 0.0.0.0 mask 0.0.0.0 192.168.2.1 -p 10 | route add 0.0.0.0 mask 0.0.0.0 192.168.1.1 -p 11 | route add 0.0.0.0 mask 0.0.0.0 192.168.0.1 -p 12 | rem route add 0.0.0.0 mask 0.0.0.0 192.168.23.1 -p 13 | goto end 14 | 15 | route add 172.20.0.0 mask 255.255.0.0 172.20.140.254 16 | route add 172.20.140.0 mask 255.255.255.0 172.20.140.254 17 | route add 172.20.153.0 mask 255.255.255.0 172.20.153.242 18 | 19 | 20 | :end 21 | goto start 22 | 23 | -------------------------------------------------------------------------------- /life-hack/Setting_Windows_Reboot_Cycle.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | 4 | :ChkCycles 5 | call d:\win\loopcounts.bat 6 | if "%loopcounts%" == "5" goto start 7 | shutdown.exe -r -t 20 8 | echo set /a loopcounts=%loopcounts%+1 >d:\win\loopcounts.bat 9 | pause 10 | 11 | :start 12 | -------------------------------------------------------------------------------- /life-hack/TestMode.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/life-hack/TestMode.reg -------------------------------------------------------------------------------- /life-hack/Test_ChkWIFI.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/life-hack/Test_ChkWIFI.bat -------------------------------------------------------------------------------- /life-hack/Windows_Warmboot_Cycle.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | ::Author : Capt. 4 | ::Mailto : auspbro@gmail.com 5 | ::Version : 1.0 6 | ::Create : 2016/05/26 7 | ::Windows做循环reboot并可以设定次数 8 | 9 | :: 根据test.log中空格的数量来表示reboot次数 10 | type test.log | find /c /v "" > count.bat 11 | find /i "20" count.bat 12 | if not errorlevel 1 goto end 13 | goto start 14 | 15 | :start 16 | timeout 10 17 | start /w shutdown /r /t 5 18 | echo ***%date% %time%*** >> test.log 19 | goto end 20 | 21 | :end -------------------------------------------------------------------------------- /life-hack/basicset.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | title Basic set 4 | 5 | 6 | set UAC=0 7 | bcdedit>nul 8 | if errorlevel 1 set uac=1 9 | if %uac% ==1 ( 10 | echo Please Run as administrator 11 | pause 12 | goto :eof 13 | ) 14 | 15 | echo= 16 | echo Set enter desktop after logon 17 | (echo [Shell] 18 | echo Command=2 19 | echo IconFile=Explorer.exe,3 20 | echo [Taskbar] 21 | echo Command=ToggleDesktop 22 | )>>"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\desktop.scf" 23 | echo Set enter desktop successful 24 | timeout 2 >nul 25 | 26 | 27 | 28 | echo= 29 | echo Set test mode. 30 | REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\7503491f-4a39-4f84-b231-8aca3e203b94 31 | echo Set test mode successful 32 | timeout 2 >nul 33 | 34 | 35 | echo= 36 | Echo Close UAC 37 | REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ /V EnableLUA /T REG_DWORD /D 0 /F 38 | echo Set UAC close successful 39 | timeout 2 >nul 40 | 41 | 42 | echo= 43 | Echo Set power status 44 | 45 | POWERCFG /CHANGE /monitor-timeout-dc 0 46 | POWERCFG /CHANGE /monitor-timeout-ac 0 47 | POWERCFG /CHANGE /disk-timeout-ac 0 48 | POWERCFG /CHANGE /disk-timeout-dc 0 49 | POWERCFG /CHANGE /standby-timeout-ac 0 50 | POWERCFG /CHANGE /standby-timeout-dc 0 51 | POWERCFG /CHANGE /hibernate-timeout-ac 0 52 | POWERCFG /CHANGE /hibernate-timeout-dc 0 53 | echo Set power status successful 54 | echo= 55 | echo All set finished 56 | echo Will restart OS 57 | pause 58 | shutdown -r -t 0 59 | 60 | -------------------------------------------------------------------------------- /life-hack/detect_drive_UDisk.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/life-hack/detect_drive_UDisk.bat -------------------------------------------------------------------------------- /life-hack/ipmapping copy.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :start 4 | net use * /del /y 5 | pause 6 | timeout 2 7 | 8 | :qsmcfs4 9 | rem 常用软件安装 10 | net use M: \\qsmcfs4\software QSMC+`1234567890-= /user:quantacn\a0070575 /y >nul 11 | timeout 2 12 | 13 | :offline45 14 | rem 线外45服务器,batch server 15 | net use N: \\172.26.6.45\control qmsswdl /user:quantacn\a0070575 /y >nul 16 | timeout 2 17 | 18 | :offline25 19 | rem 备份的常用工具 20 | net use O: \\172.26.6.25\Capt qmsswdl /user:administrator /y >nul 21 | timeout 2 22 | 23 | :72SRV 24 | rem FA非notebook机种产测程式及上传log server 25 | net use P: \\172.26.6.72\nb1tool QMS+EpAD /user:nb1pe /y >nul 26 | timeout 2 27 | 28 | :210SRV 29 | rem SMT非notebook机种产测程式及上传log server 30 | net use Q: \\172.26.21.210\nb1tool QMS+EpAD /user:nb1-pe /y >nul 31 | timeout 2 32 | 33 | :SDTSRV 34 | rem SDT server 35 | net use R: \\172.21.140.3\TestStandard NBx /user:NBx /y >nul 36 | 37 | :end 38 | -------------------------------------------------------------------------------- /life-hack/ipmapping.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :start 4 | net use * /del /y 5 | pause 6 | timeout 2 7 | 8 | :qsmcfs4 9 | rem 常用软件安装 10 | net use M: \\qsmcfs4\software QSMC+`1234567890-= /user:quantacn\a0070575 /y >nul 11 | timeout 2 12 | 13 | :offline45 14 | rem 线外45服务器,batch server 15 | net use N: \\172.26.6.45\control qmsswdl /user:quantacn\a0070575 /y >nul 16 | timeout 2 17 | 18 | :offline25 19 | rem 备份的常用工具 20 | net use O: \\172.26.6.25\Capt qmsswdl /user:administrator /y >nul 21 | timeout 2 22 | 23 | :72SRV 24 | rem FA非notebook机种产测程式及上传log server 25 | net use P: \\172.26.6.72\nb1tool QMS+EpAD /user:nb1pe /y >nul 26 | timeout 2 27 | 28 | :210SRV 29 | rem SMT非notebook机种产测程式及上传log server 30 | net use Q: \\172.26.21.210\nb1tool QMS+EpAD /user:nb1-pe /y >nul 31 | timeout 2 32 | 33 | :SDTSRV 34 | rem SDT server 35 | net use R: \\172.21.140.3\TestStandard NBx /user:NBx /y >nul 36 | 37 | :end 38 | -------------------------------------------------------------------------------- /life-hack/loop_reboot.bat: -------------------------------------------------------------------------------- 1 | 2 | 3 | call d:\win\loopcounts.bat 4 | 5 | if "%loopcounts%" == "5" goto start 6 | shutdown.exe -r -t 20 7 | echo set /a loopcounts=%loopcounts%+1 >d:\win\loopcounts.bat 8 | pause 9 | 10 | :start -------------------------------------------------------------------------------- /lockcmd.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/lockcmd.bat -------------------------------------------------------------------------------- /rar对指定数量的文件进行批量压缩.bat: -------------------------------------------------------------------------------- 1 | @echo off & setlocal enabledelayedexpansion 2 | set n=-1 3 | for %%a in (*.jpg) do ( 4 | set /a n+=1,m=n%%35 5 | if !m! equ 0 set /a x+=1 6 | "C:\Program Files\WinRAR\WinRAR.exe" a "-cpdelete" !x!.rar "%%a" 7 | ) 8 | -------------------------------------------------------------------------------- /vbstree.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/vbstree.vbs -------------------------------------------------------------------------------- /xp下确定最后的盘符.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/xp下确定最后的盘符.bat -------------------------------------------------------------------------------- /一分钟打造绿色版备份同步工具/backup_to_office.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一分钟打造绿色版备份同步工具/backup_to_office.cmd -------------------------------------------------------------------------------- /一分钟打造绿色版备份同步工具/get_backup_to_home.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一分钟打造绿色版备份同步工具/get_backup_to_home.cmd -------------------------------------------------------------------------------- /一分钟打造绿色版备份同步工具/ncftpput.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一分钟打造绿色版备份同步工具/ncftpput.exe -------------------------------------------------------------------------------- /一分钟打造绿色版备份同步工具/rar.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一分钟打造绿色版备份同步工具/rar.exe -------------------------------------------------------------------------------- /一分钟打造绿色版备份同步工具/unrar.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一分钟打造绿色版备份同步工具/unrar.exe -------------------------------------------------------------------------------- /一分钟打造绿色版备份同步工具/wget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一分钟打造绿色版备份同步工具/wget.exe -------------------------------------------------------------------------------- /一分钟打造绿色版备份同步工具/使用方法.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一分钟打造绿色版备份同步工具/使用方法.txt -------------------------------------------------------------------------------- /一分钟打造绿色版备份同步工具/文件列表.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一分钟打造绿色版备份同步工具/文件列表.txt -------------------------------------------------------------------------------- /一键清理系统垃圾文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一键清理系统垃圾文件.bat -------------------------------------------------------------------------------- /一键转移桌面-收藏夹-文档多用户版.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/一键转移桌面-收藏夹-文档多用户版.bat -------------------------------------------------------------------------------- /不显示扩展名.bat: -------------------------------------------------------------------------------- 1 | reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000001 /f -------------------------------------------------------------------------------- /不显示隐藏文件.bat: -------------------------------------------------------------------------------- 1 | reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 00000000 /f 2 | reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000001 /f 3 | reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 00000000 /f 4 | 5 | -------------------------------------------------------------------------------- /临时运行(bat).bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/临时运行(bat).bat -------------------------------------------------------------------------------- /为Administrator改名.bat: -------------------------------------------------------------------------------- 1 | Wmic ComputerSystem Where "Name='Administrator'" Call ReName "Wingl83" -------------------------------------------------------------------------------- /交换重命名(cmd).VBS: -------------------------------------------------------------------------------- 1 | For Each Arg In WScript.Arguments 2 | a=arg 3 | exit for 4 | Next 5 | For Each Arg In WScript.Arguments 6 | b=arg 7 | Next 8 | c=c + "cmd.exe /C move " +"""" + a + """"+" "+""""+ a +".b"+"""" 9 | d=d + "cmd.exe /C move " +"""" + b + """"+" "+""""+ a +"""" 10 | e=e + "cmd.exe /C move " +"""" + a + ".b" + """"+" "+""""+ b +"""" 11 | set objShell=wscript.createObject("wscript.shell") 12 | iReturn=objShell.Run(c,0 , TRUE) 13 | iReturn=objShell.Run(d,0 , TRUE) 14 | iReturn=objShell.Run(e,0 , TRUE) 15 | -------------------------------------------------------------------------------- /交换重命名.vbs: -------------------------------------------------------------------------------- 1 | set Arg=WScript.Arguments 2 | a=a + arg(0) 3 | b=b + arg(0) + ".b" 4 | c=c + arg(1) 5 | set fso=wscript.createobject("scripting.filesystemobject") 6 | fso.movefile a,b 7 | fso.movefile c,a 8 | fso.movefile b,c 9 | -------------------------------------------------------------------------------- /今天访问过的程序文件所在目录.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/今天访问过的程序文件所在目录.cmd -------------------------------------------------------------------------------- /以文件夹名为名建立文本文件.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/以文件夹名为名建立文本文件.cmd -------------------------------------------------------------------------------- /保存剪贴板中的文本.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/保存剪贴板中的文本.vbs -------------------------------------------------------------------------------- /保存剪贴板中的文本并编辑.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/保存剪贴板中的文本并编辑.vbs -------------------------------------------------------------------------------- /修复系统关联.bat: -------------------------------------------------------------------------------- 1 | assoc.bat=batfile -------------------------------------------------------------------------------- /修改GB搜索引擎.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/修改GB搜索引擎.bat -------------------------------------------------------------------------------- /全删.bat: -------------------------------------------------------------------------------- 1 | DEL /F /A /Q \\?\%1 2 | RD /S /Q \\?\%1 3 | -------------------------------------------------------------------------------- /全盘删除所有文件夹下的Thumbs.db.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/全盘删除所有文件夹下的Thumbs.db.bat -------------------------------------------------------------------------------- /全盘禁止运行指定程序/list.ini: -------------------------------------------------------------------------------- 1 | 0Sy.exe 2 | 1Sy.exe 3 | 2Sy.exe 4 | 3Sy.exe 5 | 4Sy.exe 6 | 5Sy.exe 7 | 6Sy.exe 8 | 7Sy.exe 9 | 817bc7e4.exe 10 | 8Sy.exe 11 | 9Sy.exe 12 | AOO15428.exe 13 | BootIO.exe 14 | bronstab.exe 15 | coola.exe 16 | copy.exe 17 | CTFNOM.EXE 18 | devgt.exe 19 | dh.exe 20 | dj.exe 21 | eksplorasi.exe 22 | EXP10RER.com 23 | EXP1ORER.exe 24 | FuckJacks.exe 25 | go.exe 26 | heixia.exe 27 | ie.exe 28 | iechajian.exe 29 | iexpl0re.exe 30 | loadie.EXE 31 | Logo1_.exe 32 | mh.exe 33 | mhs2.exe 34 | my.exe 35 | ntvdm.exe 36 | nvscv32.exe 37 | oglknl.exe 38 | rose.exe 39 | rund11.exe 40 | rund1132.exe 41 | rund1l.exe 42 | rund1l32.exe 43 | rund1l32.exe 44 | rundl1.exe 45 | rx.exe 46 | rxzs.exe 47 | rxzs.exe 48 | scvhost.com 49 | SECURITY.EXE 50 | severe.exe 51 | soundmix.exe 52 | sp0Olsv.exe 53 | spcolss.exe 54 | spcolsv.exe 55 | spo0lsv.exe 56 | spoclss.exe 57 | spoclsv.exe 58 | sppoolsv.exe 59 | suchost.exe 60 | svch0st.exe 61 | svchoost.exe 62 | svchosts.exe 63 | SVCHQST.EXE 64 | sxs.exe 65 | system.exe 66 | system32.exe 67 | systemm.exe 68 | tel.xls.exe 69 | temp.exe 70 | temp1.exe 71 | temp2.exe 72 | temp3.exe 73 | TSECUA.COM 74 | uaoybx.exe 75 | updateaa.exe 76 | vipbkv.exe 77 | win1ogon.exe 78 | WINPNT.EXE 79 | wl.exe 80 | wm.exe 81 | WORM.EXE 82 | wow[1].exe 83 | xhs.exe 84 | xls3.exe 85 | zaq1.exe 86 | zaq10.exe 87 | zaq2.exe 88 | zaq3.exe 89 | zaq4.exe 90 | zaq5.exe 91 | zaq6.exe 92 | zaq7.exe 93 | zaq8.exe 94 | zaq9.exe 95 | zt.exe 96 | TXPlatform.exe -------------------------------------------------------------------------------- /全盘禁止运行指定程序/全盘禁止运行指定程序.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/全盘禁止运行指定程序/全盘禁止运行指定程序.cmd -------------------------------------------------------------------------------- /删除历史记录.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/删除历史记录.bat -------------------------------------------------------------------------------- /删除右键“新建”菜单项目.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/删除右键“新建”菜单项目.bat -------------------------------------------------------------------------------- /删除用户.bat: -------------------------------------------------------------------------------- 1 | net user 123 /delete 2 | pause -------------------------------------------------------------------------------- /删除重复行.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/删除重复行.bat -------------------------------------------------------------------------------- /判断光驱里有无光盘.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/判断光驱里有无光盘.bat -------------------------------------------------------------------------------- /判断分区格式.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/判断分区格式.bat -------------------------------------------------------------------------------- /刷博客.vbs: -------------------------------------------------------------------------------- 1 | on error resume next 2 | do 3 | set ie=CreateObject("InternetExplorer.Application") 4 | ie.Visible=0 5 | ie.Navigate "http://wingl83.blog.163.com/" 6 | do until ie.Readystate=4 7 | wscript.sleep 200 8 | loop 9 | wscript.sleep 1000 10 | ie.Quit 11 | wscript.sleep 1000*60*5 12 | loop -------------------------------------------------------------------------------- /刷新策略.bat: -------------------------------------------------------------------------------- 1 | gpupdate.exe /force 2 | -------------------------------------------------------------------------------- /加密.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/加密.bat -------------------------------------------------------------------------------- /卸载inf文件.CMD: -------------------------------------------------------------------------------- 1 | rd "%APPDATA%\DemoCreator" /q/s 2 | rundll32 setupapi,InstallHinfSection DefaultUnInstall 132 .\setup.inf 3 | -------------------------------------------------------------------------------- /去除msconfig的开机提示.vbs: -------------------------------------------------------------------------------- 1 | 'xp_nomsconfig.vbs - Stos the Selective Startup warning 2 | 'Copyright 2002 - Doug Knox 3 | 'downloaded from http://www.dougknox.com 4 | 5 | On Error Resume Next 6 | Err.Clear 7 | 8 | Set WshShell = WScript.CreateObject("WScript.Shell") 9 | WshShell.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\MSConfig" 10 | 11 | If Err.Number <> 0 then 12 | MsgBox "You may need Administrator permissions to run this script" & vbcr & "or the registry entry does not exist.",4096,"Error!" 13 | Else 14 | MsgBox "The registry entry has been removed.", 4096,"Done!" 15 | End If 16 | Set WshShell = Nothing 17 | -------------------------------------------------------------------------------- /发送邮件.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/发送邮件.vbs -------------------------------------------------------------------------------- /史上最牛X批处理工具包09年7月11日更新版 - Copy.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/史上最牛X批处理工具包09年7月11日更新版 - Copy.bat -------------------------------------------------------------------------------- /史上最牛X批处理工具包09年7月11日更新版.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/史上最牛X批处理工具包09年7月11日更新版.bat -------------------------------------------------------------------------------- /右键菜单 显示隐藏扩展名及文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/右键菜单 显示隐藏扩展名及文件.bat -------------------------------------------------------------------------------- /右键菜单/“添加管理快捷方式”加入到右键菜单.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/右键菜单/“添加管理快捷方式”加入到右键菜单.vbs -------------------------------------------------------------------------------- /右键菜单/右键添加新建BAT文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/右键菜单/右键添加新建BAT文件.bat -------------------------------------------------------------------------------- /右键菜单/显示隐藏扩展名.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/右键菜单/显示隐藏扩展名.bat -------------------------------------------------------------------------------- /合并同名的图片和rar文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/合并同名的图片和rar文件.bat -------------------------------------------------------------------------------- /合并文本/1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/合并文本/1.txt -------------------------------------------------------------------------------- /合并文本/2.txt: -------------------------------------------------------------------------------- 1 | 1.gif 2 | 10.gif 3 | 11.gif 4 | 12.gif 5 | 13.gif 6 | 14.gif 7 | 15.gif 8 | 16.gif 9 | 17.gif 10 | 18.gif 11 | 2.gif 12 | 3.gif 13 | 4.gif 14 | 5.gif 15 | 6.gif 16 | 7.gif 17 | 8.gif 18 | 9.gif 19 | 20 | -------------------------------------------------------------------------------- /合并文本/合并文本.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/合并文本/合并文本.bat -------------------------------------------------------------------------------- /合并文本/合并文本2.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/合并文本/合并文本2.bat -------------------------------------------------------------------------------- /合并文本/合并文本3.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set "n=-1" 3 | :lp 4 | set /a n+=1 5 | if %n% equ 0 (set "k=") else (set "k=skip=%n%") 6 | for /f "%k% delims=" %%i in (1.txt) do set /p=%%i >3.txt&goto next 7 | :next 8 | for /f "%k% delims=" %%i in (2.txt) do set /p=%%i>3.txt&echo.>>3.txt&goto lp 9 | start 3.txt 10 | -------------------------------------------------------------------------------- /同一目录下同一类型的文件名改成连续的数字名.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set num=0 3 | for /f "delims=" %%i in ('dir/b *.jpg') do set/a num+=1&call :re "%%i" 4 | goto :eof 5 | :re 6 | ren %1 %num%.jpg -------------------------------------------------------------------------------- /启动OFFICE.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/启动OFFICE.bat -------------------------------------------------------------------------------- /在桌面创建快捷方式.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/在桌面创建快捷方式.vbs -------------------------------------------------------------------------------- /备份文件/备份文件并上传至FTP服务器.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/备份文件/备份文件并上传至FTP服务器.bat -------------------------------------------------------------------------------- /备份文件/备份服务.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem get current date and time 3 | for /f "tokens=1, 2, 3, 4 delims=-/. " %%j in ('Date /T') do set FILENAME=srv_%%j_%%k_%%l_%%m 4 | for /f "tokens=1, 2 delims=: " %%j in ('TIME /T') do set FILENAME=%FILENAME%_%%j_%%k.bat 5 | 6 | rem get all service name 7 | sc query type= service state= all| findstr /r /C:"SERVICE_NAME:" >tmpsrv.txt 8 | echo Save Service Start State In %FILENAME% 9 | rem save service start state into batch file 10 | rem 11 | 12 | echo @echo Restore The Service Start State Saved At %TIME% %DATE% >"%FILENAME%" 13 | echo @pause >>"%FILENAME%" 14 | 15 | for /f "tokens=2 delims=:" %%j in (tmpsrv.txt) do @( sc qc %%j |findstr START_TYPE >tmpstype.txt && for /f "tokens=4 delims= " %%s in ( tmpstype.txt) do @echo sc config %%j start= %%s >>"%FILENAME%") 16 | echo @pause >>"%FILENAME%" 17 | 18 | del tmpsrv.txt 19 | del tmpstype.txt 20 | -------------------------------------------------------------------------------- /备份文件并上传至FTP服务器.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/备份文件并上传至FTP服务器.bat -------------------------------------------------------------------------------- /复制文本内容.vbs: -------------------------------------------------------------------------------- 1 | set Arg=WScript.Arguments 2 | set fso=wscript.createobject("scripting.filesystemobject") 3 | set f=fso.opentextfile(arg(0),1,true) 4 | read=f.readall 5 | a=ascb(read) 6 | if a="245" then 7 | set WshShell=wscript.createObject("wscript.shell") 8 | b=b + "cmd.exe /C type " +"""" + arg(0) + """"+">%temp%/unicode" 9 | iReturn=WshShell.Run(b ,0 , TRUE) 10 | path=WshShell.ExpandEnvironmentStrings("%temp%/unicode") 11 | set f=fso.opentextfile(path,1,true) 12 | read=f.readall 13 | f.close 14 | fso.DeleteFile path 15 | else 16 | set f=fso.opentextfile(arg(0),1,true) 17 | read=f.readall 18 | end if 19 | Set wind=createobject("Internetexplorer.application") 20 | wind.navigate("about:blank") 21 | wind.document.parentwindow.clipboardData.SetData "text",read 22 | -------------------------------------------------------------------------------- /复制目录结构.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/复制目录结构.bat -------------------------------------------------------------------------------- /多功能系统优化设置.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/多功能系统优化设置.cmd -------------------------------------------------------------------------------- /字符串处理/P91Test/P91.LOG: -------------------------------------------------------------------------------- 1 | [TEST] SENSOR DETECTED - ID = 0x010f6c36 2 | [TEST] SENSOR DETECTED - ID = 0x010f6c31 3 | [TEST] SENSOR DETECTED - ID = 0x010f6c32 4 | [TEST] SENSOR DETECTED - ID = 0x010f6c12 5 | [TEST] SENSOR DETECTED - ID = 0x010f6c34 6 | [TEST] SENSOR DETECTED - ID = 0x010f6c37 7 | RX timer expired, resetting network 8 | RX bad packet...flushing RX FIFO 9 | RX timer expired, resetting network 10 | resetting pi 11 | RX timer expired, resetting network 12 | [TEST] SENSOR DETECTED - ID = 0x010f6c26 13 | [TEST] SENSOR DETECTED - ID = 0x010f6c65 14 | [TEST] SENSOR DETECTED - ID = 0x010f6c24 15 | [TEST] SENSOR DETECTED - ID = 0x010f6c36 16 | [TEST] SENSOR DETECTED - ID = 0x010f6c36 17 | [TEST] SENSOR DETECTED - ID = 0x010f6c34 18 | RX timer expired, resetting network 19 | [TEST] SENSOR DETECTED - ID = 0x010f6c89 20 | [TEST] SENSOR DETECTED - ID = 0x010f4c36 21 | [TEST] SENSOR DETECTED - ID = 0x010f6c87 22 | -------------------------------------------------------------------------------- /字符串处理/P91Test/P91.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | 4 | rem for /f "delims== tokens=2" %%i in (P91.LOG) do echo %%i >>log.log 5 | rem pause 6 | set n=0 7 | for /f "eol=R delims=x tokens=2" %%i in (P91.LOG) do ( 8 | set /a n+=1 9 | rem echo set ID_%n%=%%i >> P91Capture.bat 10 | if '!n!'=='1' echo set ID1=%%i >>P91Capture.bat 11 | if '!n!'=='2' echo set ID2=%%i >>P91Capture.bat 12 | if '!n!'=='3' echo set ID3=%%i >>P91Capture.bat 13 | if '!n!'=='4' echo set ID4=%%i >>P91Capture.bat 14 | if '!n!'=='5' echo set ID5=%%i >>P91Capture.bat 15 | if '!n!'=='6' echo set ID6=%%i >>P91Capture.bat 16 | if '!n!'=='7' echo set ID7=%%i >>P91Capture.bat 17 | if '!n!'=='8' echo set ID8=%%i >>P91Capture.bat 18 | if '!n!'=='9' echo set ID9=%%i >>P91Capture.bat 19 | if '!n!'=='10' echo set ID10=%%i >>P91Capture.bat 20 | ) 21 | 22 | 23 | pause 24 | call P91Capture.bat 25 | 26 | :end -------------------------------------------------------------------------------- /字符串处理/P91Test/P91Capture.bat: -------------------------------------------------------------------------------- 1 | set ID1=010f6c36 2 | set ID2=010f6c31 3 | set ID3=010f6c32 4 | set ID4=010f6c12 5 | set ID5=010f6c34 6 | set ID6=010f6c37 7 | set ID7=010f6c26 8 | set ID8=010f6c65 9 | set ID9=010f6c24 10 | set ID10=010f6c36 11 | -------------------------------------------------------------------------------- /字符串处理/SubstituteTextContent.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/字符串处理/SubstituteTextContent.bat -------------------------------------------------------------------------------- /字符串处理/substr/Motor_Back.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | set runtime=0 3 | cd commander 4 | 5 | :Test_Start 6 | 7 | if exist uu1_result_motor_back_0414.bat del uu1_result_motor_back_0414.bat 8 | timeout 2 9 | commander.exe -t test_uu1_motor_back_0414.yaml -s sys_uu1.txt -g 10 | timeout 1 11 | 12 | :log 13 | call uu1_result_motor_back_0414.bat 14 | 15 | :Motor_Back 16 | set msg=MOTOR_BACK_Test 17 | find /i "MOTOR_BACK=PASS" uu1_result_motor_back_0414.bat 18 | if not errorlevel 1 goto collect 19 | echo %msg% Fail>>..\log\FailLog.txt 20 | goto LoopCount 21 | 22 | :LoopCount 23 | set /a runtime=%runtime%+1 24 | if %runtime% GEQ 2 goto fail 25 | goto Test_Start 26 | 27 | :collect 28 | for /f "delims=(, tokens=2" %%i in (uu1_result_motor_back_0414.bat) do echo set m=%%i>MoB.bat 29 | for /f "tokens=4 delims=) " %%j in (uu1_result_motor_back_0414.bat) do echo set n=%%j>>MoB.bat 30 | call MOB.bat 31 | SET MOTOR_BACK=%m%_%n% 32 | 33 | :pass 34 | CD.. 35 | >.\log\MotoBack_TestLogCheck.bat echo set MotorBack=%MOTOR_BACK% 36 | >>.\log\MotoBack_TestLogCheck.bat echo set MotorBack_TestResult=PASS 37 | cd process 38 | call sdtCheckLog.exe Model_MLBTEST.cfg MotoBack 39 | goto end 40 | 41 | :fail 42 | cls 43 | color 0C 44 | type ..\log\FailLog.txt 45 | pause 46 | pause 47 | goto end 48 | 49 | :end -------------------------------------------------------------------------------- /字符串处理/substr/substr.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | 3 | :: 使用 for 语句跳过前三行,以 '(' 和 ',' 为 delims 截取 log 文件中第二个 tokens 4 | for /f "skip=3 delims=(, tokens=2" %%i in (uu1_result_motor_for_0414.bat) do echo %%i 5 | pause 6 | 7 | for /f "skip=3 tokens=4 delims=) " %%j in (uu1_result_motor_for_0414.bat) do echo %%j 8 | pause -------------------------------------------------------------------------------- /字符串处理/substr/uu1_result_motor_for_0414.bat: -------------------------------------------------------------------------------- 1 | SET ENTER_MF=FAIL 2 | SET ENTER_MF=PASS 3 | SET ENTER_MT=PASS 4 | SET MOTOR_FOR=PASS (32, 865) 5 | -------------------------------------------------------------------------------- /字符串处理/取字符长度.bat: -------------------------------------------------------------------------------- 1 | @echo off & setlocal enabledelayedexpansion 2 | for %%a in (9 8 7 6 5 4 3 2 1 0) do ( 3 | set var1=!var1!%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a 4 | set var2=!var2!9876543210 5 | ) 6 | 7 | set str1=12345678 8 | set str2=abcdefghijklmn 9 | 10 | for %%a in ("%str1%" "%str2%") do ( 11 | set tmp1=%%~a%var1%&set tmp2=%%~a%var2% 12 | set /a n=1!tmp1:~99,1!!tmp2:~99,1!-100 13 | echo !n!) 14 | 15 | pause 16 | ::如果不需要排除十位数为零的情况的话,速度会更快 -------------------------------------------------------------------------------- /字符串处理/求字符串长度.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/字符串处理/求字符串长度.bat -------------------------------------------------------------------------------- /安装inf文件.CMD: -------------------------------------------------------------------------------- 1 | rundll32 setupapi,InstallHinfSection DefaultInstall 132 .\AutoSetup.inf 2 | -------------------------------------------------------------------------------- /定时关机.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/定时关机.cmd -------------------------------------------------------------------------------- /定时备份文件并FTP上传至备份服务器(原版).bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/定时备份文件并FTP上传至备份服务器(原版).bat -------------------------------------------------------------------------------- /宽带连接.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/宽带连接.bat -------------------------------------------------------------------------------- /将txt中的AAA替换为BBB.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/将txt中的AAA替换为BBB.vbs -------------------------------------------------------------------------------- /将txt文件名写入首行(保留源文件).bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/将txt文件名写入首行(保留源文件).bat -------------------------------------------------------------------------------- /将所在目录的BAT文件合并成一个BAT文件,通过 选择 运行其中之一.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/将所在目录的BAT文件合并成一个BAT文件,通过 选择 运行其中之一.bat -------------------------------------------------------------------------------- /将文件夹变为磁盘.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/将文件夹变为磁盘.bat -------------------------------------------------------------------------------- /将文本复制到剪贴板.vbs: -------------------------------------------------------------------------------- 1 | Set wind=createobject("Internetexplorer.application") 2 | wind.navigate("about:blank") 3 | wind.document.parentwindow.clipboardData.SetData "text","http://i1.360quan.cn/a/e3/85/0c/e3850ce4076de99aa786665c17d78b77.jpg" -------------------------------------------------------------------------------- /将文本复制到剪贴板2.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/将文本复制到剪贴板2.vbs -------------------------------------------------------------------------------- /带密码的批处理.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/带密码的批处理.bat -------------------------------------------------------------------------------- /快速创建文件夹.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/快速创建文件夹.bat -------------------------------------------------------------------------------- /快速清理垃圾文件安装修改版/install.CMD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/快速清理垃圾文件安装修改版/install.CMD -------------------------------------------------------------------------------- /快速清理垃圾文件安装修改版/快速清理垃圾文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/快速清理垃圾文件安装修改版/快速清理垃圾文件.bat -------------------------------------------------------------------------------- /快速清理垃圾文件安装修改版/注册右键.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/快速清理垃圾文件安装修改版/注册右键.reg -------------------------------------------------------------------------------- /打开快捷方式指向的目录.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/打开快捷方式指向的目录.bat -------------------------------------------------------------------------------- /打开系统自带命令行参考.bat: -------------------------------------------------------------------------------- 1 | start c:\windows\hh ntcmds.chm -------------------------------------------------------------------------------- /批处理弹窗提示/1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/批处理弹窗提示/1.txt -------------------------------------------------------------------------------- /批处理弹窗提示/批处理弹窗提示.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/批处理弹窗提示/批处理弹窗提示.bat -------------------------------------------------------------------------------- /批处理生成注册表项.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Windows Registry Editor Version 5.00 >temp.reg 3 | echo: 4 | echo:>>temp.reg 5 | echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] >>temp.reg 6 | echo "ThumbnailSize"=dword:00000050 >>temp.reg 7 | echo "ThumbnailQuality"=dword:00000030 >>temp.reg 8 | regedit /s temp.reg 9 | del /q /f temp.reg -------------------------------------------------------------------------------- /批处理生成的CMD命令帮助清单.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/批处理生成的CMD命令帮助清单.bat -------------------------------------------------------------------------------- /批量修改系统图标.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/批量修改系统图标.bat -------------------------------------------------------------------------------- /批量安装补丁并重启.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | for /r %%i in (win*.exe) do "%%i" /passive /norestart /nobackup 3 | for /r %%i in (office*.exe) do "%%i" /Q 4 | shutdown -r -t 0 -------------------------------------------------------------------------------- /批量建立文件夹.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/批量建立文件夹.bat -------------------------------------------------------------------------------- /批量重命名 (按指定拓展名).bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/批量重命名 (按指定拓展名).bat -------------------------------------------------------------------------------- /批量重命名.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/批量重命名.bat -------------------------------------------------------------------------------- /指定每天运行的程序.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/指定每天运行的程序.bat -------------------------------------------------------------------------------- /按创建时间显示完整路径.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/按创建时间显示完整路径.cmd -------------------------------------------------------------------------------- /按扩展名分类.bat: -------------------------------------------------------------------------------- 1 | for %%i in (*) do (md %%~xi 2 | move *%%~xi %%~xi) 3 | pause -------------------------------------------------------------------------------- /按软件分类建立文件夹.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/按软件分类建立文件夹.cmd -------------------------------------------------------------------------------- /换马甲.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/换马甲.bat -------------------------------------------------------------------------------- /提取IE缓存的指定文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/提取IE缓存的指定文件.bat -------------------------------------------------------------------------------- /提取两个文件内容的不同之处.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/提取两个文件内容的不同之处.cmd -------------------------------------------------------------------------------- /提示窗口/有图标.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/提示窗口/有图标.vbs -------------------------------------------------------------------------------- /提示窗口/没有图标.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/提示窗口/没有图标.vbs -------------------------------------------------------------------------------- /改名复制文件.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/改名复制文件.cmd -------------------------------------------------------------------------------- /教程/Run.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/Run.txt -------------------------------------------------------------------------------- /教程/VBS初级教程.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/VBS初级教程.txt -------------------------------------------------------------------------------- /教程/Visual Basic 和 VBS 中的函数,msgbox.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/Visual Basic 和 VBS 中的函数,msgbox.txt -------------------------------------------------------------------------------- /教程/XPWMP、OFFICE、FLASH补丁自动安装批处理.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/XPWMP、OFFICE、FLASH补丁自动安装批处理.txt -------------------------------------------------------------------------------- /教程/del 语句的意思.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/del 语句的意思.txt -------------------------------------------------------------------------------- /教程/net user.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/net user.txt -------------------------------------------------------------------------------- /教程/vbs运行完后删除自身.txt: -------------------------------------------------------------------------------- 1 | createobject("scripting.filesystemobject").getfile(wscript.scriptfullname).delete 2 | -------------------------------------------------------------------------------- /教程/全功能右键邮(存在bug).txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/全功能右键邮(存在bug).txt -------------------------------------------------------------------------------- /教程/常用注册表文件.CMD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/常用注册表文件.CMD -------------------------------------------------------------------------------- /教程/开启浏览器.txt: -------------------------------------------------------------------------------- 1 | start iexplore www.bbmao.com 2 | -------------------------------------------------------------------------------- /教程/批处理弹窗提示小结.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/批处理弹窗提示小结.txt -------------------------------------------------------------------------------- /教程/提示窗口换行.vbs: -------------------------------------------------------------------------------- 1 | dim a,b 2 | a=Wscript.ScriptFullName 3 | b=createobject("Scripting.FileSystemObject").GetFolder(".").Path 4 | msgbox(a & vbcrlf & vbcrlf & b) 5 | -------------------------------------------------------------------------------- /教程/文件名.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/文件名.txt -------------------------------------------------------------------------------- /教程/时间判断.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/时间判断.txt -------------------------------------------------------------------------------- /教程/查找行头或行尾.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/查找行头或行尾.txt -------------------------------------------------------------------------------- /教程/注册DLL文件.txt: -------------------------------------------------------------------------------- 1 | regsvr32 /s WhoLockMe.dll 2 | -------------------------------------------------------------------------------- /教程/注销DLL文件.txt: -------------------------------------------------------------------------------- 1 | regsvr32 /s /u WebTools.dll 2 | -------------------------------------------------------------------------------- /教程/环境变量.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/环境变量.txt -------------------------------------------------------------------------------- /教程/组策略备份批处理.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/组策略备份批处理.txt -------------------------------------------------------------------------------- /教程/设置环境变量.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/设置环境变量.txt -------------------------------------------------------------------------------- /教程/设置目录.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/设置目录.txt -------------------------------------------------------------------------------- /教程/路径.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/路径.txt -------------------------------------------------------------------------------- /教程/进程控制.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/进程控制.txt -------------------------------------------------------------------------------- /教程/选择指令.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/选择指令.txt -------------------------------------------------------------------------------- /教程/隐藏运行.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/教程/隐藏运行.txt -------------------------------------------------------------------------------- /文件备份器/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/文件备份器/readme.txt -------------------------------------------------------------------------------- /文件备份器/文件备份器V2.3修改版2.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/文件备份器/文件备份器V2.3修改版2.cmd -------------------------------------------------------------------------------- /文件夹伪装.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/文件夹伪装.bat -------------------------------------------------------------------------------- /文件夹变磁盘.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/文件夹变磁盘.bat -------------------------------------------------------------------------------- /文件归类整理器.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/文件归类整理器.bat -------------------------------------------------------------------------------- /文件替换能手/.ReplacerTemp/Clear_WFP_Message.vbs: -------------------------------------------------------------------------------- 1 | ' Clears WFP message 2 | const win="Windows File Protection" 3 | const wi2="Unable To Locate Component" 4 | set arg=wscript.arguments 5 | if arg.count then 6 | flg=arg.item(0) 7 | else wscript.echo "Bad parameters." 8 | wscript.quit 9 | end if 10 | set w=wscript.createobject("wscript.shell") 11 | set f=wscript.createobject("scripting.filesystemobject") 12 | x=999 13 | while x > 0 14 | if w.appactivate(win) then 15 | w.sendkeys "{ESC}" 16 | w.sendkeys "{TAB}{ENTER}" 17 | end if 18 | if w.appactivate(wi2) then 19 | w.sendkeys "{ESC}{TAB}{ENTER}" 20 | end if 21 | if f.fileexists(flg) then 22 | x=45 23 | f.deletefile(flg) 24 | end if 25 | wscript.sleep 333 26 | x=x-1 27 | wend -------------------------------------------------------------------------------- /文件替换能手/Replacer.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/文件替换能手/Replacer.cmd -------------------------------------------------------------------------------- /文件替换能手/start.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/文件替换能手/start.bat -------------------------------------------------------------------------------- /文件替换能手/替换系统文件.txt: -------------------------------------------------------------------------------- 1 | ;; ReplacerScript 2 | 3 | shell32.dll,shell32.dll -------------------------------------------------------------------------------- /文件替换能手/还原系统文件.txt: -------------------------------------------------------------------------------- 1 | ;; ReplacerScript 2 | 3 | shell32.dll,restore -------------------------------------------------------------------------------- /断开ADSL连接.bat: -------------------------------------------------------------------------------- 1 | rundll32 iedkcs32.dll,CloseRASConnections -------------------------------------------------------------------------------- /新建“当前日期文件夹”/reg.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/新建“当前日期文件夹”/reg.reg -------------------------------------------------------------------------------- /新建“当前日期文件夹”/创建当前日期文件夹.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cd/d %~dp1 3 | set y=%date:~0,4% 4 | set m=%date:~5,2% 5 | set d=%date:~8,2% 6 | mkdir "%y%-%m%-%d%" -------------------------------------------------------------------------------- /新建“当前日期文件夹”/自动删除空文件夹并生成文件列表.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | for /l%%a in (1,1,3) do for /r %%i in (.) do rd %%~si 3 | TREE D:\ /F>list txt -------------------------------------------------------------------------------- /新建带模板的批处理.bat: -------------------------------------------------------------------------------- 1 | reg add HKLM\SOFTWARE\Classes\.bat\ShellNew /v FileName /d "C:\bat.bat" /f -------------------------------------------------------------------------------- /显示所有分区的剩余空间(以MB为单位).cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/显示所有分区的剩余空间(以MB为单位).cmd -------------------------------------------------------------------------------- /显示扩展名.bat: -------------------------------------------------------------------------------- 1 | reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000000 /f -------------------------------------------------------------------------------- /显示自己的IP.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | for /f "tokens=15" %%i in ('ipconfig ^| find /i "ip address"') do set ip=%%i 3 | echo %ip% 4 | pause -------------------------------------------------------------------------------- /显示隐藏文件.bat: -------------------------------------------------------------------------------- 1 | reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 1 /f 2 | reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 0 /f 3 | reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 1 /f 4 | 5 | -------------------------------------------------------------------------------- /更换壁纸.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/更换壁纸.bat -------------------------------------------------------------------------------- /替换txt中的文字.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/替换txt中的文字.vbs -------------------------------------------------------------------------------- /查找最新的文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/查找最新的文件.bat -------------------------------------------------------------------------------- /模拟按键—键盘灯.vbs: -------------------------------------------------------------------------------- 1 | Set WshShell = CreateObject ("WScript.Shell") 2 | 'WshShell.SendKeys "{NUMLOCK}" 3 | WshShell.SendKeys "{SCROLLLOCK}" 4 | 'WshShell.SendKeys "{CAPSLOCK}" 5 | 6 | -------------------------------------------------------------------------------- /每隔2秒新建一个txt文件,文件名由1~10.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/每隔2秒新建一个txt文件,文件名由1~10.bat -------------------------------------------------------------------------------- /注册表/AutoRun.REG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/注册表/AutoRun.REG -------------------------------------------------------------------------------- /注册表/reg转bat.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/注册表/reg转bat.bat -------------------------------------------------------------------------------- /注册表/图标尺寸.REG: -------------------------------------------------------------------------------- 1 | REGEDIT4 2 | [HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics] 3 | "IconFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,\ 4 | -------------------------------------------------------------------------------- /注册表/导入文件夹内所有注册表项.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/注册表/导入文件夹内所有注册表项.bat -------------------------------------------------------------------------------- /注册表/导入文件夹内的字体.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/注册表/导入文件夹内的字体.bat -------------------------------------------------------------------------------- /注册表/导出注册表的键值.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams" a.tmp 3 | type a.tmp|findstr -i "Windows [HKEY "Settings"" > "a.reg" 4 | del a.tmp 5 | -------------------------------------------------------------------------------- /注册表/导出注册表的键值2.bat: -------------------------------------------------------------------------------- 1 | REGEDIT /A/E "D:\A.REG" "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" 2 | FINDSTR -I "REGEDIT4 [HKEY \"CaptionFont\"" "D:\A.REG" > "D:\A1.REG" 3 | del /q D:\A.REG 4 | 5 | 6 | -------------------------------------------------------------------------------- /注册表/导出注册表的键值(完美版).bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/注册表/导出注册表的键值(完美版).bat -------------------------------------------------------------------------------- /注册表/批处理读注册表的Run下面的值.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | for /f "tokens=2 delims=:" %%i in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run') do echo %systemDrive%%%i 3 | pause>nul -------------------------------------------------------------------------------- /注册表/注册表权限设置.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/注册表/注册表权限设置.bat -------------------------------------------------------------------------------- /注册表/解锁注册表.BAT: -------------------------------------------------------------------------------- 1 | @reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableRegistryTools /t reg_dword /d 00000000 /f 2 | start regedit 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /注册表/设注册表某个键的键值为变量1.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | >"%temp%\d~.vbs" echo CreateObject("Scripting.FileSystemObject").CreateTextFile(Wscript.ScriptFullName, true).Write CreateObject("WScript.Shell").RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\desktop") 3 | "%temp%\d~.vbs" 4 | set /p Desktop=<"%temp%\d~.vbs" 5 | echo "%Desktop%" 6 | pause 7 | -------------------------------------------------------------------------------- /注册表/设注册表某个键的键值为变量2.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set "ph=Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" 3 | for /f "tokens=*" %%i in ('"wmic /namespace:\\root\default path stdregprov call GetStringValue hDefKey=^&H80000001 sSubKeyName="%ph%" sValueName="desktop""') do set "%%~i" 2>nul 4 | set "ph=%sValue :"=%" 5 | set "ph=%ph:\\=\%" 6 | cls 7 | echo %ph:~1,-1% 8 | pause -------------------------------------------------------------------------------- /注册表/锁注册表.BAT: -------------------------------------------------------------------------------- 1 | @reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableRegistryTools /t reg_dword /d 00000001 /f 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /添加、删除新建菜单.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/添加、删除新建菜单.vbs -------------------------------------------------------------------------------- /添加用户并注销.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/添加用户并注销.bat -------------------------------------------------------------------------------- /添加网址到收藏夹.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/添加网址到收藏夹.bat -------------------------------------------------------------------------------- /瑞星杀毒软件2008批处理版.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/瑞星杀毒软件2008批处理版.bat -------------------------------------------------------------------------------- /生成包含该批处理文件所在目录及所有子目录的所有文件超链接的网页.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/生成包含该批处理文件所在目录及所有子目录的所有文件超链接的网页.bat -------------------------------------------------------------------------------- /生成指定内容的文本文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/生成指定内容的文本文件.bat -------------------------------------------------------------------------------- /百度关键字搜索.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/百度关键字搜索.bat -------------------------------------------------------------------------------- /确认bat后运行.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/确认bat后运行.bat -------------------------------------------------------------------------------- /碎片整理.bat: -------------------------------------------------------------------------------- 1 | defrag c: /f 2 | defrag d: /f 3 | defrag e: /f 4 | defrag f: /f 5 | shutdown /f /s -------------------------------------------------------------------------------- /移动文件.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/移动文件.bat -------------------------------------------------------------------------------- /窗口设置/1.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/窗口设置/1.bat -------------------------------------------------------------------------------- /窗口设置/2.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/窗口设置/2.bat -------------------------------------------------------------------------------- /窗口设置/3.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/窗口设置/3.bat -------------------------------------------------------------------------------- /第三方工具/BAT反编译器/BAT反编译器.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/BAT反编译器/BAT反编译器.exe -------------------------------------------------------------------------------- /第三方工具/BAT反编译器/配置文件.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/BAT反编译器/配置文件.ini -------------------------------------------------------------------------------- /第三方工具/BeeNotice - 显示文字到屏幕上/1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/BeeNotice - 显示文字到屏幕上/1.txt -------------------------------------------------------------------------------- /第三方工具/BeeNotice - 显示文字到屏幕上/2.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/BeeNotice - 显示文字到屏幕上/2.bat -------------------------------------------------------------------------------- /第三方工具/BeeNotice - 显示文字到屏幕上/BeeNotice.bat: -------------------------------------------------------------------------------- 1 | BeeNotice.exe /M:"Hello~" /x:200 /y:200 2 | 3 | BeeNotice.exe /m:"Hello~\nNice to meet you~" /X:200 /y:200 /t:5000 /f:"Tahoma" /fh:20 /fw:20 /fi:1 /fu:1 /ftc:"0 0 255" /a:1 4 | 5 | BeeNotice.exe /m:"Hello~\nNice to meet you~\nHave a nice day~" /x:200 /y:200 /t:5000 /f:"Arial" /fh:36 /fw:0 /fi:0 /fu:0 /fs:0 /ftc:"255 0 0" /fbc:"0 255 0" /wc:"0 255 0" /bc:"0 0 255" /tc:"0 0 0" /o:100 /a:2 6 | -------------------------------------------------------------------------------- /第三方工具/BeeNotice - 显示文字到屏幕上/BeeNotice.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/BeeNotice - 显示文字到屏幕上/BeeNotice.exe -------------------------------------------------------------------------------- /第三方工具/BeeNotice - 显示文字到屏幕上/复件 2.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/BeeNotice - 显示文字到屏幕上/复件 2.bat -------------------------------------------------------------------------------- /第三方工具/CMDOW/HOTFIX.CMD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/CMDOW/HOTFIX.CMD -------------------------------------------------------------------------------- /第三方工具/CMDOW/新建 文本文档副本.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/CMDOW/新建 文本文档副本.txt -------------------------------------------------------------------------------- /第三方工具/CSty/CSty.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/CSty/CSty.exe -------------------------------------------------------------------------------- /第三方工具/CSty/其他信息.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/CSty/其他信息.txt -------------------------------------------------------------------------------- /第三方工具/CSty/普及讲解CSty.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/CSty/普及讲解CSty.bat -------------------------------------------------------------------------------- /第三方工具/CSty/高级范例CSty-KeyPrs.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/CSty/高级范例CSty-KeyPrs.bat -------------------------------------------------------------------------------- /第三方工具/CSty/高级范例Caps-Num.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/CSty/高级范例Caps-Num.bat -------------------------------------------------------------------------------- /第三方工具/CSty/高级范例Loading.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | CSty /chide 3 | CSty /scp 29 17 4 | echo Loading Windows 2000... 5 | CSty /scp 0 20 6 | echo ================================================================================ 7 | for /l %%a in (0,1,79) do ( 8 | CSty /scp %%a 20 9 | echo ^> 10 | ) 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /第三方工具/KeyPrs/KeyPrs.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/KeyPrs/KeyPrs.exe -------------------------------------------------------------------------------- /第三方工具/KeyPrs/其他信息.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/KeyPrs/其他信息.txt -------------------------------------------------------------------------------- /第三方工具/KeyPrs/普及讲解KeyPrs.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/KeyPrs/普及讲解KeyPrs.bat -------------------------------------------------------------------------------- /第三方工具/PngMate.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/PngMate.rar -------------------------------------------------------------------------------- /第三方工具/SetWallPaper.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/SetWallPaper.7z -------------------------------------------------------------------------------- /第三方工具/SetWallPaper/SetWallPaper.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/SetWallPaper/SetWallPaper.exe -------------------------------------------------------------------------------- /第三方工具/SetWallPaper/例.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/SetWallPaper/例.txt -------------------------------------------------------------------------------- /第三方工具/devcon/EULA.txt: -------------------------------------------------------------------------------- 1 | lTHE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS 2 | PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS 3 | ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES 4 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO 5 | EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR 6 | ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, 7 | CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF 8 | MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE 9 | POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION 10 | OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES 11 | SO THE FOREGOING LIMITATION MAY NOT APPLY. 12 | 13 | MICROSOFT DOES NOT WARRANT THAT THE FUNCTIONS FOR THE LICENSED SOFTWARE 14 | OR CODE CONTAINED IN THE KNOWLEDGE BASE WILL MEET YOUR REQUIREMENTS, OR 15 | THAT THE OPERATION OF THE LICENSED SOFTWARE OR CODE WILL BE UNINTERRUPTED 16 | OR ERROR-FREE, OR THAT DEFECTS IN THE LICENSED SOFTWARE OR CODE CAN BE 17 | CORRECTED. FURTHERMORE, MICROSOFT DOES NOT WARRANT OR MAKE ANY 18 | REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE LICENSED 19 | SOFTWARE, CODE OR RELATED DOCUMENTATION IN TERMS OF THEIR CORRECTNESS, 20 | ACCURACY, RELIABILITY, OR OTHERWISE. NO ORAL OR WRITTEN INFORMATION OR ADVICE 21 | GIVEN BY MICROSOFT OR ITS AUTHORIZED REPRESENTATIVES SHALL CREATE A WARRANTY 22 | OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY. SHOULD THE LICENSED 23 | SOFTWARE OR CODE PROVE DEFECTIVE AFTER MICROSOFT HAS DELIVERED THE SAME, 24 | YOU, AND YOU ALONE, SHALL ASSUME THE ENTIRE COST ASSOCIATED WITH ALL 25 | NECESSARY SERVICING, REPAIR OR CORRECTION. 26 | 27 | 28 | -------------------------------------------------------------------------------- /第三方工具/devcon/i386/1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/devcon/i386/1.txt -------------------------------------------------------------------------------- /第三方工具/devcon/i386/devcon.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/devcon/i386/devcon.exe -------------------------------------------------------------------------------- /第三方工具/devcon/i386/删除U盘.bat: -------------------------------------------------------------------------------- 1 | devcon.exe remove USB\Class_08 -------------------------------------------------------------------------------- /第三方工具/devcon/i386/启用U盘.bat: -------------------------------------------------------------------------------- 1 | devcon.exe enable USB\Class_08 2 | pause -------------------------------------------------------------------------------- /第三方工具/devcon/i386/禁用U盘.bat: -------------------------------------------------------------------------------- 1 | devcon.exe disable USB\Class_08 2 | pause -------------------------------------------------------------------------------- /第三方工具/devcon/i386/连接U盘.bat: -------------------------------------------------------------------------------- 1 | devcon.exe restart USB\Class_08 2 | pause -------------------------------------------------------------------------------- /第三方工具/devcon/ia64/devcon.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/devcon/ia64/devcon.exe -------------------------------------------------------------------------------- /第三方工具/finfo/finfo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/finfo/finfo.exe -------------------------------------------------------------------------------- /第三方工具/finfo/其他信息.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/finfo/其他信息.txt -------------------------------------------------------------------------------- /第三方工具/finfo/普及讲解Finfo.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/finfo/普及讲解Finfo.bat -------------------------------------------------------------------------------- /第三方工具/mystart.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/mystart.exe -------------------------------------------------------------------------------- /第三方工具/regjump 1.01 绿色版_可打开注册表指定位置.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/regjump 1.01 绿色版_可打开注册表指定位置.rar -------------------------------------------------------------------------------- /第三方工具/setx.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/setx.rar -------------------------------------------------------------------------------- /第三方工具/wselect-双击选择文件(夹)/Wselect.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/wselect-双击选择文件(夹)/Wselect.exe -------------------------------------------------------------------------------- /第三方工具/wselect-双击选择文件(夹)/Wselect.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/wselect-双击选择文件(夹)/Wselect.txt -------------------------------------------------------------------------------- /第三方工具/wselect-双击选择文件(夹)/原版.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/wselect-双击选择文件(夹)/原版.bat -------------------------------------------------------------------------------- /第三方工具/中英文对照说明.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/中英文对照说明.xls -------------------------------------------------------------------------------- /第三方工具/凌枫☆气泡提示/凌枫☆气泡提示.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/凌枫☆气泡提示/凌枫☆气泡提示.exe -------------------------------------------------------------------------------- /第三方工具/凌枫☆气泡提示/凌枫☆气泡提示.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/凌枫☆气泡提示/凌枫☆气泡提示.txt -------------------------------------------------------------------------------- /第三方工具/删除文件到回收站/2.txt: -------------------------------------------------------------------------------- 1 | Recycle.exe [-f] filename1 [filename2 ...] 2 | -f: Force recycle, no prompt for confirmation 3 | filenames can include wildcards. 4 | 5 | -------------------------------------------------------------------------------- /第三方工具/删除文件到回收站/NewBAT.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/删除文件到回收站/NewBAT.bat -------------------------------------------------------------------------------- /第三方工具/删除文件到回收站/Recycle.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/删除文件到回收站/Recycle.exe -------------------------------------------------------------------------------- /第三方工具/又一个气泡工具/estTrayTip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/又一个气泡工具/estTrayTip.exe -------------------------------------------------------------------------------- /第三方工具/又一个气泡工具/estTrayTip.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/又一个气泡工具/estTrayTip.txt -------------------------------------------------------------------------------- /第三方工具/图片处理/nconvert.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/图片处理/nconvert.exe -------------------------------------------------------------------------------- /第三方工具/图片处理/批量将jpg变为bmp.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | color 0f 3 | nconvert -out bmp *.jpg 4 | -------------------------------------------------------------------------------- /第三方工具/批处理气泡程序BalloonTip/范例.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/批处理气泡程序BalloonTip/范例.bat -------------------------------------------------------------------------------- /第三方工具/批处理气泡程序BalloonTip/说明.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/批处理气泡程序BalloonTip/说明.txt -------------------------------------------------------------------------------- /第三方工具/第三方工具CIdo/CIdo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/第三方工具CIdo/CIdo.exe -------------------------------------------------------------------------------- /第三方工具/第三方工具CIdo/普及讲解CIdo.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/第三方工具/第三方工具CIdo/普及讲解CIdo.bat -------------------------------------------------------------------------------- /系统优化.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/系统优化.bat -------------------------------------------------------------------------------- /结束进程.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/结束进程.bat -------------------------------------------------------------------------------- /美化文件夹背景.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/美化文件夹背景.bat -------------------------------------------------------------------------------- /获取U盘盘符和可用容量.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/获取U盘盘符和可用容量.bat -------------------------------------------------------------------------------- /获取完整路径.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/获取完整路径.bat -------------------------------------------------------------------------------- /获取当前用户名和密码.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/获取当前用户名和密码.bat -------------------------------------------------------------------------------- /获取某路径下的所有文件名.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/获取某路径下的所有文件名.cmd -------------------------------------------------------------------------------- /解密.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/解密.bat -------------------------------------------------------------------------------- /让XP开口说话.vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/让XP开口说话.vbs -------------------------------------------------------------------------------- /让屏幕显示硬件错误的信息(恶搞类).bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/让屏幕显示硬件错误的信息(恶搞类).bat -------------------------------------------------------------------------------- /运行a.txt中的程序.bat: -------------------------------------------------------------------------------- 1 | for /f "delims==" %%a in (a.txt) do start %%a 2 | -------------------------------------------------------------------------------- /运行剪贴板中的文件.vbs: -------------------------------------------------------------------------------- 1 | Set objIE = CreateObject("InternetExplorer.Application") 2 | objIE.Navigate("about:blank") 3 | strURL = objIE.document.parentwindow.clipboardData.GetData("text") 4 | objIE.Quit 5 | 6 | Set objShell = CreateObject("Wscript.Shell") 7 | objShell.Run(strURL) 8 | 9 | -------------------------------------------------------------------------------- /重启进程.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/重启进程.bat -------------------------------------------------------------------------------- /限制条件批量建立文件夹.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/限制条件批量建立文件夹.cmd -------------------------------------------------------------------------------- /随机替换欢迎界面和桌面.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/随机替换欢迎界面和桌面.bat -------------------------------------------------------------------------------- /隐藏批处理运行窗口(两段).vbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/auspbro/batch-snippets/43b0acd1bfbb454d3ecbcf71cef58fcc02539991/隐藏批处理运行窗口(两段).vbs --------------------------------------------------------------------------------