Solved

NT REGISTRY UPDATE

Posted on 2000-03-17
5
212 Views
Last Modified: 2010-04-04
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
Comment
Question by:mmcgurl
5 Comments
 
LVL 9

Expert Comment

by:ITugay
ID: 2628183
Are you have admin rights?

Cheers,
Igor.
0
 

Author Comment

by:mmcgurl
ID: 2628396
Yes I have logged in as administrator.
Code executes, but nothing changes.
<michael>
0
 

Expert Comment

by:johnstoned
ID: 2628405
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
 

Expert Comment

by:johnstoned
ID: 2628407
Oh, just had a thought.  Take ou the try except and see what happens...

Dave.
0
 
LVL 1

Accepted Solution

by:
flooder earned 50 total points
ID: 2716248
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 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