Solved

Roaming Profiles Local & Networked Printers

Posted on 2004-10-26
522 Views
Last Modified: 2010-04-14
Hello,

 I have 2 users that bounce back and forth between 2 buildings hence roaming profiles is enabled. In Building A they have a local (LPT1) printer available to them as their default printer. In building B they both share a networked printer. When they leave building B and return to building A their default printer is still the networked printer in building B. How can I force them to use their local printer while in building A and the networked one while in building B?

Windows XP workstations
Active Directory domain

Thanks,
-Mike-
0
Question by:ehaley
    7 Comments
     
    LVL 18

    Expert Comment

    by:luv2smile
    You would need to write a logon script and apply it through group policy.
    0
     
    LVL 9

    Expert Comment

    by:BigC666
    0
     

    Expert Comment

    by:murryc
    Mike...I set a local variable on the computers so that the logon script knows what building they are in.  If they login from building A then the script sets a different default printer.  Vice versa for building B.  If you need more details I can give them.
    0
     
    LVL 1

    Author Comment

    by:ehaley
    Wow.. Sry I haven't gotten back to this post.. Since the issue has become more of a nussience to the two individuals effected by it, It has resurfaced.  Having looked at Murry's post it looks like you're is removing all printers and re adding them via a script and a third party program. "Con2Prt". I've never used this program before so I'm a little shy to it.. I just want exactly what you posted your question with; " The user always needs to keep their local printer as default, if they have a local printer." Any other way?
    0
     

    Accepted Solution

    by:
    ehaley..this batch file is better than the con2prt that is was using before.  Just set a location variable (let me know if you need help with that) then replace my locations "JVL, TYR, LGV" with yours.  You can eliminate one if you only have two locations.  Then replace my printer mappings with yours.  This script checks for your default printer then resets it after installing the network printers.

    Let me know how it goes....

    CLS
    @echo off
    setlocal

    if /i "%Location%"=="JVL" goto Start
    if /i "%Location%"=="LGV" goto Start
    if /i "%Location%"=="TYR" goto Start

    :: **********************************************************************
    :: *** Begin network printer mapping

    CLS
    echo Please wait while mapping network printers ...

    :: *** Save the current default printer:
    :: for /f "skip=3 tokens=2*" %%a in ('reg query "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v Device 2^>NUL') do set StdPrt=%%b

    :: *** From the check at the beginning, we know that %Location% is indeed JVL, LGV or TYR, so we can safely jump to the location:
    goto %Location%

    :TYR
    call :MapPrinter \\tyr-fs\TYR4550
    goto end_Mapping

    :JVL
    call :MapPrinter \\jvl-fs\JVL4550
    goto end_Mapping

    :LGV
    call :MapPrinter \\lgv-fs\LGV4550PCL

    goto end_Mapping

    :: **********************************************************************
    :: *** Subroutine MapPrinter; %1: \\PrintServer\PrintShare
    :: *** Maps printer only if not mapped already
    :MapPrinter
    set NetPrinter=%1
    reg query "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Devices" | find /i "%NetPrinter%" >NUL
    if errorlevel 1 con2prt /c %NetPrinter%
    goto :eof
    :: *** End subroutine MapPrinter
    :: **********************************************************************

    :end_Mapping

    :: *** Restore the standard printer, if one was set before:
    if not "%StdPrt%"=="" reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v Device /d "%StdPrt%" /f >NUL

    :: *** End of mapping
    :: **********************************************************************

    echo.
    echo ... done.
    :leave

    0
     
    LVL 1

    Author Comment

    by:ehaley
    Oh Murry.. This looks good.. I should have at this before week's end.. Thanks..
    -Mike-
    0
     
    LVL 1

    Author Comment

    by:ehaley
    We've disabled Roaming profiles on these accounts since they are more troublesome then they're worth.. Your script did work but the flakey-ness of Roaming Profiles made the whole point moot.. Thanks Murry!
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
    Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video discusses moving either the default database or any database to a new volume.

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now