Issues executing a ".reg" file...
Moderators: Hacker, petermad, Stefan2, white
Issues executing a ".reg" file...
On a Win2K19 server, double-clicking on a ".reg" file:
- From Explorer: UAC window appears and when i press Yes, it asks to import the registry file and proceeds normally.
- From TC 11.01: I get an "access denied / application not found" message (even though my account is Local Admin on the server, i tried executing TC as plain user and "as admin", no difference)
Is there something that can be done in TC in order to behave like Explorer does?
- From Explorer: UAC window appears and when i press Yes, it asks to import the registry file and proceeds normally.
- From TC 11.01: I get an "access denied / application not found" message (even though my account is Local Admin on the server, i tried executing TC as plain user and "as admin", no difference)
Is there something that can be done in TC in order to behave like Explorer does?
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
- ghisler(Author)
- Site Admin
- Posts: 50471
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Issues executing a ".reg" file...
On Windows 10, opening .reg files on 64-bit Windows only works with 64-bit Total Commander, because regedit.exe is only present in the 64-bit system32 directory. It may be the same on Win2k19 server, or it may be a user restriction.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Issues executing a ".reg" file...
2ghisler(Author)
How come it works with 32-bit TC if you drag the ".reg" file on the button bar an click the button bar?
How come it works with 32-bit TC if you drag the ".reg" file on the button bar an click the button bar?
Re: Issues executing a ".reg" file...
Wow. Didn't occurr to me that this might be the case, so i went to the server and tried it again. TCx64 does not work (i get the message i reported), however with TCx32, everything worked fine. I'm guessing the version of regedit.exe in that windows setup is 32-bit.ghisler(Author) wrote: 2023-09-08, 10:29 UTC On Windows 10, opening .reg files on 64-bit Windows only works with 64-bit Total Commander, because regedit.exe is only present in the 64-bit system32 directory. It may be the same on Win2k19 server, or it may be a user restriction.
Thanks for the input on this.
EDIT: regedit and regedt32 exist both in system32 and syswow64 folders. Is there a setting somewhere which chooses which version to use by default?
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Re: Issues executing a ".reg" file...
On my Windows 11 system regedit.exe is in c:\windows\ (64-bit) and in c:\windows\SysWOW64\ (32-bit, visible in c:\windows\system32\ for a 32-bit application).ghisler(Author) wrote: 2023-09-08, 10:29 UTC On Windows 10, opening .reg files on 64-bit Windows only works with 64-bit Total Commander, because regedit.exe is only present in the 64-bit system32 directory.
c:\windows\system32\cmd.exe command prompt (64-bit):
Code: Select all
C:\>dir c:\windows\regedit.exe c:\windows\system32\regedit.exe c:\windows\SysWOW64\regedit.exe 2>&1 | findstr /rc:"^[^ ]"
07-05-22 07:20 552.960 regedit.exe
File Not Found
07-05-22 07:20 487.936 regedit.exe
Code: Select all
C:\>dir c:\windows\regedit.exe c:\windows\system32\regedit.exe c:\windows\SysWOW64\regedit.exe 2>&1 | findstr /rc:"^[^ ]"
07-05-22 07:20 552.960 regedit.exe
07-05-22 07:20 487.936 regedit.exe
07-05-22 07:20 487.936 regedit.exe
Code: Select all
Registration Entries (regedit.exe "%1")
My path var starts with:
Code: Select all
PATH=C:\WINDOWS\system32;C:\WINDOWS;
When executing a .reg file in 64-bit cmd.exe, 64-bit regedit is executed (probably found via the path in c:\windows\ because it was not found in c:\windows\system32\).
I got a File not found error when double clicking a .reg file in 32-bit TC. But no error when the file is executed via a button (but then 64-bit regedit is opened). Then I realized I have x64DisableRedirection=1 in my wincmd.ini and I added this button to TC:
Code: Select all
TOTALCMD#BAR#DATA
cm_SwitchX64Redirection
imageres.dll,109
2925

When I clicked the button again and restarted, both buttons still worked but executing the .reg file via the button started 64-bit regedit, while double clicking the .reg file started 32-bit regedit.
(BTW: Not relevant, but there seems to be a Windows bug with regedit.exe causing the last quote to be removed from the executed command line. But this doesn't seem to matter, regedit works OK without a closing quote of the passed filename.)
regedt32.exe executes 32-bit regedit.exe. The weird thing is, task manager shows 32-bit regedit is running and is started with command line "c:\windows\regedit.exe", but that file is the 64-bit version. It seems regedit is doing (weird) stuff with the command line in its environment space.wanderer wrote: 2023-09-08, 11:01 UTC EDIT: regedit and regedt32 exist both in system32 and syswow64 folders. Is there a setting somewhere which chooses which version to use by default?
What was your error message exactly? What is your .reg association (you can easily check in Total Commander)? What does your path environment variable starts with? Where are your regedit.exe files located (check like I did)?
Re: Issues executing a ".reg" file...
Well, the command executed when double-clicking a file can be different between 32-bit and 64-bit programs. The exact command here is determined by these registry paths:The first one is for 32-bit programs, the second for 64-bit programs.
The difference between double-clicking and a button could be due to the functions called by TC - ShellExecute/ShellExecuteEx vs. CreateProcess - but that's just a guess.
Regards
Dalai
Code: Select all
HKLM\SOFTWARE\Wow6432Node\Classes\regfile\shell\open\command
HKLM\SOFTWARE\Classes\regfile\shell\open\command
The difference between double-clicking and a button could be due to the functions called by TC - ShellExecute/ShellExecuteEx vs. CreateProcess - but that's just a guess.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Issues executing a ".reg" file...
Dalai wrote: 2023-09-08, 23:01 UTC--> This does not exist on my pc.Code: Select all
HKLM\SOFTWARE\Wow6432Node\Classes\regfile\shell\open\command
--> This exists on my pc.Code: Select all
HKLM\SOFTWARE\Classes\regfile\shell\open\command
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Re: Issues executing a ".reg" file...
Code: Select all
---------------------------
Total Commander
---------------------------
Access denied on file
<SNIP>
"Application not found"
---------------------------
OK
---------------------------
<Same as you describe>white wrote: 2023-09-08, 22:12 UTCWhat is your .reg association (you can easily check in Total Commander)?
Code: Select all
<Some stuff in Program Files>
%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
<Some other stuff in Program Files>
<Same as you describe>
EDIT: Manually executing both regedit.exe's works fine.
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Re: Issues executing a ".reg" file...
2wanderer
Does either of the following keys exist (with some content that makes sense)when you look at them from a 32-bit view? What does TC 32-bit show for Files > Associate With?
Regards
Dalai
Does either of the following keys exist (with some content that makes sense)
Code: Select all
HKCU\Software\Classes\regfile
HKEY_CLASSES_ROOT\regfile
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Issues executing a ".reg" file...
On Windows 11 only the 2nd one has a content.Dalai wrote: 2023-09-09, 13:55 UTC 2wanderer
Does either of the following keys exist (with some content that makes sense)when you look at them from a 32-bit view? What does TC 32-bit show for Files > Associate With?Code: Select all
HKCU\Software\Classes\regfile HKEY_CLASSES_ROOT\regfile
Regards
Dalai
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\regfile]
@="Registration Entries"
"EditFlags"=dword:00100000
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
00,6f,00,6f,00,74,00,25,00,5c,00,72,00,65,00,67,00,65,00,64,00,69,00,74,00,\
2e,00,65,00,78,00,65,00,2c,00,2d,00,33,00,30,00,39,00,00,00
[HKEY_CLASSES_ROOT\regfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,72,00,65,00,67,00,65,00,64,00,69,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,31,00,00,00
[HKEY_CLASSES_ROOT\regfile\shell]
[HKEY_CLASSES_ROOT\regfile\shell\edit]
[HKEY_CLASSES_ROOT\regfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,00,6f,00,\
74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,\
00,22,00,00,00
[HKEY_CLASSES_ROOT\regfile\shell\open]
@="Mer&ge"
"MUIVerb"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
6f,00,74,00,25,00,5c,00,72,00,65,00,67,00,65,00,64,00,69,00,74,00,2e,00,65,\
00,78,00,65,00,2c,00,2d,00,33,00,31,00,30,00,00,00
[HKEY_CLASSES_ROOT\regfile\shell\open\command]
@="regedit.exe \"%1\""
[HKEY_CLASSES_ROOT\regfile\shell\print]
[HKEY_CLASSES_ROOT\regfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,00,6f,00,\
74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,70,00,20,\
00,22,00,25,00,31,00,22,00,00,00
[HKEY_CLASSES_ROOT\regfile\shellex]
[HKEY_CLASSES_ROOT\regfile\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"
Registration Entries (regedit.exe "%1")
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Issues executing a ".reg" file...
Made a short test with simply regedit.exe on a button.
This button can successfully start regedit.exe in Both TC versions, after the UAC prompt.
Using this button in TC 32bit executes a 32bit regedit.exe from C:\Windows
Using x64 TC it runs a x64 regedit.exe from C:\Windows\SysWOW64
This button can successfully start regedit.exe in Both TC versions, after the UAC prompt.
Using this button in TC 32bit executes a 32bit regedit.exe from C:\Windows
Using x64 TC it runs a x64 regedit.exe from C:\Windows\SysWOW64
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Issues executing a ".reg" file...
I have made the following extensive .reg-file /regedit tests:
Operating system:
Windows 10 (x64) proff. ver. 22H2 with all updates.
Total Commander versions:
TC 11.01 x32 and x64
TC run methods:
Non-elevated, Elevated and SYSTEM (using 'RunAsSystem V1.3.6' by Uwe Sieber.)
Tests in all of the above:
Double clicking in TC on all regedit.exe and regedt32.exe files, I could find in the Windows, System32, SysWOW64 folders.
Double clicking in TC on several different .reg-files places in different folders (Windows, System32, SysWOW64, C:/temp etc.)
Test time:
Approx. half an hour.
Result:
In all cases I got NO ERRORS AT ALL.
The end-message for double clicking a .reg-file in TC, was the same in all cases:
'xxxx.reg have been successfully added to the registry.'
Ps: I looked at least twice in the registry afterwards to make sure, that the settings had been added.
Pps: The tests was actually quite appropriate for me, as we were currently talking about the registry in my senior PC club.
Operating system:
Windows 10 (x64) proff. ver. 22H2 with all updates.
Total Commander versions:
TC 11.01 x32 and x64
TC run methods:
Non-elevated, Elevated and SYSTEM (using 'RunAsSystem V1.3.6' by Uwe Sieber.)
Tests in all of the above:
Double clicking in TC on all regedit.exe and regedt32.exe files, I could find in the Windows, System32, SysWOW64 folders.
Double clicking in TC on several different .reg-files places in different folders (Windows, System32, SysWOW64, C:/temp etc.)
Test time:
Approx. half an hour.
Result:
In all cases I got NO ERRORS AT ALL.
The end-message for double clicking a .reg-file in TC, was the same in all cases:
'xxxx.reg have been successfully added to the registry.'
Ps: I looked at least twice in the registry afterwards to make sure, that the settings had been added.
Pps: The tests was actually quite appropriate for me, as we were currently talking about the registry in my senior PC club.
HerbieH*
-Keep on makin' music!
-Keep on makin' music!
Re: Issues executing a ".reg" file...
Does that mean you don't get an UAC window when using 64-bit TC?wanderer wrote: 2023-09-08, 09:21 UTC On a Win2K19 server, double-clicking on a ".reg" file:
- From Explorer: UAC window appears and when i press Yes, it asks to import the registry file and proceeds normally.
- From TC 11.01: I get an "access denied / application not found" message (even though my account is Local Admin on the server, i tried executing TC as plain user and "as admin", no difference)
Do you get exactly the same error when you choose No in the UAC screen when using 32-bit TC?
Re: Issues executing a ".reg" file...
Yes. I always get this error, regardless of whether TC has been executed normally or "As admin".
No. In that case, i get no messages.white wrote: 2023-09-10, 07:36 UTCDo you get exactly the same error when you choose No in the UAC screen when using 32-bit TC?
Windows version: https://imgur.com/a/URrmVj7
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Re: Issues executing a ".reg" file...
I meant, when you start 64-bit TC as normal user (non elevated), do you then get an UAC window?