procedure TForm1.Button1Click(Sender: TObject);
var
MyReg: TRegistry;
begin
MyReg := TRegistry.Create(KEY_WRITE or KEY_READ or KEY_WOW64_64KEY);
MyReg.RootKey := HKEY_LOCAL_MACHINE;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\madshi\madCollection', True) then
begin
MyReg.WriteString('',MainDir2);
MyReg.WriteBinaryData('key',pbyte(keyMem.Memory)^,keyMem.Size);
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\madshi\madCollection', True) then
begin
MyReg.WriteString('',MainDir2);
MyReg.WriteBinaryData('key',pbyte(keyMem.Memory)^,keyMem.Size);
end;
MyReg.CloseKey;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\Classes\madExceptBugReport\DefaultIcon', True) then
begin
MyReg.WriteString('',MainDir+'madExcept\Tools\madExceptViewer.exe');
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\Classes\madExceptBugReport\DefaultIcon', True) then
begin
MyReg.WriteString('',MainDir+'madExcept\Tools\madExceptViewer.exe');
end;
MyReg.CloseKey;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\Classes\madExceptBugReport\shell\open\command', True) then
begin
MyReg.WriteString('','"'+MainDir+'madExcept\Tools\madExceptViewer.exe" "%1"');
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\Classes\madExceptBugReport\shell\open\command', True) then
begin
MyReg.WriteString('','"'+MainDir+'madExcept\Tools\madExceptViewer.exe" "%1"');
end;
MyReg.CloseKey;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\Classes\madExceptPlugin\DefaultIcon', True) then
begin
MyReg.WriteString('',MainDir+'madExcept\Tools\madPluginMan.exe');
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\Classes\madExceptPlugin\DefaultIcon', True) then
begin
MyReg.WriteString('',MainDir+'madExcept\Tools\madPluginMan.exe');
end;
MyReg.CloseKey;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\Classes\madExceptPlugin\shell\open\command', True) then
begin
MyReg.WriteString('','"'+MainDir+'madExcept\Tools\madPluginMan.exe" "%1"');
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\Classes\madExceptPlugin\shell\open\command', True) then
begin
MyReg.WriteString('','"'+MainDir+'madExcept\Tools\madPluginMan.exe" "%1"');
end;
MyReg.CloseKey;
MyReg.Free;
end;
Thanks for finding the cause of the problem q675318!
The reason it still worked on my PC is that madExcept.pas has a special case for my development PC, where madExcept32/64.dll are compiled to "c:\sources\madshi".
procedure TForm1.Button1Click(Sender: TObject);
var
MyReg: TRegistry;
begin
MyReg := TRegistry.Create(KEY_WRITE or KEY_READ or KEY_WOW64_64KEY);
MyReg.RootKey := HKEY_LOCAL_MACHINE;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\madshi\madCollection', True) then
begin
MyReg.WriteString('',MainDir2);
MyReg.WriteBinaryData('key',pbyte(keyMem.Memory)^,keyMem.Size);
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\madshi\madCollection', True) then
begin
MyReg.WriteString('',MainDir2);
MyReg.WriteBinaryData('key',pbyte(keyMem.Memory)^,keyMem.Size);
end;
MyReg.CloseKey;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\Classes\madExceptBugReport\DefaultIcon', True) then
begin
MyReg.WriteString('',MainDir+'madExcept\Tools\madExceptViewer.exe');
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\Classes\madExceptBugReport\DefaultIcon', True) then
begin
MyReg.WriteString('',MainDir+'madExcept\Tools\madExceptViewer.exe');
end;
MyReg.CloseKey;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\Classes\madExceptBugReport\shell\open\command', True) then
begin
MyReg.WriteString('','"'+MainDir+'madExcept\Tools\madExceptViewer.exe" "%1"');
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\Classes\madExceptBugReport\shell\open\command', True) then
begin
MyReg.WriteString('','"'+MainDir+'madExcept\Tools\madExceptViewer.exe" "%1"');
end;
MyReg.CloseKey;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\Classes\madExceptPlugin\DefaultIcon', True) then
begin
MyReg.WriteString('',MainDir+'madExcept\Tools\madPluginMan.exe');
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\Classes\madExceptPlugin\DefaultIcon', True) then
begin
MyReg.WriteString('',MainDir+'madExcept\Tools\madPluginMan.exe');
end;
MyReg.CloseKey;
//-------------------------------------------------------
if MyReg.OpenKey('SOFTWARE\Wow6432Node\Classes\madExceptPlugin\shell\open\command', True) then
begin
MyReg.WriteString('','"'+MainDir+'madExcept\Tools\madPluginMan.exe" "%1"');
end;
MyReg.CloseKey;
if MyReg.OpenKey('SOFTWARE\Classes\madExceptPlugin\shell\open\command', True) then
begin
MyReg.WriteString('','"'+MainDir+'madExcept\Tools\madPluginMan.exe" "%1"');
end;
MyReg.CloseKey;
MyReg.Free;
end;