Search

Monday 28 September 2009

Windows Login script code

Connect a printer from a login script

rundll32 printui.dll,PrintUIEntry /in /n \\printserver\hp5500

Create section labels in your script

With these you can make your script easier to read and control actions

Labels have the following syntax:

:label1

When you want to move to that section in a script, use the goto command, with the label, i.e.:

goto label1



Applying Registry Changes

If you have a number of registry changes that you want to make on all machines - perhaps to implement a certain setting, then the login script can do this for you.

Simply export the relevant settings in to a .reg as normal. Then place this .reg file in the usual login script location (more information here) and enter the following command in to your login script:

%systemroot%\regedit /s .reg

This will import the registry file silently each time the user logs in



No comments:

Post a Comment