How to write data into regedit in slicer?

i have made a simple application use 3dslicer , and wants to write some data into regedit
but write data into regedit in win10 need administrator privileges
i have tryed some code in netword and in chatgpt,it doesn’t work
dear community ,does anyone knows how to write data into regedit in slicer or how to obtain administrator privileges in slicer?

I suggest you use the ini file (see QSettings) to store configuration specific information.

i agree with you pinter
if i can’t find solution to write to the regedit, i will use the solution to wirte into QSetting