Windows系统共享、打印机添加删除、开启防火墙、开启局域网共享、去除快捷方式小箭头等常用批处理

共享文件夹自动打开

cmdkey /add:192.168.200.88 /user:administrator /pass:123456
explorer \\192.168.200.88\share

添加删除打印机

cmdkey /add:172.16.10.40 /user:administrator /pass:123456  //远程连接计算机。必须设置密码
cmdkey /add:192.168.101.254  /user:administrator /pass:123456
rundll32 printui.dll,PrintUIEntry /in /u /z /q /n "\\172.16.10.40\HP LaserJet Pro MFP M125-M126 PCLmS"
rundll32 printui.dll,PrintUIEntry /in /u /z /q /n "\\192.168.101.254\HP LaserJet Pro MFP M125-M126 PCLmS"  //添加打印机
rundll32 printui.dll,PrintUIEntry /y /n "HP LaserJet Pro MFP M125-M126 PCLmS" /q  //设置打印机为默认


rundll32 printui.dll,PrintUIEntry /dn /u /z /q /n "\\172.16.10.40\HP LaserJet Pro MFP M125-M126 PCLmS"   //删除打印机

win7 IP169修复

netsh winsock reset catlalog

netsh int ip reset reset.log

ipconfig/release

ipconfig/renew

pause

禁止电脑休眠

powercfg -h off

 

开启局域网共享

@ECHO OFF
sc config   MpsSvc start= AUTO  
net start   MpsSvc

net user Guest /active:yes

reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa" /v "LimitBlankPasswordUse" /t REG_DWORD /d "00000000" /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" /v "LimitBlankPasswordUse" /t REG_DWORD /d "00000000" /f

 

去除快捷方式小箭头

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "%systemroot%\system32\imageres.dll,197" /t reg_sz /f

  taskkill /f /im explorer.exe

  attrib -s -r -h "%userprofile%\AppData\Local\iconcache.db"

    del "%userprofile%\AppData\Local\iconcache.db" /f /q

  start explorer

一键清理垃圾(已设置本人2345网址)

echo 正在清理系统垃圾文件,请稍候......
del /f /s /q %systemdrive%\*.tmp
RD %windir%\$hf_mig$ /Q /S
del %windir%\2950800.txt /f /q
for /f %%i in (%windir%\2950800.txt) do rd %windir%\%%i /s /q
dir %windir%\$NtUninstall* /a:d /b >%windir%\2950800.txt
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.pnf
del /f /s /q %systemdrive%\infcache.1
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
rd /s /q "c:\vod_cache_data" 2>NUL
rd /s /q "d:\vod_cache_data" 2>NUL
rd /s /q &#
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值