[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Setting a registry entry from a web page

Posted on 2000-01-25
12
Medium Priority
?
183 Views
Last Modified: 2010-04-01
Is there a way to set a registry
entry from a web page? It's fine if
a dialog pops and alerts the user
that this is going to happen. It needs
to work from both netscape and ie.
I realize there are intrinsic security
issues but surely there is a way to do
this. Code please. Anyone?
0
Comment
Question by:hardtnf
  • 4
  • 3
  • 2
  • +2
12 Comments
 
LVL 7

Expert Comment

by:Jan Louwerens
ID: 2387358
I'm pretty sure there's no way to do it outside of writing your own plugin or ActiveX control to do it. Most web stuff is, in theory, supposed to be platform independent, but registry settings are OS specific
0
 
LVL 7

Expert Comment

by:Jan Louwerens
ID: 2387364
jeez, I forgot I was in the Java section... you could probably write an applet or servlet to do it, also...
0
 

Author Comment

by:hardtnf
ID: 2387533
Right, I was hoping there was some
way to do it with a java applet...
Anyone?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Expert Comment

by:Aardappel
ID: 2387590
Wether you like it or not, the only answer is that it is _impossible_ to do from a Java Applet. No Servlet or other server side code will help, for obvious reasons (it runs on the server). This can't be done in Java, and for good reasons too.

The only way you are going to change registry entries on someones machine from a webpage is in persuading that person to download some form of executable content, written in C for windows specificly. Like someone mentioned, your best bet here is ActiveX, or in case of netscape, a plugin.
0
 

Author Comment

by:hardtnf
ID: 2387610
Well, I need just a little more info.
What's up with Visual J++? I see that
there is a registry editing class in
the WFC, will these run only in IE?
Are these only for java programs?
0
 

Expert Comment

by:Aardappel
ID: 2387621
Yes, they most definitely won't run in netscape. And though I can't check as I don't use the WFC, almost certainly they won't run in an applet even under IE. They are meant for "Java as a windows programming language".
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2387876
you can implement signed applet, that downloads some native code (.DLL or even .EXE) and executes it. and it will work on both NN & IE - at least most of the time :).

so, it is possible, but I don't like the idea at all :)
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2387884
you can implement signed applet, that downloads some native code (.DLL or even .EXE) and executes it. and it will work on both NN & IE - at least most of the time :).

so, it is possible, but I don't like the idea at all :)
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2387892
you can implement signed applet, that downloads some native code (.DLL or even .EXE) and executes it. and it will work on both NN & IE - at least most of the time :).

so, it is possible, but I don't like the idea at all :)
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2387903
you can implement signed applet, that downloads some native code (.DLL or even .EXE) and executes it. and it will work on both NN & IE - at least most of the time :).

so, it is possible, but I don't like the idea at all :)
0
 
LVL 7

Accepted Solution

by:
vladi21 earned 1500 total points
ID: 2389185
look about applets:

Code signing resources:

Frequently Asked Questions - Java Security
http://java.sun.com/sfaq/
What Applets Can and Can't Do
http://java.sun.com/docs/books/tutorial/applet/overview/security.html
Security Restrictions
http://java.sun.com/docs/books/tutorial/applet/practical/security.html

Creating Signed, Persistent Java Applets
http://www.ddj.com/articles/1999/9902/9902h/9902h.htm

--
Running signed applets with the JavaTM Plug-in
http://www.suitable.com/CodeSigningSignPlug.shtml
http://java.sun.com/security/signExample/index.html 

http://www.javasoft.com/products/jdk/1.1/docs/guide/security/index.html

Writing Advanced Applications Chapter 10: Signed Applets
http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html

On the trail of certificates in Java 2
http://service2.boulder.ibm.com/devcon/news0999/artpage2.htm

Implementing custom security permissions in Java 2
http://service2.boulder.ibm.com/devcon/news0699/artpage13.htm

DEPLOYING RSA SIGNED APPLETS IN JAVA TM PLUG-IN 1.2.2
http://java.sun.com/products/plugin/1.2/docs/nsobjsigning.html
http://java.sun.com/docs/books/tutorial/security1.2/toolsign/index.html 
--

Code Signing for Java Applets
http://www.suitable.com/Doc_CodeSigning.shtml
http://www.securingjava.com/appdx-c/
java how-to http://tactika.com/realhome/javaht/java-s1.html

http://java.sun.com/docs/books/tutorial/security1.2/toolsign/index.html 
Unfortunately the Java Development Kit (JDK TM) 1.1 signing and verification is not supported by the web browsers (NetscapeTM's and Microsoft's.) It is supported in HotJavaTM, http://java.sun.com/products/hotjava and appletviewer.

You can use the JavaTM Plug-in in the browsers to get access to more recent JDK technology, http://java.sun.com/products/plugin. You can run 1.1.x signed applets with the Plug-in plugged into the browsers.

----
without plugin:
Java Signing FAQ  http://www.fastlane.net/~tlandry/javafaq.txt

MS:
Developer FAQ for Java Code Signing in Microsoft Internet Explorer 4.01 and Later
http://www.microsoft.com/java/security/secfaq.htm
http://www.thawte.com/support/developer/ms.html
http://www.developer.com/journal/techworkshop/curr.html
http://www.verisign.com/library/guide/developer/authenticode/index.html
http://msdn.microsoft.com/library/psdk/crypto/cryptotools_6cdv.htm
http://msdn.microsoft.com/library/psdk/crypto/portaltool_3u3p.htm

NN:
Software Developer Digital IDsSM for Netscape Object Signing:
http://www.verisign.com/library/guide/developer/signing/index.html
http://developer.netscape.com/software/signedobj/jarpack.html
http://developer.netscape.com/docs/manuals/signedobj/
http://developer.netscape.com/docs/manuals/signedobj/javadoc/Package-netscape_security.html
http://developer.netscape.com/docs/manuals/signedobj/targets/contents.htm
JAVA CAPABILITIES API http://developer.netscape.com/docs/manuals/signedobj/capsapi.html
OBJECT SIGNING FAQ  http://developer.netscape.com/support/faqs/objfaq.html
DevEdge Newsgroup FAQ: Security http://developer.netscape.com/support/faqs/champions/security.html


NN: Bypass the need for a certificate
COMMUNICATOR 4.5 PREFERENCES  http://developer.netscape.com/docs/manuals/deploymt/4_5PREFS.HTM
Netscape provides a way to accept a codebase as trusted (then a certificate is not needed). This can be useful during development or in a private Intranet. In the Netscape Users directory, there is a file called prefs.js. Adding the line user_pref("signed.applets.codebase_principal_support", true);
will enable JAR file without a certificate to request privileges on your machine. If you agree, it will be possible for an Applet to lauch a program, write a file on your hard disk or print on the printer. You will still have to ask for privileges in your program using the Netscape capabilites classes.
Another way is to lower general security setting to more allow more freedom when running applets locally. Add or modify the following entries in the prefs.js: user_pref("unsigned.applets.low_security_for_local_classes", true);
user_pref("signed.applets.local_classes_have_30_powers", true);
user_pref("signed.applets.low_security_for_local_classes", true);
user_pref("signed.applets.verbose_security_exception", true);

Then you don't need to asked for privileges for local classes.
When adding or modifying the file prefs.js, Netscape must not be running because your modification will be overwritten. So shut down Netscape, edit the prefs.js and then restart Netscape.
---
Java Security course
http://ei.cs.vt.edu/~jwww/courseNotes/security/java/

0
 

Author Comment

by:hardtnf
ID: 2389887
THanks for the info.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month7 days, 14 hours left to enroll

607 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