Jump to content

Where r settings maintaing default printers stored


shamshasan

Recommended Posts

The environment:

Machines are RISed, maintained by GPOs applied to (super-set) OUs in Active Directory. (running XPpro)

Office machines (O1... O9)

  • O1 == user/X's machine.
  • O2 == some random machine user/X has never logged into
  • (Office machines don't have log in scripts setting default printers for users)

Labs (L1... L5): (in the labs we set default printers via log-in script)

Printers (P1... P9)

  • P1 to P5 == networked printers that are installed by log-in script
  • P6 to P9 == networked printers that are NOT installed by log-in script.
  • Are available to install and print to via LPR/IP/Hostname.
  • Px == printer in Lx, so when users log in to the Lab L1, login script automatically sets default printer as P1.
  • user/X has installed some shared printers on O1. Printer P9 is set as default on O1.

What is happening:

Currently user/X sets default printer on O1 to wherever they please. However when user/X logs into machines in L1, P1 is defaulted to. This is fine.

When user/X goes to O2, not their office machine, they see printer P1 set as the default printer. EVEN THOUGH THERE IS NO LOGIN SCRIPT SETTING A DEFAULT PRINTER (and this, i'm guessing, by power of deduction, is *why* it happens)

Given the case above then... if user logs back into O1, office machine, printer P1 should still be recognised as default? Testing shows that on machine O1, the past default set printer P9 is still recognised.

I'm confused. :wacko:

Where's the default printer setting stored on XP? user or machine?

Also is this supposed to be happening?

Concerns:This is a problem because:

  1. a lot of paper is being wasted because users are printing at wrong location,
  2. related: professors printing exams at lab printers because set that printer when there for class IN THE PAST!!!
  3. current printer script doesn't set paper size and hence users printing leave printers hanging, and
  4. difficult to manage print queues with current login script.

You all's suggestions/questions would be appreciated.

Shams

PS: Hope my symantics made it easier to understand the problem rather than difficult. :blushing:

Link to comment
Share on other sites


Ok so here's what i understand:

The default printer settings are saved in the ntuser.dat file at log off and restored and log on.

  • The ntuser.dat file is located in the %USERPROFILE% (when roaming)
    • however i also see the ntuser.dat file locally on the machine.
      • This is probably explained by the fact that the profile drops things locally onto the PC and at logoff/shutdown copies things back to the profile (to avoid latency). I know most of the other folders do this when roaming.

(Yeah... it's me asking and me solving and me asking again... :P some help/comments would be appreciated)

I'm trying to understand: the environment and in particular default printer settings as per the user profile and roaming.

In our environment: The login script is pushed out by GPO applied to the MACHINES (not the users). it is a simple script that:

  1. maps all selected printers that we choose to make public,
  2. goes through AD and on a case by case basis, "if in OU-X set Printer-X as default"

i don't understand (although i will try to explain it) why the following happens (similar to my case above, reconstructed more properly here):

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

To begin:

  • PC-Lab in OU-Lab where Printer-Lab set as default by script,
  • PC-Office & PC-test in OU-T where Printer-T set as default by script,
  • i've added some hidden printer (Printer-H), off of the share (off of the printer server) to my profile (user-shams).

Logging into PC-Lab default printer: prn-Lab (as expected)

(Prn-H is available everywhere, since it is (1) on the share, (2) on user profile)

Logged back into PC-Office default printer: Prn-T (as expected)

<PC-Office & PC-test moved to some other OU where there's no login script setting default printers!>

<While logged into PC-Office: set Printer-H, the manually added printer, as default>

Log into PC-Lab default printer: Prn-Lab (as expected)

So far so good... this is expected... script is running on OU-Lab to set Prn-Lab as default. However at this point intuition tells me that when i login to PC-Office i should either:

  1. STILL see Prn-Lab as default (on PC-Office) because: ntuser.dat saves default printer as Prn-Lab off of PC-Lab --> login at PC-Office runs no script --> ntuser.dat copied off of profile & pushes Prn-Lab from past, or
  2. see Prn-H on PC-Office as default if i've completely misunderstood how ntuser.dat is working in regards the profile... point 1 was what i was going with completely. point 2 is only coz i *know* what happened.
  3. Prn-T should not show up at all now... which is what happens.

(Here i first log in to the test machine which has been dormant for so long)

Logging into PC-Test default printer: prn-Lab (this is what i expected... the printer, set as default, on the past machine (running a script) is set as default here because there's no script setting default printers for the user at login on this machine (now)).

(now comes the monkey wrench in my entire setup)

Logging into PC-Office default printer: Prn-H.

granted that Prn-H set as default on this machine, once upon a time (!!!). BUT (1) i changed this on the user profile when i logged into Prn-Lab & (2) i confirmed this change when i logged into a machine that is NOT running any scripts; the printer set as default was STILL Prn-Lab.

Why is it still remembering Prn-H?!?!?!?

Can anyone tell me how this works?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

I wonder what would happen when:

  1. a printer OFF THE SHARE is connected locally to the users' office machine (so that gets copied into their profile),
  2. a printer is connected via LPR to the users' office machine (DOES that gets copied into their profile)

Please folk... lol... ask questions if you don't get what i'm asking.

Thanks

Shams

Edited by shamshasan
Link to comment
Share on other sites

Testing shows that the *default printer* on a machine is depandant upon (1) machine profile + (2) user profile.

I need to know where these settings are stored. Any one have any clues? :(

The default printer settings for a user are stored in the Device value in the key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows

What scripting language are you using for your logon scripts? KiXtart has built in functions for managing printers.

Link to comment
Share on other sites

In conclusion: In the AD/GPO environment, with roaming Profile setup for users (in order of application):

1) if there's a login script that is setting printers as default in particular OUs this will ofcourse take place on machines.

2) when logging into machines (previously used by a user), in OUs that have no login scripts setting default printers, users will see the printers set as default in the past ON THAT MACHINE.

3) when logging into machines (previously NOT used by a user EVER, e.g. a RISed machine), in OUs that have no login scripts setting default printers, users will see printer set as default in last used machine

- this is an ONLY ONE TIME CASE. This case only occurs once.

-=-=-=-=-=-=-=-=-=-=-=-=-=-= [ FINDINGS ] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Default printer settings are saved as per machine, i.e. the user sees the printer LAST set as default ON A PARTICULAR machine and the default printer setting has no correlation to other machines except on (1) a first time login or (2) a login script setting default printers by force.

Why is there a difference between logging back onto Y or X after coming from z?

- There is NO difference. except if either x & y are freshly installed/RISed machines on a domain where the user has never logged in before.

Were and how are these settings being stored in the user profile.

- ntuser.dat file, not a granular connection of settings (not readble :-P)

- currently this file is stored in the user profile (3M file) and the local user location (1M file)

- the Device value in the key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows

If I manually setup a printer for my office, do I see the printer from a cluster machine?

- YES (covered in first email)

Does it make a difference if this a printer connected locally to a printer, or a printer share or a printer setup via LPR?

- no difference

Some details regarding login scripts:

'KiXtart' (scripting language) has built in functions for managing printers!

-=-=-=-=-=-=-=-=-=-=-=-=-=-= [ TEST-START ] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This is a detailed outline of my thorough testing procedures and findings.

* COMPUTERS:

- PC-O(ffice),

- PC-T(est),

- PC-L(ab),

* OUs:

- IT (sets default printer to IT.prn... through log in script),

- LP, aka Local-Printer (doesn't set default printers, allows user's to do that on machines within this OU),

- Lab (sets default printer to Lab.prn... through log in script), A055.prn... is the lab/Cluster printer.

* Test procedure:

01) Place <PC-O> & <PC-T> in <OU-IT> // Place <PC-L> in <OU-Lab>

02) Reboot ALL PCs

03) login to PC-O

- Expected? IT.prn...

- default printer? --"--

- Registry? --"--

--> Logoff

04) login to PC-T

- Expected? IT.prn...

- default printer? --"--

- Registry? --"--

--> Logoff

05) login to PC-L

- Expected? A055.prn...

- default printer? --"--

- Registry? --"--

--> Logoff

06) MOVE <PC-O> & <PC-T> into <OU-LP>

07) Reboot ALL PCs [did twice... for whatever that is worth]

08) login to PC-O

- Expected? A055.prn...

- default printer? IT.prn...

- Registry? --"--

--> Logoff

09) login to PC-T

- Expected? IT.prn... (error carried forward)

- default printer? IT.prn... but could be NOT because of past printer copied over // could be because set on THIS PC on last login.

- Registry? --"--

--> Logoff

10) login to PC-L

- Expected? A055.prn...

- default printer? --"--

- Registry? --"--

--> Logoff

11) login to PC-O AGAIN

- Expected? A055.prn... (expecting registry/nuser.dat settings from past get copied over into profile)

- default printer? IT.prn...

- Registry? --"--

--> Logoff

12) login to PC-T AGAIN

- Expected? IT.prn... (error carried forward)

- default printer? --"-- ... why though? highly likely not due to 'past'

- Registry? --"--

--> Logoff

13) On <PC-O> set a printer not mapped via script on user profile (off of the print share though) as default. Logoff.

- Set to C156 (somebody else's office, a printer pulled off of the share)

- Registry settings confirmed

- printed off of it too for good measure ;-)

14) login to PC-T

- Expected? C156.prn... (STILL trusting logic & expecting registry/nuser.dat settings from past get copied over into profile)

- default printer? IT.prn... (confirming now that default printer settings are saved on the local machine and not copied into the user profile to roam).

- Registry? --"--

--> Logoff

15) login to PC-O

- Expected? C156.prn... (having recognised the pattern)

- default printer? C156.prn...

- Registry? --"--

--> Logoff

16) login to PC-L

- Expected? A055.prn...

- default printer? --"--

- Registry? --"--

--> Logoff

17) login to PC-T AGAIN

- Expected? IT.prn... (having recognised the pattern)

- default printer? --"--

- Registry? --"--

--> Logoff

18) login to PC-O AGAIN

- Expected? C156.prn... (having recognised the pattern)

- default printer? --"--

- Registry? --"--

--> Logoff

19) login to PC-T AGAIN x2

- Expected? IT.prn... (having recognised the pattern)

- default printer? --"--

- Registry? --"--

--> Logoff

20) RISed <PC-T>, placed into <OU-LP>

21) Logged in with Administrator account,

- default printer:

--> Logoff

22) Logged into PC-O // Confirm C156.prn... as default printer // Confirm PC-O in OU-LP. Logoff.

23) Login to PC-T

- Expected? C156.prn... (this time it has GOT to be due to past)

- default printer? C156.prn... (halle lujiah!)

- Registry? --"--

--> Logoff

24) Move PC-O into OU-IT. Login to PC-O. Logoff. Login to PC-L. Log off.

25) Login to PC-T:

- Expected? C156.prn... (this time it has GOT to be due to settings saved prior)

- default printer? C156.prn... (halle lujiah!!)

- Registry? --"--

--> Logoff

-=-=-=-=-=-=-=-=-=-=-=-=-=-= [ TEST-END ] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...