Command prompt that closes automatically
Solved
titania59
Posted messages
8
Status
Membre
-
brucine Posted messages 24390 Registration date Status Membre Last intervention -
brucine Posted messages 24390 Registration date Status Membre Last intervention -
Hello, I can't start my command prompt; it closes automatically as soon as it's opened. Looking in the registry, here’s what Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor shows when I double-click on autorun: @mode 20,5 & tasklist /FI "IMAGENAME eq SoundModule.exe" 2>NUL | find /I /N "SoundModule.exe">NUL && exit & if exist "C:\Users\florent stanus\AppData\Roaming\Microsoft\SoundModule\SoundModule.exe" ( start /MIN "" "C:\Users\florent stanus\AppData\Roaming\Microsoft\SoundModule\SoundModule.exe" & tasklist /FI "IMAGENAME eq explorer.exe" 2>NUL | find /I /N "explorer.exe">NUL && exit & explorer.exe & exit ) else ( tasklist /FI "IMAGENAME eq explorer.exe" 2>NUL | find /I /N "explorer.exe">NUL && exit & explorer.exe & exit )
Any solution?
Thank you
Configuration: Windows / Opera 78.0.4093.153
Any solution?
Thank you
Configuration: Windows / Opera 78.0.4093.153
The /K switch is supposed to run a tartempion command and then return to the prompt; unless a command is entered, and even if it is, not much should happen.
The switch to prevent cmd from reading an autoruns entry from the registry is /D.
That said, and as long as the script in question apparently related to a sound card is of any use, it is normal for cmd to "automatically" close since, regardless of the situation, it ends with "exit."
The normal syntax if we want cmd to stay open (but in principle for a batch file, like exit itself) is exit /b.
That said, if such a script is necessary for a game or something, I wouldn't put it there, but in an independent batch that we would run at the start of the game.
If you had written it yourself, being somewhat technical, you would know this syntax.
So it is either a "software" that installed it, or more likely a virus (specifically a cryptocurrency miner in this case).
https://stackoverflow.com/questions/58849884/cmd-exe-closes-immediately-unusual-line-in-autorun-registry-entry
In this latter hypothesis, you need to:
-kill the process at ...:
CMD /D Taskkill /F /IM "SoundModule.exe"
-remove the autorun entry: by default, in the Command Processor entry, there is no autorun entry but only a REG_SZ type string with an undefined value.
-go to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon: same deal, by default, there should not be %comspec% but nothing.
-go to %appdata%\Microsoft\SoundModule or SoundMixer and delete.
With a bit of luck, that should be enough without using a "cleaning" virus software, and the moral is that a solid defense software should be installed on the computer and caution should be exercised with what is downloaded.
Regarding its operation, the /d switch orders to disregard the autorun entry in the following command, but by default, autorun will be read again when launching another instance of cmd (unless /b is placed after each exit) and as long as this entry exists.