This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
networking:windows:logon_script [2012/05/08 11:56] gcooper |
networking:windows:logon_script [2013/12/15 12:15] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Login Scripts ====== | ====== Login Scripts ====== | ||
+ | |||
+ | See also **[[networking: | ||
http:// | http:// | ||
Line 28: | Line 30: | ||
- Create or edit an existing Group Policy Object (GPO) | - Create or edit an existing Group Policy Object (GPO) | ||
- Right-click the GPO -> Edit | - Right-click the GPO -> Edit | ||
+ | |||
+ | **User Configuration -> Policies -> Windows Settings -> Scripts -> Logon -> Properties -> Add** | ||
**User Configuration -> Policies -> Windows Settings -> Scripts -> Logon -> Properties -> Show Files** | **User Configuration -> Policies -> Windows Settings -> Scripts -> Logon -> Properties -> Show Files** | ||
- | ===== Groups and IDs ===== | + | ===== Run Commands Based on Workstation OS ===== |
- | http:// | + | :!: This needs testing and updating. |
- | http:// | + | To execute commands based on the host OS, you can create an include |
- | + | ||
- | http:// | + | |
- | + | ||
- | ===== Modular Logon Script ===== | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | Script: http:// | + | |
- | + | ||
- | Howto: http:// | + | |
- | + | ||
- | ==== Howto ==== | + | |
- | + | ||
- | - Download and copy the logon.vbs file to the the appropriate folder | + | |
- | - Windows NT method | + | |
- | - Group Policy method | + | |
- | - Create two additional folders in the same directory called **' | + | |
- | - Create a configuration file in the **' | + | |
- | - Using either the Windows NT method or the Group Policy method, call the login script specifying the config file as an argument: '' | + | |
- | - Use the detailed log files generated to troubleshoot and verify script execution. | + | |
- | + | ||
- | === Sample global.conf === | + | |
< | < | ||
- | < | + | If instr(lcase(sOSCaption)," |
- | meta=1 | + | Call RunProcess(" |
- | drives=3 | + | ElseIf instr(lcase(sOSCaption)," |
- | printers=2 | + | Call RunProcess(" |
- | processes=4 | + | End If |
- | include=5 | + | </file> |
- | </order> | + | |
- | < | + | ===== Groups and IDs ===== |
- | description=For all users | + | |
- | created=02/12/12 | + | |
- | author=Gene Cooper | + | |
- | </ | + | |
- | < | + | http:// |
- | m:\\WIN2008R2-PDC\company | + | |
- | p: | + | |
- | t: | + | |
- | rem z: | + | |
- | </drives> | + | |
- | < | + | http:// |
- | \\WIN2008R2-PDC\pdfcreator; | + | |
- | rem \\server\hpprinter|group:Print Users | + | |
- | rem \\server\colorprinter|-group:domain users|group: | + | |
- | rem \\server\faxprinter|ip: | + | |
- | </ | + | |
- | < | + | http://ss64.com/nt/syntax-security_groups.html |
- | rem c:\windows\write.exe | + | |
- | </processes> | + | |
- | + | ||
- | < | + | |
- | rem File1.inc | + | |
- | rem File2.inc|computerOU: | + | |
- | rem File3.inc|group: | + | |
- | </include> | + | |
- | </file> | + | |
- | + | ||
- | ==== Troubleshooting ==== | + | |
- | + | ||
- | **Start | + | |
- | + | ||
- | * Look for logon_< | + | |
- | * If you don’t see the logfile here, then you know that the script did NOT run. | + | |
===== Sample Logon Scripts ===== | ===== Sample Logon Scripts ===== | ||
Line 296: | Line 247: | ||
</ | </ | ||
- | === Batch File Method | + | === Batch File Method |
< | < |