Hi,
I am trying to develop a program and below is the part of source code for it -
The problem is that whenever I execute the program, I get the "badRegistryEntry.reg" (Attached) which does not contain the information which I want. When I execute the below command on an Admin CMD, I get the "goodRegistryEntry.reg" (Attached) which is what I require -
Also, I tried using both the reg.exe on my system (i.e. one present in the System32 folder and the other one in the SysWow64) and both when executed in CMD yield same results whereas when executed using the program yield the bad registry file
Any idea what might be going on?
I am also attaching the Wow6432Node list. To me, the bad one appears very similar to the list found in the Wow6432Node.
Thanks a lot :)
-Pranav
View attachment 32bitUninstall.txt
View attachment goodRegistryEntry.txt
View attachment badRegistryEntry.txt
I am trying to develop a program and below is the part of source code for it -
Code:
using (Process uninstallListx64 = new Process()) {
if (File.Exists(systemDrive + @"Windows\SysWow64\reg.exe"))
{
uninstallListx64.StartInfo.FileName = systemDrive + @"Windows\SysWow64\reg.exe";
uninstallListx64.StartInfo.Arguments =
@"export HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall " + tempDirectory +
@"\uninstallx64.reg";
Console.WriteLine(uninstallListx64.StartInfo.Arguments);
uninstallListx64.Start();
uninstallListx64.WaitForExit();
uninstallListx64.Close();
}
else
{
Console.WriteLine("reg.exe not found in system");
}
}
Code:
reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall C:\Pranav\goodregistryEntry.reg
Also, I tried using both the reg.exe on my system (i.e. one present in the System32 folder and the other one in the SysWow64) and both when executed in CMD yield same results whereas when executed using the program yield the bad registry file
Any idea what might be going on?
I am also attaching the Wow6432Node list. To me, the bad one appears very similar to the list found in the Wow6432Node.
Thanks a lot :)
-Pranav
View attachment 32bitUninstall.txt
View attachment goodRegistryEntry.txt
View attachment badRegistryEntry.txt