Delete Reg key

Hey All,

Im trying to get a key in the registry deleted. Ive looked around and see there being 2 major choices. Using GP which seems quite a process or a login script which seems fairly simple.

Ive tried out using a reg file to remove the entry which works fine but the problem is if using it in a login script, the standard user does not have access to delete a key in registry, so it fails. So how do i get it done?

Thanks in advance

supernaut76Asked:
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.

Dushan De SilvaTechnology ArchitectCommented:
0
Rob WilliamsCommented:
Perhaps in Group Policy use a start up script rather than a logon script. I believe it executes before logon and uses system/admin credentials.
Computer Configuration | Windows Settings | Scripts | StartUp
0
supernaut76Author Commented:
Thanks for the response guys, i will try and do some testing with group policy logon scripts. My pervious experinece with them though was i found it to be slower than a regular script, is that normal?

Also the tune up software, is the trial version a fully functionall version?

Thanks
D
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Rob WilliamsCommented:
>>"i found it to be slower than a regular script, is that normal"
No I haven't found that. It's the same script just being enforced by a different service, so it shouldn't be. If you have a lot of group policies.....a lot that is, it can slow down logons.
0
Dushan De SilvaTechnology ArchitectCommented:
Hi supernaut76 !
tune-up trial version is not fully functional. You can have a look and if you interested with it you can get full version. I'm having personaly good experience with it. And please check following solutions too :)

http://www.experts-exchange.com/Applications/MultiMedia_Applications/Q_21778874.html#16232324
http://www.experts-exchange.com/Programming/Q_21797328.html
http://www.experts-exchange.com/Programming/Q_21797314.html
http://www.experts-exchange.com/Applications/Q_21761816.html


BR Dushan
0
Steve KnightIT ConsultancyCommented:
GP Login / Logoff and Startup scripts seem fine to me too, have many long ones running all over the place...

Another alternative is to give the user rights to the required registry key using a GPO then use your .REG file to delete it... look under Computer config, Windows settings, Security Settings, Registry.  Add the key and give suitable people rights.

hth

Steve
0
supernaut76Author Commented:
Tried the group policy script and i am still getting  a pop up "Do you want to add information to the registry..." So the user can still click on no and cancel the whole thing. How do i keep it hidden? The script is calling a registry file which deletes the key in question.

D
0
Steve KnightIT ConsultancyCommented:
Try regedit /s regfile.reg

rather than just regedit regfile.reg  or  start regfile.reg


Steve
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
Rob WilliamsCommented:
Sorry, ISP down most of today.
Try:
reg  delete  <key name>  /f
f = force

Use      reg  delete  /?      to read full syntax of command if you want specify full key, value, etc.
0
supernaut76Author Commented:
Ok guys i tried regedit /s regfile.reg in a group policy script and the script runs perfectly and the prompt is successfully suppressed. All looks good but...

The only problem is the reg key does not get deleted if i am logging in as a standard user. It does work when logging as an admin user. So the group policy script still uses permissions that the user has at login time.

D
0
Steve KnightIT ConsultancyCommented:
Correct.  See my post above about giving the user permissions through a GPO.

If you run it as a computer startup GPO script then it will run with local system rights rather than the user rights that the GPO user login script runs as...

Either way should make it work.  

Steve
0
supernaut76Author Commented:
Oops didnt see that...will give it a go a.s.a.p.
0
supernaut76Author Commented:
Ok so I added the same script to computer configuration, with the option to keep it visible (so i can see whats going on) but when you log in, you cannot see the script runnig and the reg key doesnt get deleted even if im logging in as an admin user.

How can it work under user config and not computer config? Am i doing something wrong?

D
0
Steve KnightIT ConsultancyCommented:
The computer startup script runs before the user logs in.  What is the key you are trying to update?  Is it under HKCU or HKLM (or elsewhere?).

I would really just do it through giving rights under GPO to your users then running it from the user logon script...

Steve
0
supernaut76Author Commented:
Its under HKLM\system\currentcontrolset\services

Stupid question where would i assign this right in GPO?

D
0
Steve KnightIT ConsultancyCommented:
see my post above.  if you need more than that let me know:

### Another alternative is to give the user rights to the required registry key using a GPO then use your .REG file to delete it... look under Computer config, Windows settings, Security Settings, Registry.  Add the key and give suitable people rights. ###

Steve
0
supernaut76Author Commented:
Thanks Steve, that did it...
0
Steve KnightIT ConsultancyCommented:
no prob. thanks for the points.
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
Windows 2000

From novice to tech pro — start learning today.