Solved

Edit clients registry with Javascript

Posted on 2004-08-16
5
680 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

730 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