+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
Windows Thread, Setting a permanent default printer. in Technical; Has any tried this script from stewartknight, it's just the thing i am looking for. I am not back in ...
  1. #16
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Re: Setting a permanent default printer.

    Has any tried this script from stewartknight, it's just the thing i am looking for. I am not back in school till midweek just wondered if anyone had tried this?


    to make the printer a default printer add the "default" work!! i.e.

    Code:
    Dim oNetwork, sPrintPath
    Set oNetwork = CreateObject("WScript.Network")

    sPrintPath ="\\10.102.28.7\Science"
    oNetwork.AddWindowsPrinterConnection sPrintPath
    oNetwork.SetDefaultPrinter sPrintPath


    WScript.Quit

    _________________
    Stewart Knight
    Network Manager
    Appleby Grammar School

  2. #17
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Re: Setting a permanent default printer.

    Sorry for the double posting but have got a second question regarding a default printer script?

    On our RIS images we have a PDF printer installed and have found out also that WSUS during office 2003 updates re-installs the MS Image Writer printer.

    Will a default printer script over rule one of these when run?

  3. #18

    Join Date
    Jun 2005
    Location
    Elgin, Scotland
    Posts
    387
    Thank Post
    1
    Thanked 4 Times in 4 Posts
    Rep Power
    23

    Re: Setting a permanent default printer.

    If your script is set to run at user logon, then it will take precedence over any previous defaults. I think this goes for computer logon scripts as well, but not 100% sure on that.

  4. #19

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,596
    Thank Post
    109
    Thanked 764 Times in 595 Posts
    Rep Power
    181

    Re: Setting a permanent default printer.

    @tosca925: have you tried running the script to see if it changes the default back to your PDF writer?

    The script is designed to run at user logon (every logon) so I would imagine that there should be no issues.

  5. #20

    Join Date
    Aug 2005
    Location
    Birmingham, UK
    Posts
    490
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Setting a permanent default printer.

    Does anyone here use con2prt anymore? it has the option to set the default option when installing network printers, and i jus launch it using a batch file assigned in group policy at user logon

  6. #21
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Re: Setting a permanent default printer.

    Using the vbs script below, is there anyone you can edit this so in a previous post about setting a time out can be added to this script?

    Sorry but i am c**p when it comes to scripting.


    Dim oNetwork, sPrintPath
    Set oNetwork = CreateObject("WScript.Network")

    sPrintPath ="\\10.102.28.7\Science"
    oNetwork.AddWindowsPrinterConnection sPrintPath
    oNetwork.SetDefaultPrinter sPrintPath


    WScript.Quit

  7. #22
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,011
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108

    Re: Setting a permanent default printer.

    What do you want to time out? You mean you dont want it to display an error if the printer isnt found?

  8. #23

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,596
    Thank Post
    109
    Thanked 764 Times in 595 Posts
    Rep Power
    181

    Re: Setting a permanent default printer.

    I'm sure that it times itself out (although an error may be printed).

    Try just running it as a batch script (use the //B switch).

  9. #24
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,011
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108

    Re: Setting a permanent default printer.

    or add the line

    Code:
    On Error Resume Next
    At the top. A lazy way but if it's just a simple script then....

  10. #25
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Re: Setting a permanent default printer.

    SleepTime=15

    WScript.Sleep SleepTime*1000
    Can these 2 lines be added to the script i posted above?

  11. #26

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,596
    Thank Post
    109
    Thanked 764 Times in 595 Posts
    Rep Power
    181

    Re: Setting a permanent default printer.

    Just do what chris says - it will then continue with your script if the action fails.

    It may be clearer if you tell us what you are attempting to do or what isn't working.

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

Similar Threads

  1. Default Profiles - setting user directories
    By speckytecky in forum Windows
    Replies: 0
    Last Post: 22nd June 2007, 07:52 PM
  2. setting a default printer for all users
    By wellwillthisnamedothen in forum How do you do....it?
    Replies: 10
    Last Post: 8th June 2007, 03:34 PM
  3. Cunning 'default printer' script
    By ajbritton in forum Scripts
    Replies: 2
    Last Post: 12th November 2006, 09:22 PM
  4. Change network printer default setting
    By speckytecky in forum Wireless Networks
    Replies: 1
    Last Post: 31st May 2006, 06:44 PM
  5. Replies: 17
    Last Post: 16th September 2005, 08:07 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
  •