An '.EXE' file, that does NOTHING !!! - Page 1
Forum section: electronics / general

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 24, 2021, 10:19:33 am
content: One of my favorite andfreeembroidery software packages, uponexiting, callsanotherexecutable from its install directory to displaya bunch of Ads/Sales guff, before really quitting... So here's what I did!!...Let's say the main program is 'main.exe', and when ending, it calls 'final.exe', so I renamed final.exe to sayfinal.exe.org, and put a 'do nothing'executable in it's place, naming itfinal.exe. Now, I looked up and even created various do-nothings, but was not happy at all with them.Mainly, they would still flash SOMETHING on the screen, and/or still briefly flash a black DOS box or cmd window for a split second!OK, now the 'premise' above is not of Einstein material, however, my FINAL do-nothing app of choice works perfectly, being the use of 'rundll32.exe'(from the c:\windows\system32 directory, for running certain .dll contents), because when you execute it withNO parametersafter its call, it TRULY doesabsolutely nothing!, and there arenodelays or screen flickers, so I re-named a copy of that, to replace the original 'final.exe'...Now I'm aware that certain viruses can use that file for unscrupulous purposes, but my A.V. software seems happy enough to see it duplicated there.For the future, I'm wondering if anyone has other 'ideas' for a do-absolutely-nothing executable ??

author: mariush
author_rank: Super Contributor
timestamp: April 24, 2021, 10:40:43 am
content: It's not do-nothing, but it's a super small application that's actually useful which i use often and it's pretty much always running.AlwaysOnTopMaker :https://www.softpedia.com/get/Others/Miscellaneous/Always-On-Top-Maker.shtmlA few kilobytes big... it starts and runs in background and you can press Ctrl+Alt+T anytime and that application becomes always on top. press key combo again and window reverts to default.Super useful to keep some things above other things (ex a notepad window with some notes over office/excel window that's maximized and using whole screen)... or a datasheet picture / pinouts on top of the programming ide where you write the code for a microcontroller or something.Having multiple monitors would be an alternative.Such an executable would be super simple to make in Visual Basic or in C#You can configure the window type so that your application won't show up in taskbar even for a few seconds until it closes then after your app launches, it can simply close.

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 24, 2021, 11:04:12 am
content: Tomariush, That's certainly looks like a handy app, and I can certainly use that functionality! There are many timesthat I've wanted say 'Notepad' to stay on top, with info I need for an underlying app!! However, I'm not sure what would happenif one keeps calling it to run, as it's not actually closing down after being invoked!

author: mariush
author_rank: Super Contributor
timestamp: April 24, 2021, 12:14:19 pm
content: If you launch it a second time, the second copy makes a beep and shuts down... so there's always only one instance of the executable running.So it can be left running in background, or put in the start up folder, or in scheduled tasks to run once a few seconds after you log in.

author: golden_labels
author_rank: Super Contributor
timestamp: April 24, 2021, 01:44:34 pm
content: On Linux-based and many other similar platforms, if the filesystem supports symbolic links (usually does):Code:ln -s /usr/bin/true the-victim-binaryNTFS supports symbolic links, though I do not know how well that works. If you already havetrueinstalled (e.g. from Cygwin, MSYS2), you could try doing the same.trueis a program that does absolutely nothing except returning status code 0.

author: Stray Electron
author_rank: Super Contributor
timestamp: April 24, 2021, 11:13:40 pm
content: Quote from: GlennSprigg on April 24, 2021, 10:19:33 amI did something like this a long time ago to overwrite an obnoxious file that kept reinstalling "Shopping assistants" (browser hijackers) in an old version of windows. I identified the file in question but I could never get rid or it. I think that somewhere else there was another file that checked for the existence of the file and if it wasn't there it would install it every time that I started Windows. This one in turn would load something that hijacked my browser and send it to one of the "shopping assistants" every time that I searched for anything. But to get to the point, I used Copy Con Final.exe (enter) then immediately typed Control Z to terminate the file. That left me with a file named Final.exe that was zero bytes long and did nothing. That fooled the checker that kept reinstalling Final.exe. In case it's not obvious, I'm just using Final.exe as an example. You can use any name that you want including (I think) .com.

author: Stray Electron
author_rank: Super Contributor
timestamp: April 24, 2021, 11:16:17 pm
content: Quote from: mariush on April 24, 2021, 12:14:19 pmHow about if you copy the exe for that file to a different name and then run the new file as the 2nd executable? If it's only looking at the file name that should fool it.

author: Stray Electron
author_rank: Super Contributor
timestamp: April 24, 2021, 11:22:30 pm
content: Quote from: GlennSprigg on April 24, 2021, 10:19:33 amYou could also go into your Main.exe file using a binary editor and find the name "Final.exe" and change that to something else. That's a trick that I learned when I first got DOS 2.0 and I was leaning it. I learned to that with Edlin! I used to go onto other people's computers and change the command names (like DIR) within Command.com.

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 26, 2021, 11:22:17 am
content: Quote from: blueskull on April 25, 2021, 05:46:03 amThank youblueskull. I will research & try utilizing what you said!

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 26, 2021, 11:43:00 am
content: Quote from: Stray Electron on April 24, 2021, 11:16:17 pmThank you too for your multiple replies. Regarding this one though, it was not just 'looking' for that filename, but wants to 'run' it!!Also, using a hex-ed to change the 'final.exe' filename, would result in the same problem as above!The problem is, that it still needs to be a 'valid' Windows executable, in regards to it's internal structure...Toyou, and toblueskull, I can do most anything with VB/VB.Net, but I'm definitely a newbie in regards to the likes of 'C/C++' etc. However, Idon't mind researching what blueskull said, even if it's just for general education, when people 'in-the-know' can help!P.S... The other day I found a description of what Windows expects to see, at the beginning of a typical '.EXE' file...http://www.delorie.com/djgpp/doc/exe/

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 26, 2021, 12:46:43 pm
content: Quote from: blueskull on April 26, 2021, 12:20:22 pmTHANK YOU mate!... I downloaded, checked, and will play with your 'Attachment' tomorrow!! (Nearly 9pm now here in Western-Australia).Have a good day... Glenn

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 26, 2021, 01:08:21 pm
content: Quote from: GlennSprigg on April 26, 2021, 12:46:43 pmHmmm... Couldn't help but try it tonight...When trying to run the 'nothing.exe' from within Windows-10 File Explorer, it came up with this...The same result happened when running it as an Administrator.Even going into Properties, Security, and allowing 'Full Control' resulted in the same??Clicking on 'More Info' though, informed me that 'nothing.exe' has no valid Provider, but then clicking 'Run Anyway' was OK!!Subsequent 'Runs' did as intended though... 'Nothing'I'll have to look into my Windows Defender SmartScreen settings... and/or set an exclusion...

author: GlennSprigg
author_rank: Super Contributor
timestamp: April 30, 2021, 10:26:29 am
content: I've replaced my 'final.exe' withblueskull's provided 'nothing.exe' (renamed), and all works fine!! Thanks bluescull.I'll play around with the supplied 'makefile' and 'nothing.c' files within MS Studio as well, for education!