I have an idea that I wanted to try to implement in my own function using API calls to Advapi32.dll based on info from MSDN.
I'd like to use API calls instead of REGEDIT to import/export because of the fact that differnt versions REGEDIT export differently. If I could use API calls, I could keep the process consistant without having to use a lot of OS checks. (I'd also have more registry handling options available to me in case I needed to use them.) Plus since I'm not well-versed in C++, I thought this might offer a simple solution
However, this is where I'm having problems:
I'm trying to call RegOpenKeyEx, but am having some problems. Here's what I got so far. (I'm using Stardock an example just becuase it was something I had in my registry already):
I'm getting an error code 87 returned an no reg key handle.strcpy $3 "SOFTWARE\Stardock"
System::Call 'Advapi32::RegOpenKeyEx(i 0x80000002,t r3,i 0,i 0xF003F,i .r1)i .r2'
DetailPrint 'Result: $2'
DetailPrint 'Handle: $1'
(FYI: The main hive handle values I found at the bottom of this site.)
I'm hoping that someone will be able to point me in the right direction. (If I can figure out this function then I should be able to figure out the rest.
Thanks!