[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[系统相关] bat加入winput后用管理员运行与不用管理员运行差异

用管理员运行左边   不用管理员运行右边,求大佬帮助下   
图片发不了

X
set /p QXADD=<\\192.168.20.201\anker\WJ\QXADD.txt



set /p a=<\\192.168.20.201\anker\WJ\p.txt
copy %QXADD%\winput.exe D:\ProgramData\winput.exe
set number=1
cls
:be1
echo 请输入密码,3次机会.当前第 %number%次
Winput "set ''pass=$input''" "请输入密码"  /oem /pass>temp.bat
if not errorlevel 1 call temp.bat
del temp.bat 2>nul
if "%pass%"=="%a%" goto QX1

if %number% equ 3 (
shutdown -s -t 0
) else (
set /a number+=1
goto be1
)
cls

这是管理员运行的

D:\ProgramData>echo 请输入密码,3次机会.当前第 1次
请输入密码,3次机会.当前第 1次

D:\ProgramData>Winput "set ''pass=$input''" "请输入密码"  /oem /pass 1>temp.bat
'Winput' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

D:\ProgramData>if not errorlevel 1 call temp.bat

D:\ProgramData>del temp.bat  2>nul

D:\ProgramData>if "" == "" goto TX1

D:\ProgramData>copy \curl.exe D:\ProgramData\curl.exe
系统找不到指定的文件。

TOP

普通打开运行正常

TOP

回复 2# WJSKY


    把 winput.exe 复制到系统盘的 System32 文件夹下再试试
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 4# Batcher


    X
  1. set /p QXADD=<\\192.168.20.201\anker\WJ\QXADD.txt
  2. set /p Q=<\\192.168.20.201\anker\WJ\p.txt
  3. echo 2222
  4. set number=1
  5. :be1
  6. if %number% equ 3(
  7. echo  99999
  8. ) else (
  9. set /a number+=1
  10. )
  11. @echo off&setlocal enabledelayedexpansion
  12. set "str=0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
  13. for %%a in (%str%) do set /a n+=1&set ".!n!=%%a"
  14. cls&set /p=请输入八位由数字和字母组成的密码,请注意大小写:<nul
  15. if defined pwds set /p=%pwds%<nul
  16. if "%m%" equ "8" echo.&echo.&goto next
  17. choice /n /cs /c %str: =%
  18. set "pwds=%pwds%*"&set "pwd=%pwd%!.%errorlevel%!"
  19. set /a m+=1&goto be1
  20. @echo on
  21. :next
  22. if "%pwd%" == "%Q%" goto QX1
  23. echo 7777
  24. goto be1
  25. pause
复制代码
请教下,为什么set number=1  这里提示语法错误

TOP

回复 5# WJSKY


    第13行:3和(中间加个空格
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 6# Batcher


    好了,谢谢!!

TOP

返回列表