Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Edit clients registry with Javascript

Posted on 2004-08-16
5
Medium Priority
?
688 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
3 Comments
 
LVL 1

Accepted Solution

by:
Gonavitch earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…
Suggested Courses

824 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