Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Edit clients registry with Javascript

Posted on 2004-08-16
5
Medium Priority
?
687 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 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

661 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