G
Guest
Hi, we're in the process of changing all our users from 'administrators' to
'limited users'. We have some applications which are not XP certified (they
read registry keys and read / write to folders which are not accessible as a
limited user).
Therefore, we will execute them using "RunAs" so these applications will run
using an administrator account's credentials (we're actually using "RunAsP"
from MAST in order to encrypt the user id and password).
The problem we're facing is that when the user (limited user account) is
changing it's default printer, obviously it is not changing the administrator
account's default printer as well. These applications print reports directly
to the default printer without showing the print dialog box. Therefore, when
the user changes his/her default printer, the application still prints to its
own default printer.
What we'd like to do is, from the application's context (administrator
account), lookup the current limited user's default printer in the registry
and apply it to the administrator account's default printer (in the registry).
In order to do this, we're looking up the "HKEY_USERS\{current limited
user}\Software\Microsoft\Windows NT\Current Version\Windows\Device" key and
setting the "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current
Version\Windows\Device" key (which corresponds to the admin account).
Can someone let us know if there is a easier way to do this?
Thanks,
Marc Giguere
Consultant - Obiektum, Inc.
'limited users'. We have some applications which are not XP certified (they
read registry keys and read / write to folders which are not accessible as a
limited user).
Therefore, we will execute them using "RunAs" so these applications will run
using an administrator account's credentials (we're actually using "RunAsP"
from MAST in order to encrypt the user id and password).
The problem we're facing is that when the user (limited user account) is
changing it's default printer, obviously it is not changing the administrator
account's default printer as well. These applications print reports directly
to the default printer without showing the print dialog box. Therefore, when
the user changes his/her default printer, the application still prints to its
own default printer.
What we'd like to do is, from the application's context (administrator
account), lookup the current limited user's default printer in the registry
and apply it to the administrator account's default printer (in the registry).
In order to do this, we're looking up the "HKEY_USERS\{current limited
user}\Software\Microsoft\Windows NT\Current Version\Windows\Device" key and
setting the "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current
Version\Windows\Device" key (which corresponds to the admin account).
Can someone let us know if there is a easier way to do this?
Thanks,
Marc Giguere
Consultant - Obiektum, Inc.