writing to registry tat affects ALL users

Hi,
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?

thanks!
java_kevinAsked:
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.

appariCommented:
try writing them to
HKey_USERS/.Default

0
BrianGEFF719Commented:
How about HKEY_LOCAL_MACHINE

-brian
0
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..
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

EDDYKTCommented:
Create a new key under


HKEY_LOCAL_MACHINE\Software\YourApp


It will see from all user
0
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.
0
EDDYKTCommented:
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
0

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
EDDYKTCommented:
You can writeinto hkey_local_machine to store your configuration and your app will update hkcu according when the user login
0
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...
0
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...
0
EDDYKTCommented:
>>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
0
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?
0
EDDYKTCommented:
The use never logon to that machine.

ie

user name never appears on "Documents and Settings" directory
0
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?
0
EDDYKTCommented:
>>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
0
EDDYKTCommented:
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
0
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.
0
java_kevinAuthor Commented:
By the way, for services exe, can values be written to the registry?
0
leonstrykerCommented:
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

leonstryker
EE Cleanup Volunteer
0
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.

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.