Batch File Logon Scripts and Vista - TechRepublic
Question
July 24, 2009 at 02:13 AM
lee.russell

Batch File Logon Scripts and Vista

by lee.russell . Updated 16 years, 11 months ago

Hi, a while back when we only ran XP machines I wrote a log on batch file to map network drives and printers. This was very useful as we have a couple of Citrix servers as well to access a number of applications such as our ERP system.

I have recently put a couple of Vista machines onto the network and the logon script just doesnt work anymore. The logon batch file will however work when logging into Citrix.

It will add the mapped drives but it wont add the printers saying “Windows cannot connect to this printer. The local print spooler service is not running. Please restart the sppoler or restart the machine.” The spooler is however running and no amount of restarts etc seem to resolve the issue.

Below is an example of the batch file.

@echo off
net use j: /d /y
net use j: \\hsdc1\jdrive /y
rundll32 printui.dll,PrintUIEntry /in /n \\HSDC1\SupplyChain

The batch file runs from the logons script stored against a user in active directory.

I inherited the logon script to add the network drives from my predecessor, and got the add printer bit from the internet. Ideally the batch file will work for both XP machines and Vista machines. My understanding isn?t what it should be in this area, so any help will be greatly appreciated.

Cheers

This discussion is locked

All Comments