Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Roaming Profiles Local & Networked Printers

Posted on 2004-10-26
7
Medium Priority
?
528 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
Comment
Question by:ehaley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 18

Expert Comment

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

Expert Comment

by:BigC666
ID: 12414175
0
 

Expert Comment

by:murryc
ID: 12424135
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
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
LVL 1

Author Comment

by:ehaley
ID: 12706997
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:
murryc earned 750 total points
ID: 12707159
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
ID: 12710731
Oh Murry.. This looks good.. I should have at this before week's end.. Thanks..
-Mike-
0
 
LVL 1

Author Comment

by:ehaley
ID: 13348547
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

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

636 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