writing to registry tat affects ALL users

I have a piece of coding that edits the registry in such way that it disables the taskmanager, shutdown and logging off features of the system. These are all saved under HKCU.

However, I realise that if another user logs in, the edited registry values will be gone. But the registry values remain for the previous user. Is there anywhere to write the values so that it will affect all the users instead of the current one?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

try writing them to


java_kevinAuthor Commented:
appari, I tried to put the values inside /default as you suggested. But it was not recognised by the system at all.

brian, local machine doesn't provide this feature.

thanks guys..
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Create a new key under


It will see from all user
java_kevinAuthor Commented:
eddkyt, yup, creating values under HKLM will make it work for all users, howeever, the code tat i'm using affects the way Windows work. Thus, it has to be from HKCU.

As mentioned, I'm disabling shutdown, logoff and taskmanager.
HKCU is only affect the current user

HKey_USERS will affect all user except the user already created.

If you create a new user then it will works

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You can writeinto hkey_local_machine to store your configuration and your app will update hkcu according when the user login
java_kevinAuthor Commented:
edd, under HK_users, i did create a key like i did in HKCU. But the effect is not there. It only works in current user... unless u mean, i create in users, and try logging in from other accounts... I'll try right now...
java_kevinAuthor Commented:
edd, i created the nologoff key in default, and logged in as another user. but it did not work.

I know you mean that i can edit the HKCU... but... i'm having a BIG problem with it.

But it doesn't.... relate to this question.. but nevermind, I'll just vent my frustration here.

my program is supposed to disable those functions mentioned above. when it starts up, they are disabled. However i need to convert it to a NT service. So I use firedaemon to do it.

I am not sure if firedaemon doesn't support writing to registry or what, but whenever it starts my program, my program does not write to the registry at all.

So, I made my program this way. when the program is first installed, it'll write to the registry to disable those features and these will be permanent. but, then it was realised later that HKCU only affect the current user, and does not affect other people who log in. So I'm having a headache trying to get out of this situation...

i'm gonna try some other program to convert mine into service and hope they help...
>>edd, i created the nologoff key in default, and logged in as another user. but it did not work.

HKey_USERS will onlt copy to user as long as the user never logon onto the system

ie, the user name never appears on system/profile directory
java_kevinAuthor Commented:
umm... what does your 2nd line imply? default will only be affected if no user logged on? in win2k and XP, tha'ts not possible to not login right?
The use never logon to that machine.


user name never appears on "Documents and Settings" directory
java_kevinAuthor Commented:
ok... so, for win2k/XP, HKuser will only be useful  if no one logins.

right now, i'm still having problem writing to the registry if the program is a service. Is this true that, services are not able to write to registry?
>>ok... so, for win2k/XP, HKuser will only be useful  if no one logins.

not true. hkuser will copy to HKCU if the user never been login that machine
System user should be able to write to registry. System is super user on local machine. However, If no yuser login in. HKCU registry key will not exist
java_kevinAuthor Commented:
hkuser will copy to HKCU if the user never been login that machine

>> i don't get you.. so what's the purpose?

how do i know if it's system user? For firedaemon, it's not known. for the other software i'm trying, it say's it's system account. But it does not write to registry as well.

I rebooted, with it supposed to load up, but it doesn't affect teh registry.

I ran my program, and the registry changed.
java_kevinAuthor Commented:
By the way, for services exe, can values be written to the registry?
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered EDDYKT
Please leave any comments here within the next seven days.


EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.