You are loading the default user hive but are still editing a path inside the current user. As per the last example in the win_regedit docs you need to use the 'HKLM:\ANSIBLE' path to edit the loaded hive https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_regedit_module.html. So here it would be 'path: HKLM:\ANSIBLE\Control Panel\Desktop.
On Wednesday, November 30, 2022 at 4:44:51 AM UTC+10 [email protected] wrote: > >Most likely u need to elevate > > Not sure I understand properly. My packer account, that built the image is > already administrator. (Have full rights that I know...) > Thanks! > > On Friday, November 25, 2022 at 4:05:22 p.m. UTC-5 [email protected] > wrote: > >> Most likely u need to elevate >> >> Sent from my iPhone >> >> >> On Nov 25, 2022, at 2:05 PM, Andre Leblanc <[email protected]> wrote: >> >> >> >> Building a windows image with packer and ansible. >> >> I try to customize the border window without sucess... >> >> - name: Apply WindowBorders property >> ansible.windows.win_regedit: >> * hive: C:\Users\Default\ntuser.dat * >> * path: HKCU:\Control Panel\Desktop* >> name: "{{ item.name }}" >> data: "{{ item.data }}" >> type: "{{ item.type }}" >> state: present >> with_items: >> - name: UserPreferencesMask >> data: hex:9e,3e,03,80,12,00,00,00 >> type: binary >> >> Beside a login script or GPO how do you customize your golden images when >> it concern users settings. >> >> Thanks! >> >> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/hashicorp/packer/issues >> IRC: #packer-tool on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Packer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/ed27cce6-d3d5-411d-939a-4c1a6d26ccbdn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/packer-tool/ed27cce6-d3d5-411d-939a-4c1a6d26ccbdn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/hashicorp/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/8165fc55-a300-4515-91e0-054664f11827n%40googlegroups.com.
