Page 1 of 1 1
Topic Options
#29789 - 2002-09-27 01:52 AM Savekey Command
kdog Offline
Fresh Scripter

Registered: 2002-02-19
Posts: 11
Here is what I am trying to accomplish .
1. Read the registry Key HCU for the default printer

2. Take that information and create a reg file on the local c drive

3. Modify the registry HKLM run to launch this file everytime a user hits the desktop.

Reason for this is we have one mandatory profile for one user account on about 600 machines running w2k pro . However the computers all print to different printers and the end users have a tough time settng default printers everyday Thanks

Top
#29790 - 2002-09-27 03:45 AM Re: Savekey Command
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
No so easy, actually won't work this way.

1) Writing to HKLM requires local administrative privileges
2) You're better off using the Run key in HKEY_CURRENT_USER but please read LOADKEY - Why doesn't it work? and Sequence of events during logon
3) You should rather use REGEDIT /s to import a .REG file

4) USE ADDPRINTERCONNECTION/SETDEFAULTPRINTER to add/change printers based on the computer name. For example, create a .INI file containing a list of computers and the default printer they are supposed to use like
code:
[workstation1]
DefaultPrinter=\\server\printer1
[workstation2]
DefaultPrinter=\\server\printer2

Then you only need one or two lines of KiXtart code to set default printers
5) Explain your problem in more detail and we might be able to come up with an even better solution, e.g. how many physical locations,...
6) How does a user determine to which printer he should send his print jobs?
7) Any way to automate the printer selection based on a specific criteria?

[ 27. September 2002, 03:49: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.153 seconds in which 0.121 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org