Jump to content

Log on script for Network Drives and Printers.


Recommended Posts

Posted

Hi All,

 

Just wondering if anybody has a log-on script for network drives and printers?

 

Every year our teachers move year groups and classrooms, plus this year I have moved SIMS and a few other things.

 

I am thinking that when all the teachers come back in September I am going to have to access each individual laptop and remap drives and delete and add year group printers etc.

 

I know that a log-on script can be made to delete all network drives and printers and then re-add all the necessary ones back and going forward I can combine this with AD to set up year group OU's and put the teacher in the correct one to have it map the correct drives and add the right printers.

 

But I have only ever edited the ones we have currently (not teachers just admin) and they are run from the profile as a .bat log-on script not from GPO.

 

Kol.

Posted

The teachers are all on Windows 7 laptops now, but there are one or two XP ones floating about. Server OS's are a 2003 DC which has traditionally held all the roles and a sister DC which is a standard plain vanilla 2008 server.

 

Kol.

Posted

I just show them how to add the printers and shared folders they need for themselves. Once.

 

Now new staff learn how to do it, either from a colleague or they already know how to do it before they start here. Unless they ask one of my team, in which case we are happy to show them.

Posted
What OS are we talking about here? I would use Group Policy Preferences for this.

 

Printer deletion and deployment is a bit flaky...

 

Kol.

Posted
Never had any issues at all here.

 

my experience is it works great 1st time or its really random and fails for no obvious reason

Posted
Never had any issues at all here.

 

You must have some voodoo then, seeing all the posts on here relating to issues with GPP and printers.

 

Ben

Posted
In relation to this, I'm currently trying to bring together our logon scripts (of which we have a few) which map drives based on user groups and I am looking at using GPP instead. I have tested it on a couple of machines here and it seems to work well. Certainly better than my experience with printers. Is GPP reliable & work well for mapping drives or can it be a little flakey?
Posted
seeing all the posts on here relating to issues with GPP and printers.

Like Synaesthesia and FN-GM, we don't have any issues either. I used the following guide when setting up printers on our network and they get installed without fail.

 

dxpetti.com/blog/?p=181

 

I wonder if a lot of the problems are caused by users not being given the rights to install or load printer drivers (as per the guide above)? :confused:

Posted
Hi All,

 

Just wondering if anybody has a log-on script for network drives and printers?

 

Every year our teachers move year groups and classrooms, plus this year I have moved SIMS and a few other things.

 

I am thinking that when all the teachers come back in September I am going to have to access each individual laptop and remap drives and delete and add year group printers etc.

 

I know that a log-on script can be made to delete all network drives and printers and then re-add all the necessary ones back and going forward I can combine this with AD to set up year group OU's and put the teacher in the correct one to have it map the correct drives and add the right printers.

 

But I have only ever edited the ones we have currently (not teachers just admin) and they are run from the profile as a .bat log-on script not from GPO.

 

Kol.

 

Doesn't help you right now, but plan an upgrade to Win2008R2 (or fresh install and migration being better approach) and then you can do it all with GPOs and no scripts required. Some will tell you to go for 2012 R2 instead, but I can't really recommend something that I haven't tested extensively especially when 2008R2 is rock solid.

Posted (edited)
Like Synaesthesia and FN-GM, we don't have any issues either. I used the following guide when setting up printers on our network and they get installed without fail.

 

dxpetti.com/blog/?p=181

 

I wonder if a lot of the problems are caused by users not being given the rights to install or load printer drivers (as per the guide above)? :confused:

 

Aaaaaaagh! So I am confused (no... it doesn't take much)! Are people using Print Management with Deploy via Group Policy or are they using Group Policy Preferences?

 

I don't really know much about Group Policy (and even less about Preferences), but I thought that User Configuration applies to an OU containing Users and therefore Computer Configuration will not apply and Computer Configuration applies to a Computer in an OU and will not work if it is applied to an OU with just users in it?

 

In this link, the author states that you need to also change 3 settings in the Computer Configuration, but I am basing this on trying to map Printers per User OU for their year group to apply to their laptop, not on Computer OU based on location...

 

Can anyone set me straight, I have my week off next week and I'd really like to nail this as I have loads of other stuff planned for when I get back!

 

Help! :(

 

Edit: Just to say adding this BUILTIN\Users returns an error for me and GP can't find it when I use Check Names, is this right?

 

And another edit to say I can't find the 'Point and Print' section in my GP!

 

Kol.

Edited by Koldov
  • 2 weeks later...
  • 1 month later...
Posted

Use something similar to this, just with your server name and files

 

net use T: [url="file://\\SERVER1\FOLDERA"]\\SERVER1\FOLDERA[/url] /PERSISTENT:YES
net use F: [url="file://\\SERVER2\FOLDERB"]\\SERVER2\FOLDERB[/url] /PERSISTENT:YES
net use O: [url="file://\\SERVER3\FOLDERC"]\\SERVER3\FOLDERC[/url] /PERSISTENT:YES

 

And then for the Printers

 

START [url="file://\\SERVER1\PRINTER1"]\\SERVER1\PRINTER1[/url]
START [url="file://\\SERVER1\PRINTER2"]\\SERVER1\PRINTER2[/url]

 

We usually drop this in the startup file, that way no matter what it will map these whenever the computer is turned on.

 

Hope it helps

 

Andrew

  • Thanks 1
  • 4 months later...
Posted

sorry to wake an old post but i just wanted to add the little line here.

 

you wanted to delete the old's year shares and make new ones.

no problem.. logon script

 

net use * /del /yes

 

 

net use X: \\server\Doc1

net use S: \\server\Doc2

 

 

net print \\server\printer1

net print \\server\printer2

  • 2 weeks later...
Posted (edited)

Hey Koldov, let me try and get you some answers (better late than never).

 

Aaaaaaagh! So I am confused (no... it doesn't take much)! Are people using Print Management with Deploy via Group Policy or are they using Group Policy Preferences?

 

I would strongly recommend using GP Preferences when possible over GP Polices. Why? Preferences has bigger hooks into the operating system than Policies does. It can do more and do it better, more consistently and faster than policies. It is essentially the modern take on GP Policies (they date back to the NT days).

 

I don't really know much about Group Policy (and even less about Preferences), but I thought that User Configuration applies to an OU containing Users and therefore Computer Configuration will not apply and Computer Configuration applies to a Computer in an OU and will not work if it is applied to an OU with just users in it?

 

In this link, the author states that you need to also change 3 settings in the Computer Configuration, but I am basing this on trying to map Printers per User OU for their year group to apply to their laptop, not on Computer OU based on location...

 

User configuration and Computer configuration are simply different categories of Group Policy. Both will be applied no matter what inhabits the container Active Directory where you are apply your policy. The difference being User configuration is applied to those specific users regardless of the computer they log in to and Computer configuration is applied to those specific computers regardless of what user logs in. The other difference is computer configuration is applied before the netlogon (CTRL+ALT+DEL) fires up where as User configuration is applied upon the login of a user.

 

Hope that clears up a few things.

 

Thanks for linking to my blog btw. Glad to see it has helped some people out! :)

 

EDIT:

For network drives and printers etc. we tend to use http://www.kixtart.org/ for the logon script. Takes abit of configuring but works well for us.

 

Ah KiX scripts. The very first thing I killed when I was given the reigns and discovered Group Policy...

Edited by DXPetti
Posted

Everyone's issues have pretty much been fixed, but just in case anyone reading this thread in the future finds it relevant for quick fixes, I'll post this quick one I did for several drives and printers.

 

Using CC4 that I don't have admin rights to is a pain, but I've managed mostly a workaround without having to pay for the unmanaged connection software.

 

 

 @echo off
net use * /delete /y

echo Please type your network user name

set /p username=


Net use T: "[\\Example share]" /user:domain\%username% %password% /persistent:no


Net print "[\\Example printer]"

 

Best solution I've found with how limited I am, all I have to do then is get staff to realise that just because they can't see the asterisks, their password IS being typed. It deletes previously mapped drives every time it's launched, so I've put it on a couple of desktops so that they can switch easily.

 

Can also map the user's documents for a specific person's use. Especially useful on a few Windows Starter netbooks that can't use group policies.

Posted

Use editv32 to hide the password ...

 

set /p user=PLEASE ENTER YOUR NETWORK USERNAME AND PRESS [ENTER]...

echo.

C:\admin\MyDrives\editv32 -m -p "PLEASE ENTER YOUR NETWORK PASSWORD AND PRESS [ENTER]..." pass

Net use T: "[\\Example share]" /user:domain\%username% %password% /persistent:no

:)

Posted
just because they can't see the asterisks, their password IS being typed.

Perhaps they should set their passwords to asterisks to avoid confusion? :)

 

Pgj0fI7eu09_.png

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...