By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,995 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,995 IT Pros & Developers. It's quick & easy.

User verification in windows forms

P: n/a
I have an app that prints entry tickets. If the printer driver is not set up
exactly to detect the black mark on the back of the ticket, the tickets do
not print correctly. Because of this, all users are logging on with the same
user name to ensure they get a correctly configured printer driver.

The application runs on a Terminal Server via the RDP client.

In order to audit the actions of users, it is necessary to identify each
user. Is there a way to authenticate a windows username and password, so that
whilst the program is running as UserX, the application knows that the
actions can be attributed to UserA?

Alternatively, can the printer settings be set in a way that uses the same
configuration for all users?

Thanks
--
John Austin
Jun 11 '07 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Since you are employing an anonymous scheme to your top level security and
have all users log into the RDP session as one user, you will have to roll
your own security model in your application.

This would require your users to log into the RDP session anonymously and
then into the application as a unique individual.

Alternatively

You or the network administrator can define a group policy for the terminal
server (perhaps based on a group of users) that prepare the environment the
way you would like.

You can prepare a configuration file with all your environmental settings
the way you would like the printer to behave.
"John Austin" <Jo*********@nospam.nospamwrote in message
news:C6**********************************@microsof t.com...
>I have an app that prints entry tickets. If the printer driver is not set
up
exactly to detect the black mark on the back of the ticket, the tickets do
not print correctly. Because of this, all users are logging on with the
same
user name to ensure they get a correctly configured printer driver.

The application runs on a Terminal Server via the RDP client.

In order to audit the actions of users, it is necessary to identify each
user. Is there a way to authenticate a windows username and password, so
that
whilst the program is running as UserX, the application knows that the
actions can be attributed to UserA?

Alternatively, can the printer settings be set in a way that uses the same
configuration for all users?

Thanks
--
John Austin

Jun 11 '07 #2

P: n/a
Can you recomend an easy to understand artical that explains how to set the
group so that they all get the same printer settings for 2 particular
printers?

Thanks,

--
John Austin
"AMDRIT" wrote:
Since you are employing an anonymous scheme to your top level security and
have all users log into the RDP session as one user, you will have to roll
your own security model in your application.

This would require your users to log into the RDP session anonymously and
then into the application as a unique individual.

Alternatively

You or the network administrator can define a group policy for the terminal
server (perhaps based on a group of users) that prepare the environment the
way you would like.

You can prepare a configuration file with all your environmental settings
the way you would like the printer to behave.
"John Austin" <Jo*********@nospam.nospamwrote in message
news:C6**********************************@microsof t.com...
I have an app that prints entry tickets. If the printer driver is not set
up
exactly to detect the black mark on the back of the ticket, the tickets do
not print correctly. Because of this, all users are logging on with the
same
user name to ensure they get a correctly configured printer driver.

The application runs on a Terminal Server via the RDP client.

In order to audit the actions of users, it is necessary to identify each
user. Is there a way to authenticate a windows username and password, so
that
whilst the program is running as UserX, the application knows that the
actions can be attributed to UserA?

Alternatively, can the printer settings be set in a way that uses the same
configuration for all users?

Thanks
--
John Austin


Jun 11 '07 #3

P: n/a
Hi John,

Based on my understanding, your question is how to set up the printer
settings on a machine so that all users have the same settings. If I'm off
base, please feel free to let me know.

Your user profile is a collection of settings that make the computer look
and work the way you want it to. It contains your settings for desktop
backgrounds, screen savers, pointer preferences, printer settings, and
other features. User profiles ensure that your personal preferences are
used whenever you log on to Windows.

When multiple users log on locally to the same computer, Windows uses the
built-in default user profile as a template to assign a profile to each new
user. You can replace this built-in profile with a custom default user
profile so that each new user receives a custom version of the profile.

You could use the user profile of the Windows user that contains the
'correct' printer settings as the custom default user profile so that new
users that are created later will have the custom default user profile.
For existing user profiles, you can replace them with this user profile
directly.

For more information on how to do this, you may refer to the following
documents:

'How to create a custom default user profile'
http://support.microsoft.com/default...&Product=winxp

'How to copy data from a corrupted user profile to a new profile'
http://support.microsoft.com/default...&Product=winxp

Hope this helps.
If my suggestion is not appropriate to your practice, please feel free to
let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 12 '07 #4

P: n/a
Thanks, Linda.

Can you help me understand where the profile needs to be set up please. The
printers are connected to a PC (one parallel, one USB). The users run 'Remote
Desktop' on that PC to connect to a Terminal Server, that runs the
application. The printers are automatically set up on the Terminal Server and
the printer names on the terminal server include the client PC and the
session number. Are the printer settings for the client PC or for the
Terminal Server? I have never used profiles so this may not make sense, but
does the profile relate to the PC or the domain?

Many thanks,
--
John Austin
"Linda Liu [MSFT]" wrote:
Hi John,

Based on my understanding, your question is how to set up the printer
settings on a machine so that all users have the same settings. If I'm off
base, please feel free to let me know.

Your user profile is a collection of settings that make the computer look
and work the way you want it to. It contains your settings for desktop
backgrounds, screen savers, pointer preferences, printer settings, and
other features. User profiles ensure that your personal preferences are
used whenever you log on to Windows.

When multiple users log on locally to the same computer, Windows uses the
built-in default user profile as a template to assign a profile to each new
user. You can replace this built-in profile with a custom default user
profile so that each new user receives a custom version of the profile.

You could use the user profile of the Windows user that contains the
'correct' printer settings as the custom default user profile so that new
users that are created later will have the custom default user profile.
For existing user profiles, you can replace them with this user profile
directly.

For more information on how to do this, you may refer to the following
documents:

'How to create a custom default user profile'
http://support.microsoft.com/default...&Product=winxp

'How to copy data from a corrupted user profile to a new profile'
http://support.microsoft.com/default...&Product=winxp

Hope this helps.
If my suggestion is not appropriate to your practice, please feel free to
let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 12 '07 #5

P: n/a
Hi John,

Thank you for your prompt response.

Based on my understanding, you connect two printers to the Remote Desktop
Connection client (RDC client, in short) and add the two printers on the
RDC client. Then you remote connect to the terminal server from the RDC
client. Two printers are set up automatically on the terminal server and
the printer names include the RDC client. You'd like to use these two
printers that are set up automatically to print entry tickets. If I have
any misunderstanding, please feel free tell me.

I performed some tests on this. My RDC client has a printer on it. After I
remote connect to the terminal server from the RDC client, a printer is set
up automatically and the printer name includes the RDC client name. I open
the printing preferences of the printer and find they're the default print
settings.

I tried to modify the print settings and disconnect the remote connection
and then reconnect to the terminal server. I check the printing preferences
of the automatically set up printer and find that the changes I made just
now is lost.

It seems that the system configures the print settings for the
automatically set up printer every time I remote connect to the terminal
server. I thought maybe the system configures the print settings using the
built-in default user profile on the RDC client. If so, we could replace
this built-in profile with a custom default user profile.

I have performed a test replacing the built-in profie with a custom user
profile on the RDC client, but unfortunately the result turns out that the
automatically set up printer still uses the default print settings.

I think a simple workaround of this problem is to replace the built-in
default user profile with a custom user profile on the terminal server (of
course, the custom user profile contains the correct print settings), and
use the printer on the terminal server instead of the automatically set up
printer whose name includes the RDC client name.

For the existing users on the terminal server, you may delete the user
profiles of these users for convenience. The next time they log on the
terminal server via RDC, their user profiles will be generated based on the
default user profile on the terminal server automatically so that the print
settings are what you want.

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Supporto rights.

Jun 13 '07 #6

P: n/a
Thank you Linda,

Another complication with setting the ticket printers up on the Terminal
Server is that any of the users can then print to them from applications such
as Word. Do you know of any way of hiding a printer from the Printer
Selection dialog? We need to be able to print to them only from the Ticket
Printing program!

Regards,
--
John Austin
"Linda Liu [MSFT]" wrote:
Hi John,

Thank you for your prompt response.

Based on my understanding, you connect two printers to the Remote Desktop
Connection client (RDC client, in short) and add the two printers on the
RDC client. Then you remote connect to the terminal server from the RDC
client. Two printers are set up automatically on the terminal server and
the printer names include the RDC client. You'd like to use these two
printers that are set up automatically to print entry tickets. If I have
any misunderstanding, please feel free tell me.

I performed some tests on this. My RDC client has a printer on it. After I
remote connect to the terminal server from the RDC client, a printer is set
up automatically and the printer name includes the RDC client name. I open
the printing preferences of the printer and find they're the default print
settings.

I tried to modify the print settings and disconnect the remote connection
and then reconnect to the terminal server. I check the printing preferences
of the automatically set up printer and find that the changes I made just
now is lost.

It seems that the system configures the print settings for the
automatically set up printer every time I remote connect to the terminal
server. I thought maybe the system configures the print settings using the
built-in default user profile on the RDC client. If so, we could replace
this built-in profile with a custom default user profile.

I have performed a test replacing the built-in profie with a custom user
profile on the RDC client, but unfortunately the result turns out that the
automatically set up printer still uses the default print settings.

I think a simple workaround of this problem is to replace the built-in
default user profile with a custom user profile on the terminal server (of
course, the custom user profile contains the correct print settings), and
use the printer on the terminal server instead of the automatically set up
printer whose name includes the RDC client name.

For the existing users on the terminal server, you may delete the user
profiles of these users for convenience. The next time they log on the
terminal server via RDC, their user profiles will be generated based on the
default user profile on the terminal server automatically so that the print
settings are what you want.

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Supporto rights.

Jun 14 '07 #7

P: n/a
Hi John,

In my opinion, there may no way to hide a printer from the print dialog.

What's more, what you want is to hide the printer from the print dialogs of
other applications, such as Word, except the Ticket Printing program. It
adds the complication.

Could you please tell me why you don't want the users to print to the
printer from other applications?

Sincerely,
Linda Liu
Microsoft Online Community Support

Jun 20 '07 #8

P: n/a
Yes the two printers are loaded with continuous pre-printed tickets. Each
ticket has a serial number (to prevent fraud). If any other application
printed on these tickets, the operator would have to ‘void’ the ticket and
explain why it was not sold. Also if a user prints on a ticket from say Word,
they could illegally sell the ticket (some tickets are worth £500 each).
--
John Austin
"Linda Liu [MSFT]" wrote:
Hi John,

In my opinion, there may no way to hide a printer from the print dialog.

What's more, what you want is to hide the printer from the print dialogs of
other applications, such as Word, except the Ticket Printing program. It
adds the complication.

Could you please tell me why you don't want the users to print to the
printer from other applications?

Sincerely,
Linda Liu
Microsoft Online Community Support

Jun 23 '07 #9

P: n/a
Hi John,

Sorry for my delayed reply.

As for your question of hiding the printer from other applications than the
Ticket Printing program, I thought that a possible workaround was to set
the the printer offline all the time. When the Ticket Printing program
starts, delete all print jobs in the printer first and then set the printer
online programmatically. When the Ticket Printing program is terminated,
set the printer back to be offline.

Note that only when a user has administrative rights on the specified
printer, can he sets the printer online/offline.

To set a printer online/offline and delete all print jobs in the printer,
we could call the Win32 API SetPrinter. There's a KB article addressing how
to use the SetPrinter function in C#. You may refer to the article via the
following link:

'How to enable and disable a printer by using the SetPrinter function in
Visual C#'
http://support.microsoft.com/kb/315720

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

Jun 29 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.