Autoit fails to create registry key where regedit does

0

I wrote a AutoIt program that use RegWrite to add several registry value. I tested it as 'Domain Admins' and it fail to write, I runned it as local 'Administrator' and the values where changed.

I tested my script on an other domain, and it worked as expected ('Domain Admins' can write).

I used regedit to change the value, after confirming that regedit can "make changes to your computer", regedit can add registry values as my 'Domain Admins' user.

I used regedit and asked what are the rights of my 'Domain Admins' user, and it answered It had full controll.

(?) What can avoid AutoIt to write a registry values the current user have full control on it? Is it a frequently used behavior of Windows?

Thank for your help...

MUY Belgium

Posted 2014-11-13T14:15:48.647

Reputation: 265

Answers

0

My experience with registry editing via scripts agrees with your last statement.

It is a frequently used behavior of Windows.

Each of the Hives (HKLM,HKCU etc.) has different permissions requirements, and each key can have permissions and inherited permissions much like setting permissions on files. To the OS, they are all objects.

If you provide more detailed information, for example exactly which key are you trying to modify, and then also do a right click on the key and provide the permissions under the security tab then perhaps a more specific answer could be provided.

Myself, I am struggling with changing Control Panel settings via GPO scripts, and I am finding it very frustrating indeed. See my other post to learn more.

Timbo

Posted 2014-11-13T14:15:48.647

Reputation: 390

0

Have you tried to use #RequireAdmin to force the AutoIt script to run in admin mode?

Alternatively you can also automate registry tasks with batch files using a .bat and REG ADD ...

MushyPeas

Posted 2014-11-13T14:15:48.647

Reputation: 101