.bat files?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: .bat files?

Post by TheQwerty »

highend wrote:Try to open a bat file with admin rights, that contains the telnet command...

It's not getting redirected to the %winsysnative% folder and fails.
Run as Administrator is all handled by Windows. It's not even attempting to use the PFA, so that's expected. If you ran XY as admin then the command prompt and by its nature the batch files would be run as administrator and that all works fine.

So let's try another solution...
  1. Run XY as Admin.
  2. Copy %winsysnative%\telnet.exe to %winsysdir%.
  3. Copy %winsysnative%\en-US\telnet.exe.mui to %winsysdir%\en-US.
  4. Go ahead and run XY normally.
Now telnet should be found in the x86 cmd.exe and all of the PFAs and other workarounds are not needed. You can call Run as Admin and it will work as expected.

I'm not sure if there are other side-affects to this but it seems to find and open telnet just fine.


Alternatively, abandon Microsoft's telnet and use PuTTY or another free telnet client. The problem is not actually one of x86 vs x64 - it's Microsoft putting it in System32 and the WOW64 shell-game.

Post Reply