您的位置:首页 > 其它

BAT脚本添加自动代理脚本并更改用户文档位置

2013-09-12 16:21 423 查看
@echo off
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://192.168.10.1:8086/proxy.pac" /f
if %username% == newuser (
exit
) else (
net use z: \\192.168.10.22\iedownload\%username%
ping 127.0.0.1 -n 2 -w 1000 > nul
if not exist Z:\ (
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop /t REG_EXPAND_SZ /d "%USERPROFILE%\桌面" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal /t REG_EXPAND_SZ /d "%USERPROFILE%\My Documents" /f
) else (
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop /t REG_EXPAND_SZ /d "Z:\桌面" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal /t REG_EXPAND_SZ /d "Z:\我的文档" /f
)
)
exit


Snapshot 自动备份
snapshot D: \\192.168.100.24\share\D\131015_Full_Bak.sna --exclude:"\Share\multimedia source" -L2048
snapshot D: \\192.168.100.24\share\D\$DISK-$DATE.sna -h\\192.168.100.24\share\D\131015_Full_Bak.hsh
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐