Solved

Edit clients registry with Javascript

Posted on 2004-08-16
5
674 Views
Last Modified: 2012-06-21
Problem:
Need javascript, maybe active x, code to manipulate clients registry and change the default printer to one specified in code.

Scenario:
Intranet Order Entry System, wish to have full control over printing, have active X script which enables direct printing to Default Printer. However since it only prints to default printer I need code to edit clients registry to change the default printer as well, depending on which page they are printing; IE: user prints quotes - sends to regular laser printer, with quote, labels are also printed, the code will change the default printer registry key to reflect the label printer, print the labels, and then write original values back to the key.

Goal:
User clicks print, writes new default printer values to the registry for printer, prints documents, redirects to a new page (to confirm printing completion) where it rewrites old default printer values.

Notes:
the registry key to edit default printers on Windows XP Pro is found HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device
0
Comment
Question by:LTY83
5 Comments
 
LVL 1

Accepted Solution

by:
Gonavitch earned 500 total points
ID: 11812306
Your trying to do something that is completely impossible with JavaScript. Editing the users registery without letting them know is very and can result in your site to be shut down. Also probally can't be done with any type of web-langauge.
Sorry to be a little meany here but it can't be done!

Regards,
Jamison
0
 
LVL 4

Author Comment

by:LTY83
ID: 11812553
This is for an INTRANET system so it won't be live on the web. I know it can be done, but on which language is the question. I think I have a couple ideas on how to fix this. Thanks
0
 
LVL 7

Expert Comment

by:mmarksbury
ID: 12138446
JavaScript has built in functions to prohibit this.  If it was possible, it would be a HUGE security issue.

Sounds like you should build an activeX control that does this.  You see this type of activity from adware sites all the time.  They force you to download a small .exe file that creates registry entries, installs programs, etc.  If you're browser's security settings are low enough, this all happens in the background.

Good Luck.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
validation, if text area is typed or pasted into 2 25
Google Sheets Script 21 58
what is the difference between currentTarget and target 4 35
Message not shown 5 34
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now