Total commander linux5/6/2023 GetModuleFileNameW(NULL, path, MAX_PATH) Change current directory to the directory of our executable For some reason, just waiting for the process to terminate isn't enough WaitForSingleObject(pi.hProcess, INFINITE) Assuming that TOTALCMD.EXE is the original binary and TOTALCMD2.EXE the modified one, here is some code: #include ĬreateProcessW(NULL, command, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi) ĭWORD processId = GetProcessId(pi.hProcess) So if the launcher runs a Unix command then that command will be able to replace files regardless of locks. But my operating system isn’t Windows, it’s a Unix merely pretending to be Windows. Normally that wouldn’t work due to Windows locking the files. Still, Process Monitor confirms that Total Commander reads in its entire executable from disk and probably builds a hash sum to verify that it hasn’t been change.īut what if one could make sure that the executable that is being read is the original Total Commander executable? After going through a few options I settled with the most simple one: have a launcher executable that will start the modified Total Commander executable and immediately replace it with the original one. Not a very useful security mechanism of course, we have year 2014 and viruses infecting executables are almost extinct. Isn’t it beautiful? Wait, what’s this message: “The TOTALCMD executable is corrupted, possible VIRUS! Totalcmd will close.”? Where did Total Commander go? A search quickly tells you that this is a security mechanism and cannot be disabled. Open TOTALCMD.EXE with Resource Hacker, select the resource in the MAINICON icon group, right-click it and choose “Replace Resource” - select the new icon, save file (did you back up the original version?), done. ICO format (I liked the one by arrioch) and Resource Hacker. Well, not really a problem - changing resources in Windows applications is fairly easy.Īll you need a new high-resolution icon in. Wine doesn’t allow configuring the icon however, the source code shows that it will read the icon from the application resource unconditionally. Having the standard application icon display on OS X is somewhat awkward however: with 32×32 pixels it is simply too small, one would need a significantly larger icon for it to fit nicely into the OS X user interface. So I keep running it via Wine and it works surprisingly well. Well, maybe not… Still, I couldn’t find any file manager for Linux or OS X that would work as well as Total Commander. Maybe you are like me and tend to drag along your favorite Windows applications even though you switched away to a different operating system a while ago.
0 Comments
Leave a Reply. |