Nope. Directly the error.white wrote: 2023-09-10, 09:56 UTCI meant, when you start 64-bit TC as normal user (non elevated), do you then get an UAC window?
Issues executing a ".reg" file...
Moderators: Hacker, petermad, Stefan2, white
Re: Issues executing a ".reg" file...
- 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...
How about executing your .reg file with full path on the Command Prompt of c:\windows\system32\cmd.exe and on the Command Prompt of c:\windows\SysWOW64\cmd.exe? Does that both work?
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Issues executing a ".reg" file...
You can create an internal association for *.reg pointing to the correct location of regedit.exe.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Issues executing a ".reg" file...
I created a batch file with these contents:white wrote: 2023-09-10, 13:54 UTCHow about executing your .reg file with full path on the Command Prompt of c:\windows\system32\cmd.exe and on the Command Prompt of c:\windows\SysWOW64\cmd.exe? Does that both work?
Code: Select all
@echo off
regedit "D:\Test.reg"
I repeated the same process but from C:\Windows\SysWOW64.
From both locations, the regedit was executed properly.
Thanks for the workaround. The only reason i've gone this far with this matter is to clarify if there is some Windows peculiarity which affects TC. I still can't understand why this is happening and in reverse (x32 is working while x64 is not!). The server is a setup performed by a client of mine which resides in their domain, so i can't say for sure that there is no strange policy that may affect this issue. It looks like a normal Windows Server setup, but you never know.ghisler(Author) wrote: 2023-09-11, 09:57 UTC You can create an internal association for *.reg pointing to the correct location of regedit.exe.
Anyway, i'll keep this in mind and if i ever find what's causing it, i'll post the news here.
P.S.: On a hunch, from within TCx64, i rightcliked on the .reg file and selected the first item from the context menu (execute the default app). I got the windows prompt, asking me if i wish to keep using regedit application. I pressed OK and regedit was executed normally (with UAC and everything).
@Christian
is there perhaps anything i could do that might help you understand what's going on?
- 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...
Why didn't you simply execute "D:\Test.reg" at the command prompt like I suggested, to test running it via file association. Or doesn't that work on that Windows version?wanderer wrote: 2023-09-12, 07:30 UTC From within TC, I went to C:\Windows\System32 and executed cmd.exe. From there, i executed the batch file.
I repeated the same process but from C:\Windows\SysWOW64.
Which version of regedit was executed in each case? 32-bit or 64-bit?
I am curious too. Apparently access is denied when trying to execute one of the regedit.exe files. Perhaps you can use Sysinternals Process Monitor to find out which one?wanderer wrote: 2023-09-12, 07:30 UTC The only reason i've gone this far with this matter is to clarify if there is some Windows peculiarity which affects TC. I still can't understand why this is happening and in reverse (x32 is working while x64 is not!).
BTW, did you try to drag the .reg file to the button bar to create a new button and then click the button?
And just for ruling out, did you try with Total Commander with a clean ini file?
Re: Issues executing a ".reg" file...
I simply didn't get it!white wrote: 2023-09-12, 09:08 UTCWhy didn't you simply execute "D:\Test.reg" at the command prompt like I suggested, to test running it via file association. Or doesn't that work on that Windows version?

I can't know that because regedit's UI does not open. I assume in each case, the corresponding one was executed.wanderer wrote: 2023-09-12, 07:30 UTCWhich version of regedit was executed in each case? 32-bit or 64-bit?
I suspect the case is similar to what i've seen in several other cases in the past. The errors that produce such messages are sometimes irrelevant to the message. In this case "Access denied" may mean that an unexpected error occurred and the closest message that the code lead to, was that.wanderer wrote: 2023-09-12, 07:30 UTCI am curious too. Apparently access is denied when trying to execute one of the regedit.exe files. Perhaps you can use Sysinternals Process Monitor to find out which one?
Hmmm. A blank ini is always a good idea. So, i tried both your suggestions. In both cases, i got the same error. I'm guessing something prevents the proper execution of regedit and doesn't have to do with permissions of the reg file. The "application not found" points to that.wanderer wrote: 2023-09-12, 07:30 UTCBTW, did you try to drag the .reg file to the button bar to create a new button and then click the button?
And just for ruling out, did you try with Total Commander with a clean ini file?
@Christian. When double-clicking on a file, what does TC do?
- 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...
You don't get a warning "Are you sure to continue" after executing a .reg file? If that warning is on the screen, you can check the task manager to see which version of regedit.exe is running. On my system it says "Register-editor (32-bit)" if 32-bit is running, and "Register-editor" if 64-bit is running. (Also, on the Details tab, you can check the Architecture column)wanderer wrote: 2023-09-13, 07:15 UTC Then i opened both CMDs and executed the reg file from each one. They both worked fine. I then went with TCx64 in that folder and doubleclicked the reg file. Access denied.
I can't know that because regedit's UI does not open. I assume in each case, the corresponding one was executed.wanderer wrote: 2023-09-12, 07:30 UTCWhich version of regedit was executed in each case? 32-bit or 64-bit?
Perhaps. It's pretty clear though that regedit.exe isn't started because the UAC message doesn't appear. So some version of regedit.exe or other program cannot be started. The error seems to come from an api called by Total Commander. So my idea was to check with Process Monitor, filter on the Total Commander process and see if you can find out which program in which folder TC is trying to open.wanderer wrote: 2023-09-13, 07:15 UTCI suspect the case is similar to what i've seen in several other cases in the past. The errors that produce such messages are sometimes irrelevant to the message. In this case "Access denied" may mean that an unexpected error occurred and the closest message that the code lead to, was that.wanderer wrote: 2023-09-12, 07:30 UTCI am curious too. Apparently access is denied when trying to execute one of the regedit.exe files. Perhaps you can use Sysinternals Process Monitor to find out which one?
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Issues executing a ".reg" file...
TC calls ShellExecuteEx with the file, the rest is handled by Windows.@Christian. When double-clicking on a file, what does TC do?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Issues executing a ".reg" file...
Nope. In TCx64, i just get the error window. No UAC, no warning, no... nothing.white wrote: 2023-09-13, 08:07 UTCYou don't get a warning "Are you sure to continue" after executing a .reg file?
Trying this with 32-bit TC, in task manager indeed i see "Registry Editor (32 bit)".
- 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
can you please share with us the content of this reg file?
can you please share with us the content of this reg file?
#146217 personal license
Re: Issues executing a ".reg" file...
I know, I was talking about when you did the tests with 32-bit and 64-bit cmd.exe.
How is that relevant? regedit.exe is not started and the same thing happens with a blank .reg file.
Re: Issues executing a ".reg" file...
2white
) but sometimes very simple typos lead to some strange errors in these 2 different regedit programs)))
therefore, in fact, the launch of the program was - but very short-lived, because the correctness of the input information was simply checked and, based on its negative assessment, an exit was made.
you would not believeHow is that relevant?

therefore, in fact, the launch of the program was - but very short-lived, because the correctness of the input information was simply checked and, based on its negative assessment, an exit was made.
#146217 personal license
Re: Issues executing a ".reg" file...
2AntonyD
The same file is normally imported with the 32-bit regedit.exe. I also tried other reg files, so...
EDIT: Also, this file is a registry export, not manually edited.
2white
With ProcMon, i saw that after ShellExecuteEx was called, Windows called "CreateFile" in an effort to open "C:\Windows\System32\regedit.exe", and not "C:\Windows\regedit.exe" (if you remember, a few posts back, that's the location in registry for the x64 regedit.exe).
Seeing that, i copied "C:\Windows\regedit.exe" into "C:\Windows\System32" and expected it to work. Unfortunately it didn't, but the behavior changed. I now get a UAC question, but when i answer Yes, it does nothing (no warning or data importing to registry).
From the above behavior, it seems to be a Windows/ShellExecute issue...
The same file is normally imported with the 32-bit regedit.exe. I also tried other reg files, so...
EDIT: Also, this file is a registry export, not manually edited.
2white
With ProcMon, i saw that after ShellExecuteEx was called, Windows called "CreateFile" in an effort to open "C:\Windows\System32\regedit.exe", and not "C:\Windows\regedit.exe" (if you remember, a few posts back, that's the location in registry for the x64 regedit.exe).
Seeing that, i copied "C:\Windows\regedit.exe" into "C:\Windows\System32" and expected it to work. Unfortunately it didn't, but the behavior changed. I now get a UAC question, but when i answer Yes, it does nothing (no warning or data importing to registry).
From the above behavior, it seems to be a Windows/ShellExecute issue...
- 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.