有用的登录脚本命令

Jin*_*ich 4 logon-scripts active-directory

请张贴您在登录脚本中使用的有用命令。

以下是我使用的一些:

映射网络驱动器:
net use v:\fileserver\apps
映射网络打印机:
RunDll32.EXE printui.dll,PrintUIEntry /in /n "\\printserver\Xerox DC1100 PCL"
删除网络打印机:
RunDll32.EXE printui.dll ,PrintUIEntry /dn /q /n "\\printserver\HP LaserJet 2300"
disable windows firewall:
netsh firewall set opmode disable
install a new program:
if not exist "C:\Program Files\Antivirus\" "V:\Antivirus\ install.msi”
在用户桌面上创建快捷方式:
复制“V:\shortcuts\dictionary.lnk”“%USERPROFILE%\Desktop”

Rya*_*ger 5

我可能会为此投反对票,但就这样吧。我一直认为登录脚本是一种hack'ish,并尝试仅将它们用作最后​​的手段。现在有很多方法可以通过组策略、组策略首选项和 SCCM/SMS 来管理系统和用户。我的意思是,总会有没有更好的做事方式的情况。但是到目前为止提供的许多示例无需登录脚本(如安装软件和映射网络驱动器)即可轻松完成。