connect to the shared printer when start-up

Archived from groups: microsoft.public.win2000.general (More info?)

I want to connect to the share printer when I start up.
I put a batch file into the start up folder so it runs every time the system
boots.
For example, the server IP is 10.10.10.10 and the name of shared printer is
"shared_printer", then how can make the batch file?

Thanks.
4 answers Last reply
More about connect shared printer start
  1. Archived from groups: microsoft.public.win2000.general (More info?)

    Kang-

    Open up notepad and type this in:

    start wscript.exe c:\prinstall.vbs
    exit

    Save the file as "C:\prinstall.bat" (use the quotes)

    Open a new notepad and type this in:

    Set WshNetwork = CreateObject("WScript.Network")

    WshNetwork.AddWindowsPrinterConnection "\\10.10.10.10 \shared_printer"
    WshNetwork.SetDefaultPrinter "\\10.10.10.10 \shared_printer"

    wscript.quit

    Save the file as "c:\prinstall.vbs" (with the quotes)

    Create a shortcut to C:\prinstall.bat and put it in your startup folder

    If you have any problems please let me know, otherwise enjoy!

    Nick

    "Kang" wrote:

    > I want to connect to the share printer when I start up.
    > I put a batch file into the start up folder so it runs every time the system
    > boots.
    > For example, the server IP is 10.10.10.10 and the name of shared printer is
    > "shared_printer", then how can make the batch file?
    >
    > Thanks.
    >
    >
    >
  2. Archived from groups: microsoft.public.win2000.general (More info?)

    Please note that the script should contain 4 lines (due to formatting it may
    have posted otherwise).

    The lines should begin:

    Set WshNetwork
    WshNetwork
    WshNetwork
    wscript.quit

    thanks

    "Nick Staff" wrote:

    > Kang-
    >
    > Open up notepad and type this in:
    >
    > start wscript.exe c:\prinstall.vbs
    > exit
    >
    > Save the file as "C:\prinstall.bat" (use the quotes)
    >
    > Open a new notepad and type this in:
    >
    > Set WshNetwork = CreateObject("WScript.Network")
    >
    > WshNetwork.AddWindowsPrinterConnection "\\10.10.10.10 \shared_printer"
    > WshNetwork.SetDefaultPrinter "\\10.10.10.10 \shared_printer"
    >
    > wscript.quit
    >
    > Save the file as "c:\prinstall.vbs" (with the quotes)
    >
    > Create a shortcut to C:\prinstall.bat and put it in your startup folder
    >
    > If you have any problems please let me know, otherwise enjoy!
    >
    > Nick
    >
    > "Kang" wrote:
    >
    > > I want to connect to the share printer when I start up.
    > > I put a batch file into the start up folder so it runs every time the system
    > > boots.
    > > For example, the server IP is 10.10.10.10 and the name of shared printer is
    > > "shared_printer", then how can make the batch file?
    > >
    > > Thanks.
    > >
    > >
    > >
  3. Dear,

    I did the same as mentioned, but i am getting an error popping Line: 2 Char: 1.

    Please do suggest on the same.

    With regards,

    J Arvind Amarnath
  4. If you connect to the shared printer once, it will save it in your profile, just do it manually. Or use this command

    rundll32 printui.dll,PrintUIEntry /ga /n\\server\printershare

    That sets up a "machine" connection to the printer so all users that logon will have that printer installed.
Ask a new question

Read More

Connection Shared Printer Windows