Thanks!dkoch hat geschrieben:https://svn.opsi.org/filedetails.php?re ... parser.pas
But why isn't this in the 4.11.3 branch? I'm missing something, right?

Thanks!dkoch hat geschrieben:https://svn.opsi.org/filedetails.php?re ... parser.pas
Code: Alles auswählen
if Is64BitSystem and (GetNTVersionMajor < 6) and regist.myforce64 then
begin
// Workaround for RegDeleteKey 64 Bit problem
//errorcode := RegDeleteKeyEx(mykey, PChar(keytoopen), KeyOpenMode,0);
output := TXStringList.create;
commandline := 'cmd64.exe /c "reg delete '+key_completepath+' /f';
LogDatei.DependentAdd ('Executing ' + commandline, LLinfo);
if not RunCommandAndCaptureOut(commandline,true,output, report, SW_SHOWMINIMIZED, FLastExitCodeOfExe) then
Begin
ps := 'Error: ' + Report;
LogDatei.DependentAddError (ps, LLerror);
End
Code: Alles auswählen
commandline := 'cmd64.exe /c "reg delete '+key_completepath+' /f';
Code: Alles auswählen
commandline := 'cmd64.exe /c "reg delete "'+key_completepath+'" /f';
Code: Alles auswählen
C:\Documents and Settings\mylusername>cmd64.exe /c "reg delete HKEY_CURRENT_USER\Software\test 2 /f"
ERROR: Invalid syntax.
Type "REG DELETE /?" for usage.
C:\Documents and Settings\mylusername>cmd64.exe /c "reg delete "HKEY_CURRENT_USER\Software\test 2" /f"
The operation completed successfully.