[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

NT REGISTRY UPDATE

I'm using this code snippet on Win98 without any problems, why does it not
work on NT. I need to make the change
on NT registry. Any help is appreciated.
thanks, michael

 try
        RootKey := HKEY_Classes_Root;
        if KeyExists('.xs') then
          begin
            OpenKey('.xs',False);  // Don't create key
            WriteString('Content Type', 'application/xstart');
            CloseKey;
0
mmcgurl
Asked:
mmcgurl
1 Solution
 
ITugayCommented:
Are you have admin rights?

Cheers,
Igor.
0
 
mmcgurlAuthor Commented:
Yes I have logged in as administrator.
Code executes, but nothing changes.
<michael>
0
 
johnstonedCommented:
Are you sure the '.xs' key does exist on the machine you are running your program on?

I have looked on a couple of NT Servers at my work, and they do not have '.xs' keys in hkey_classes_root.

Does it come up with an error message or does the code run through successfully?

Dave.
0
 
johnstonedCommented:
Oh, just had a thought.  Take ou the try except and see what happens...

Dave.
0
 
flooderCommented:
I think you must me logged in as administrator to change these settings not have admin rights. Its stupid but thats how it is.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now