Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: cmd window not kept open

13 Mar 2015   #1
theobserver

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 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 System SpecsSystem Spec
.
13 Mar 2015   #2
Tookeri

Windows 7 Pro 32
 
 

Try this command:

cmd /D
My System SpecsSystem Spec
13 Mar 2015   #3
RolandJS

Windows 7 Professional 64-bit
 
 

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 System SpecsSystem Spec
.

13 Mar 2015   #4
Jacee
Microsoft MVP

Windows 7 Ultimate 32bit SP1
 
 

Try running the command prompt using "Run" .... type cmd.exe > click okay
Or
see this Prevent the command prompt closing automatically
My System SpecsSystem Spec
13 Mar 2015   #5
theobserver

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Thank you all for your suggestion.

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

Regards,
theobserver
My System SpecsSystem Spec
13 Mar 2015   #6
Tookeri

Windows 7 Pro 32
 
 

Quote   Quote: Originally Posted by theobserver View Post
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 System SpecsSystem Spec
14 Mar 2015   #7
Layback Bear

Windows 7 Pro. 64/SP-1
 
 

Please help me because I'm lost.

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

From post #1

Quote:
I did an fsc /scannow just in case but no problem was found.
My System SpecsSystem Spec
14 Mar 2015   #8
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by layback bear View Post
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.
My System SpecsSystem Spec
14 Mar 2015   #9
RolandJS

Windows 7 Professional 64-bit
 
 

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
My System SpecsSystem Spec
14 Mar 2015   #10
theobserver

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by Layback Bear View Post
Please help me because I'm lost.

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

From post #1

Quote:
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 System SpecsSystem Spec
Reply

 cmd window not kept open




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
I can't open my window...please help!!!
When i'm working on my windows...something appeared and lots of thing on my computer disappear but it still work untill I reset my computer, after reset it, it not work again ... what should I do now? Please help me...thank you
BSOD Help and Support
Unable to open link in new tab and won;t open new window
Not sure what happened, but starting this afternoon, Explorer 9 (released version via automatic update) will not open a link in a new tab, nor will it open that line into a new explorer window. Looked at multiple complaints and fixes for this, none worked (including the scripts). ...
Browsers & Mail
Adding 'open in new window' to search results, & opening in new window
Whenever I search in W7, I want to have the ability to open found folders in a new window. If I r-click, that option is not there. Is there a way to add this to W7? Also: When I go to 'open file location', the file's folder opens in the same window - highly annoying. In Vista, it opens in a new...
General Discussion
Open Excel workbook in active window rather than first window
Hi, I have recently upgraded to Windows 7 and Office 2010 and though I'm starting to get used to all the changes there is one thing which is really bugging me. When I have two separate Excel windows open and open an Excel file from Windows Explorer the file will open in the first window not...
Microsoft Office
Can't open Apps - "Open With" window always appears
Can't open any programs cuz this annoying window "Open with" pops up asking what application I want to open this file with? If I go browse and select the file (i.e. IE) then another window opens asking if I want to run, save or cancel. When I hit Run.... windows close and nothing happens. ...
Software
Window won't open in same window
Hi.I am running Windows 7 Ultimate 32bit .I have ticked in Folder Options to open windows in same window but it won't work,the windows are opening in new window! Please help! I am searchin for the solution all day and can't find anything working for me! :cry:
General Discussion


Our Sites

Site Links

About Us

Find 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 11:57.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App