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;
mmcgurlAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
flooderConnect With a Mentor Commented:
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.