Wanted: Help translating C++ to Powershell to accommodate WOW6432Node and WOW6464Node
this program works:
http://msdn.microsoft.com/en-us/library/aa384182%28v=vs.85%29.aspx
however, need (specifically function createregistrykeyvalue) written in powershell.
the problem need specify
key_wow64_64key
and
key_wow64_32key
i spent day today trying translate c++ powershell , i'm getting error 1010 (as recall) invalid key. i'm having heck of time importing enums
regsam
could kind soul translate function createregistrykeyvalue powershell? if asking much, perhaps show me how import pinvoke these functions
dwret =
regopenkeyex(
hkeyparent,
keyname,
0,
rsaccessmask | rssamviewflag,
&hkey);
if (dwret != error_success)
{
printf("error opening key!\n");
return false;
}
if (error_success !=
regqueryvalueex(
hkey,
null,
0,
&dwtype,
(pbyte)buffer,
&dwsize)
i assume necessary import these unfriendly functions according explanations @ http://msdn.microsoft.com/en-us/library/aa384129%28v=vs.85%29.aspx
. there easier way in powershell?
thanks,
siegfried
siegfried heintze
it sounds installer x86 executable explain why writes wow6432node regsitry key. i'm assuming keys need added x64 part of registry because whatever application/process going read them x64? i'm assuming installer calling powershell run script create registry keys?
so, won't convert c++ code but...you call c:\windows\sysnative\reg.exe create regsitry key call x64 version of reg.exe , therefore add key in right place.
regards qsilverx
Windows Server > Windows PowerShell
Comments
Post a Comment