cmd window not kept open


  1. Posts : 42
    Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
       #1

    cmd window not kept open


    Hi all,

    i had an incident with a virus.

    Now my pc is clean and ok but i have one last (i hope) problem.

    when i try to open a cmd window it will open and close at once no matter what i have tried.

    I have read the tutorial whixh exist here in sevenforums on how to open cmd but no result.

    I did an fsc /scannow just in case but no problem was found.

    I am out of ideas.

    Can you suggest me something please?
    I am not lazy just a heads up or a direction to what i should check it would be great.

    Thank you for your time reading this.

    Regards,
    theobserver.
      My Computer


  2. Posts : 1,049
    Windows 7 Pro 32
       #2

    Try this command:

    cmd /D
      My Computer


  3. Posts : 2,774
    Windows 7 Professional 64-bit
       #3

    As silly as this sounds, is there another DOS prompt icon somewhere within Windows? I ask because I found one long ago buried somewhere. I copy'd it to my working folder, renamed aaDOSCMD[Admin] so I see it quickly, I'm reminded to right-click and run as administrator, and 'cause I assigned a directory in the Start in section -- it sits in the assjgned directory awaiting orders. By trying a different DOS icon, we can rule out or rule in - that the original icon is the only faulty one.
      My Computer


  4. Posts : 8,608
    Windows 7 Ultimate 32bit SP1
       #4

    Try running the command prompt using "Run" .... type cmd.exe > click okay
    Or
    see this Prevent the command prompt closing automatically
      My Computer


  5. Posts : 42
    Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #5

    Thank you all for your suggestion.

    Tookeri's answer worked like a charm so i have not yet tied the others.

    Regards,
    theobserver
      My Computer


  6. Posts : 1,049
    Windows 7 Pro 32
       #6

    theobserver said:
    Tookeri's answer worked like a charm so i have not yet tied the others
    Then it might still be malware related or possible left overs or corruption from the infection cleaning process. Run these commands from a cmd window to find out:

    reg query "HKCU\Software\Microsoft\Command Processor" /v AutoRun
    reg query "HKLM\Software\Microsoft\Command Processor" /v AutoRun

    It will show the AutoRun commands for when a cmd window is started. The commands/programs specified here will be executed every time you open a cmd window. But when you add the /D parameter the AutoRun commands are ignored.
      My Computer


  7. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #7

    Please help me because I'm lost.

    How does one do this if the cmd window won't stay open.

    From post #1

    I did an fsc /scannow just in case but no problem was found.
      My Computer


  8. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #8

    layback bear said:
    how does one do this if the cmd window won't stay open.
    PowerShell, Command.com.

    Or through some script: Batch file, PowerShell script, VBScript script, etc.

    You name it.
    Last edited by Pyprohly; 14 Mar 2015 at 02:10.
      My Computer


  9. Posts : 2,774
    Windows 7 Professional 64-bit
       #9

    I borrowed very heavily from two experts, one here, one over in another forum.
    I saved their work, using a text editor, as RegRun.bat:

    rem BATchfile...added to & edited by rjs
    regedit /e d:\logs\RegRunsUser.txt "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
    regedit /e d:\logs\RegRunsEtal.txt "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run"
    regedit /e d:\logs\RegRunOnceEx.txt "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx-"
    regedit /e d:\logs\RegServices.txt "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices-"
    reg query "HKCU\Software\Microsoft\Command Processor" /v AutoRun >d:\logs\RegRunAutoRun1.txt
    reg query "HKLM\Software\Microsoft\Command Processor" /v AutoRun >d:\logs\RegRunAutoRun2.txt
    exit

    obviously, change, modify, etc. to suit your needs :)
    Last edited by RolandJS; 15 Mar 2015 at 00:33.
      My Computer


  10. Posts : 42
    Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #10

    Layback Bear said:
    Please help me because I'm lost.

    How does one do this if the cmd window won't stay open.

    From post #1

    I did an fsc /scannow just in case but no problem was found.
    The answer is right here

    also thank you all for your answers.

    It seems that my windows are corrupted but i am in good way to fix them.Right now windows cannot install windows updates and this is an idication of corruption.

    I will be back if i get stuck or with more info on what will happen in case that someone else have similar problems.

    Thank you for your time.
    theobserver
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:21.
Find Us