一键修复共享服务器权限问题

这是一个批处理脚本,用于一键修复局域网共享权限和设置。用户可以选择查看网络信息、简单共享(无需密码)、设置密码共享、共享和权限设置等选项,方便快捷地管理共享服务器。
摘要由CSDN通过智能技术生成

@echo off
color 2f
mode con cols=50 lines=30
title OKShare 【制作:常州辉煌网络】
ver | findstr “5.”>nul || set bulid=nt6 && goto sc_yhbl
set bulid=nt5
:sc_yhbl
reg query “HKCU\Environment” /v temp >nul 2>nul||set “usertemp=%USERPROFILE%” && goto sc_top
set usertemp=%temp%
:sc_top
cls
del /q %temp%\info.txt>nul 2>nul
:sc_menu
echo.&echo.&echo.
echo 局域网共享一键修复 17.9.11
echo.
echo --------------------------------------------
echo.&echo.&echo.
echo 1、查看网络信息
echo.
echo 2、简单共享(无密码)
echo.
echo 3、密码共享
echo.
echo 4、共享和权限设置
echo.
echo 5、设置权限指南(图文)
echo.
echo 6、打印机共享指南(图文)
echo.
echo 7、软件更新与反馈
echo.&echo.&echo.&echo.&echo.
set select=
set str1=1234567
set /p select= 输入数字,按回车:
if not defined select goto sc_wrong
echo %select%|findstr “[%str1%]”>nul||goto sc_wrong
if %select%==1 (goto sc_info)
if %select%==2 (goto sc_zd)
if %select%3 (goto sc_sd)
if %select%4 (goto sc_gl)
if %select%5 (goto sc_help)
if %select%6 (goto sc_print)
if %select%7 (goto sc_update)
:sc_wrong
mshta vbscript:msgbox(“只能输入1-7的数字”,64,“提示”)(window.close)
goto sc_top
:sc_info
cls
echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
echo 正在处理信息…
if “%bulid%”
“nt6” goto sc_nt6
:sc_nt5
(echo.
echo.)>>%usertemp%info.txt
ping www.baidu.com -n 1 >nul || echo 互联网状态: [ 离线 ]>>%usertemp%info.txt && goto sc_ver_nt5
echo 互联网状态: [ 在线 ]>>%usertemp%info.txt
:sc_ver_nt5
(echo ----------------------------------------------------------
echo.)>>%usertemp%info.txt
for /f "skip=1 tokens=2-4 delims=, " %%a in (‘wmic os get caption’) do (
if exist %windir%\SysWOW64 echo 系统版本: %%a %%b %%c 64位>>%usertemp%info.txt & goto sc_ver_nt5_next
echo 系统版本: %%a %%b %%c 32位>>%usertemp%info.txt
)
:sc_ver_nt5_next
(echo.
echo 计算机名: %COMPUTERNAME%
echo.)>>%usertemp%info.txt
for /f "tokens=2 delims= " %%a in (‘net config workstation^|findstr /c:“工作站域”’) do echo 工作组: %%a>>%usertemp%info.txt & goto sc_info_nt5
:sc_info_nt5
(echo.
echo 当前用户: %USERNAME%
echo.)>>%usertemp%info.txt
for /f “delims=” %%a in (‘date /t’) do echo 本机日期: %%a>>%usertemp%info.txt
echo.>>%usertemp%info.txt
for /f “delims=” %%a in (‘time /t’) do echo 本机时间: %%a>>%usertemp%info.txt
echo ---------------------------------------------------------->>%usertemp%info.txt
goto sc_info_more
:sc_nt6
(echo.
echo

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值