Author Topic: An '.EXE' file, that does NOTHING !!!  (Read 3280 times)

0 Members and 1 Guest are viewing this topic.

Offline GlennSpriggTopic starter

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: au
  • Medically retired Tech. Old School / re-learning !
An '.EXE' file, that does NOTHING !!!
« on: April 24, 2021, 10:19:33 am »
One of my favorite and free embroidery software packages, upon exiting, calls another executable from its install directory to display
a 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 say final.exe.org, and put a 'do nothing'
executable in it's place, naming it final.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!   |O

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 with NO parameters after its call, it TRULY does
absolutely nothing!, and there are no delays or screen flickers, so I re-named a copy of that, to replace the original 'final.exe'...  ;D

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 ??   :phew:
Diagonal of 1x1 square = Root-2. Ok.
Diagonal of 1x1x1 cube = Root-3 !!!  Beautiful !!
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5185
  • Country: ro
  • .
Re: An '.EXE' file, that does NOTHING !!!
« Reply #1 on: April 24, 2021, 10:40:43 am »
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.shtml

A 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.
 
The following users thanked this post: GlennSprigg

Offline GlennSpriggTopic starter

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: au
  • Medically retired Tech. Old School / re-learning !
Re: An '.EXE' file, that does NOTHING !!!
« Reply #2 on: April 24, 2021, 11:04:12 am »
To mariush,  That's certainly looks like a handy app, and I can certainly use that functionality!  There are many times
that I've wanted say 'Notepad' to stay on top, with info I need for an underlying app!! However, I'm not sure what would happen
if one keeps calling it to run, as it's not actually closing down after being invoked!
Diagonal of 1x1 square = Root-2. Ok.
Diagonal of 1x1x1 cube = Root-3 !!!  Beautiful !!
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5185
  • Country: ro
  • .
Re: An '.EXE' file, that does NOTHING !!!
« Reply #3 on: April 24, 2021, 12:14:19 pm »
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.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: pl
Re: An '.EXE' file, that does NOTHING !!!
« Reply #4 on: April 24, 2021, 01:44:34 pm »
On Linux-based and many other similar platforms, if the filesystem supports symbolic links (usually does):
Code: [Select]
ln -s /usr/bin/true the-victim-binary
NTFS supports symbolic links, though I do not know how well that works. If you already have true installed (e.g. from Cygwin, MSYS2), you could try doing the same.

true is a program that does absolutely nothing except returning status code 0.
« Last Edit: April 24, 2021, 01:46:05 pm by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 
The following users thanked this post: GlennSprigg

Offline Stray Electron

  • Super Contributor
  • ***
  • Posts: 2331
Re: An '.EXE' file, that does NOTHING !!!
« Reply #5 on: April 24, 2021, 11:13:40 pm »
One of my favorite and free embroidery software packages, upon exiting, calls another executable from its install directory to display
a 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 say final.exe.org, and put a 'do nothing'
executable in it's place, naming it final.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!   |O

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 with NO parameters after its call, it TRULY does
absolutely nothing!, and there are no delays or screen flickers, so I re-named a copy of that, to replace the original 'final.exe'...  ;D

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 ??   :phew:

   I 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.
 
The following users thanked this post: GlennSprigg

Offline Stray Electron

  • Super Contributor
  • ***
  • Posts: 2331
Re: An '.EXE' file, that does NOTHING !!!
« Reply #6 on: April 24, 2021, 11:16:17 pm »
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.

 How 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.
 

Offline Stray Electron

  • Super Contributor
  • ***
  • Posts: 2331
Re: An '.EXE' file, that does NOTHING !!!
« Reply #7 on: April 24, 2021, 11:22:30 pm »
One of my favorite and free embroidery software packages, upon exiting, calls another executable from its install directory to display
a 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 say final.exe.org, and put a 'do nothing'
executable in it's place, naming it final.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!   |O

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 with NO parameters after its call, it TRULY does
absolutely nothing!, and there are no delays or screen flickers, so I re-named a copy of that, to replace the original 'final.exe'...  ;D

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 ??   :phew:

   You 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.
 

Offline GlennSpriggTopic starter

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: au
  • Medically retired Tech. Old School / re-learning !
Re: An '.EXE' file, that does NOTHING !!!
« Reply #8 on: April 26, 2021, 11:22:17 am »
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!   |O

If your program enters from main(), then it will pop up a command window. If your program enters from WinMain(), it will not pop up a command window.

When compiling, presuming you are using mingw, add -mwindows to tell gcc your target subsystem is Windows and tells the CRT to initialize the program as a GUI, not CLI program (otherwise the CRT will create a console), and to call user function WinMain(), not main().

Thank you blueskull.  I will research & try utilizing what you said!   :-+
Diagonal of 1x1 square = Root-2. Ok.
Diagonal of 1x1x1 cube = Root-3 !!!  Beautiful !!
 

Offline GlennSpriggTopic starter

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: au
  • Medically retired Tech. Old School / re-learning !
Re: An '.EXE' file, that does NOTHING !!!
« Reply #9 on: April 26, 2021, 11:43:00 am »
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.

 How 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.

Thank 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!   :phew:
The problem is, that it still needs to be a 'valid' Windows executable, in regards to it's internal structure...

To you, and to blueskull, 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, I
don'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/
Diagonal of 1x1 square = Root-2. Ok.
Diagonal of 1x1x1 cube = Root-3 !!!  Beautiful !!
 

Offline GlennSpriggTopic starter

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: au
  • Medically retired Tech. Old School / re-learning !
Re: An '.EXE' file, that does NOTHING !!!
« Reply #10 on: April 26, 2021, 12:46:43 pm »
The problem is, that it still needs to be a 'valid' Windows executable, in regards to it's internal structure...

Solved it for you.

See attachment. Compiled under Ubuntu using mingw-i686, tested with Wine.

THANK YOU mate!...  I downloaded, checked, and will play with your 'Attachment' tomorrow!!  (Nearly 9pm now here in Western-Australia).
Have a good day... Glenn   :-+
Diagonal of 1x1 square = Root-2. Ok.
Diagonal of 1x1x1 cube = Root-3 !!!  Beautiful !!
 

Offline GlennSpriggTopic starter

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: au
  • Medically retired Tech. Old School / re-learning !
Re: An '.EXE' file, that does NOTHING !!!
« Reply #11 on: April 26, 2021, 01:08:21 pm »
The problem is, that it still needs to be a 'valid' Windows executable, in regards to it's internal structure...

Solved it for you.

See attachment. Compiled under Ubuntu using mingw-i686, tested with Wine.

THANK YOU mate!...  I downloaded, checked, and will play with your 'Attachment' tomorrow!!  (Nearly 9pm now here in Western-Australia).
Have a good day... Glenn   :-+

Hmmm...  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...  :-+
« Last Edit: April 26, 2021, 01:25:09 pm by GlennSprigg »
Diagonal of 1x1 square = Root-2. Ok.
Diagonal of 1x1x1 cube = Root-3 !!!  Beautiful !!
 

Offline GlennSpriggTopic starter

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: au
  • Medically retired Tech. Old School / re-learning !
Re: An '.EXE' file, that does NOTHING !!!
« Reply #12 on: April 30, 2021, 10:26:29 am »
I've replaced my 'final.exe' with blueskull'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!    :)
Diagonal of 1x1 square = Root-2. Ok.
Diagonal of 1x1x1 cube = Root-3 !!!  Beautiful !!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf