+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
Windows Thread, Computer Startup Scripts in Technical; Another thing to consider here is a sleep timer, we had problems where the machine was so quick at installing ...
  1. #16

    Join Date
    Jun 2005
    Location
    Bristol
    Posts
    52
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Computer Startup Scripts

    Another thing to consider here is a sleep timer, we had problems where the machine was so quick at installing the printer it exited the script before the setdefault action was completed.

    Our script:

    rem ** Next line must not be deleted **
    SleepTime=15
    Set WshNetwork = CreateObject("WScript.Network")

    rem ** This will delete existing printers **
    On Error Resume Next
    Set oPrinters = WshNetwork.EnumPrinterConnections
    For i = 1 to oPrinters.Count - 1 Step 2
    WshNetwork.RemovePrinterConnection oPrinters.Item(i)
    Next

    WshNetwork.AddWindowsPrinterConnection "\\<servername>\StaffRoom-Laser"

    rem ** Set Default Printer **
    WScript.Sleep SleepTime*1000
    WshNetwork.SetDefaultPrinter "\\<servername>\StaffRoom-Laser"

  2. IDG Tech News

  3. #17
    secman's Avatar
    Join Date
    Nov 2005
    Location
    Romford, Essex
    Posts
    107
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    14

    Re: Computer Startup Scripts

    Just come across this thread.
    Unfortunately we do not have much in the way of VB Scripting skills here. Not for the want of trying. However we have found a way of setting default printers on each machine in a room. We have 6 computer suites all with their own printers, therefore we need to assign printers to 30ish PCs at a time. I have put together batch files run from a server that connect to the admin share on the PC and add a printer using the following (sample)
    >RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /c\\%1 /n\\PRINT01\HPLJrm35
    >IF NOT ERRORLEVEL 1 ECHO Printer HPLJrm35 installed on %1 >>printlog.txt
    start /wait sc \\%1 stop spooler
    start /wait sc \\%1 start spooler

    %1 is the PC name e.g PC_3501, HPLJRm35 is the printer name.

    This is run on all or one of the PCs in a room. We do also have rooms with two printers and simply add the second printer as another line.

    When the user logs on "Printer.BAT" is run from the PC C:drive. to set the default printer (especially when there is more than 1 printer in a room)

    This is as follows:
    @echo off
    @break off
    Rem ...and make it the default
    rundll32 printui.dll,PrintUIEntry /y /q /n\\PRINT01\HPLJRm35
    start /wait sc \\%1 stop spooler
    start /wait sc \\%1 start spooler

    Hope this might be useful

  4. #18
    mark's Avatar
    Join Date
    Jun 2005
    Location
    x-communicated
    Posts
    4,090
    Blog Entries
    2
    Thank Post
    190
    Thanked 44 Times in 40 Posts
    Rep Power
    42

    Re: Computer Startup Scripts

    Thanks secman. What O/S's have you tried that on/do you have that working on?

  5. #19
    secman's Avatar
    Join Date
    Nov 2005
    Location
    Romford, Essex
    Posts
    107
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    14

    Re: Computer Startup Scripts

    Quote Originally Posted by mark
    Thanks secman. What O/S's have you tried that on/do you have that working on?
    It works on XP, with or without SP2 using W2K print server.

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. [MS Office - 2003] Outlook 2003 Startup wizard
    By Jake in forum Office Software
    Replies: 5
    Last Post: 1st May 2008, 09:52 AM
  2. RM CC3 Startup Script
    By randle in forum Windows
    Replies: 4
    Last Post: 30th July 2007, 02:56 PM
  3. Dreamweaver 8 startup Error
    By BKGarry in forum Educational Software
    Replies: 9
    Last Post: 26th June 2007, 01:33 PM
  4. 10min startup c/o whiteboard
    By Midget in forum Hardware
    Replies: 8
    Last Post: 30th November 2006, 07:29 PM
  5. IE6 trys to run an ISP setup on startup
    By pmassingham in forum Windows
    Replies: 1
    Last Post: 23rd March 2006, 11:20 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •