Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Server Registry from ASP

Status
Not open for further replies.

pamam

Programmer
Sep 13, 2001
12
0
0
US
HI,

I would like to access the registry and change it or remove entries from it or just to read it from within an asp file rather than hardcoding directories into the asp file.

Is there an easy way to do this??

Mel
 
Hello Mel,

Do you really mean to change the Windows Registry on your server through a web page? Or do you mean the file system directory? There is a component, the FileSystemObject, that gives access to the files on a server.

Richard

 
Richard,

Well no, but I would like to read it. We have different sites that we use for production, development, and QA. This have different directories and we end up having to hard code different values into our ASP which have to be changed depending on the site. We set up the registry with port numbers, and a host of things that will vary from site to site. We probably won't right to the registry, but reading it would be great, then we could setup all the global variables without having to change the code. It is hard to do CM with three 3 versions of the same project in the field but only one in CM.

Mel
 
is it an intranet or extranet application?
I don't think you want to have code on your root directory that a hacker could find and be able to edit your registry.
 
It's an intranet, But can it be done??? and How would I do it if it can be done.

Mel
 
It would be better to put the directories in your global.asa file as directories.

Then you only have to change one file to port the application between test environments.

If you really want to read the registry, I suggest you make a VB component that makes the getProfileString API calls for you.

If you don't want to, or can't write the component you can find one with a web search. .
.. Eat, think and be merry .
... ....................... .
 
Thanks Swany,

That's what I wanted to know. I would need to make an activex control of some sort to access it because there is no direct access method available. Or put the directories in the global.asa file.

Mel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top