Stop Command Line Window Message From Closing

Neophile

New member
Power User
Local time
10:24 PM
Messages
171
I have a problem running a task with Task Scheduler. The task doesn't run. I have to debug it. When I try to make it run from the app a message appears on a command line message, but it appears and disappears so quickly that I can't read it. To fix the problem I need to read it to know what is going on.

Can someone please tell me how to stop that command line window message from closing, please?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home assembled
OS
Windows 7 Ultimate 64-bit SP1
CPU
AMD Athlon 64 II X3 440
Motherboard
M4A785TD-V EVO
Memory
Kingston kit 4GB DDR3 1333MHz (KVR1333D3N9K2/4)
Monitor(s) Displays
ASUS AS VH198S
Screen Resolution
1440x900
Hard Drives
Crucial MX300 2.5" SSD SATA,
Western Digital Caviar Black WD1002FAEX SATA-III,
Samsung HD161HJ SATA-II,
Seagate Barracuda ST3120022A ATA,
Western Digital WD800BB ATA.
Case
Standard
Cooling
Standard
Keyboard
Safeway SW-20
Mouse
Logitech Anywhere, Logitech MX Anywhere 2S, Technet M006
Internet Speed
130 Mbs fiber
Antivirus
Avast Premier
Browser
Firefox, Ice Dragon and Opera
Other Info
PCI ATA-133 Adapter,
Parallel Port Card PCI - PU005V2.
can you run the program from the command line?

open a new cmd window go to Run and type in cmd.exe

when it opens it should be in c:\windows

navigate to the folder, run the file
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
ASUS G60-RBBX05
OS
Win7 Home Premium 64x
CPU
Intel Core 2 Duo P7450 / 2.13 GHz (2.29 with Extreme Turbo)
Memory
4 GB PC-6400 Hyundai (2X2) at 800Mhz
Graphics Card(s)
NVIDIA GeForce GTX 260M 1GB DDR3 VRAM
Monitor(s) Displays
16" LED Backlit
Screen Resolution
1366 x 768 on laptop 1600x1050 max res on 22" external mon
Hard Drives
OCZ Agility 3 60GB SSD / 320 GB - Serial ATA-150 - 7200 rpm
PSU
6-cell Lithium ion { lasts 1.5 hours }
Case
ASUS G60 Laptop
Keyboard
Chicklet type back-lit (white light) keyboard
Mouse
Logitech G9 Laser Mouse 3200dpi and 1000 reports per minute
Internet Speed
Comcast 8.60mb/s up - 3.11mb/s down
Antivirus
MSE
Browser
Firefox
Other Info
General mid-budget gaming Comp. Low batterylife - High FrameRates - currently overheating problems :(

2nd Rig: Case: Rosewill BLACKHAWK Gaming ATX Mid Tower Computer Case

Mobo: GIGABYTE GA-990FXA-UD3
CPU: AMD FX-6200 Zambezi 3.8GHz (4.1GHz Turbo)
Heatsink: COOLER MASTER V8 CPU Cooler
RAM: Patriot Viper 3 8GB (2 x 4GB) 240-Pin DDR3 SDRAM 1866 (PC3 15000)
GPU: SAPPHIRE Radeon HD 6850 1GB 2
Thanks Thorsen, but I do not want to run the command manually from the command prompt; that's is exactly what I want Task Scheduler to do for me. The commend is a batch file that I have been running manually for a few years now (so that it is thoroughly tested), but I want to do it automatically with the T.S. To make it run manually with T.S. to test the task you click on Run, on the right column, under Selected Item. That's where the Command line window appears with a message, and nothing happens.

I have also looked up on Event Viewer, but There is not an event failure code number, it just says the task failed to run, and the History tab is virgin, so it doesn't even start. Then I seasrched on MS Technet and found some explications, but not what I need to know: the text of the message that I cannot read because its four or five lines just blink on the screen.

How can I read this, please?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home assembled
OS
Windows 7 Ultimate 64-bit SP1
CPU
AMD Athlon 64 II X3 440
Motherboard
M4A785TD-V EVO
Memory
Kingston kit 4GB DDR3 1333MHz (KVR1333D3N9K2/4)
Monitor(s) Displays
ASUS AS VH198S
Screen Resolution
1440x900
Hard Drives
Crucial MX300 2.5" SSD SATA,
Western Digital Caviar Black WD1002FAEX SATA-III,
Samsung HD161HJ SATA-II,
Seagate Barracuda ST3120022A ATA,
Western Digital WD800BB ATA.
Case
Standard
Cooling
Standard
Keyboard
Safeway SW-20
Mouse
Logitech Anywhere, Logitech MX Anywhere 2S, Technet M006
Internet Speed
130 Mbs fiber
Antivirus
Avast Premier
Browser
Firefox, Ice Dragon and Opera
Other Info
PCI ATA-133 Adapter,
Parallel Port Card PCI - PU005V2.
Try adding a PAUSE at the end of the batch script.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP EliteBook 8530w Mobile Workstation
OS
Windows 7 Ultimate x64 (XP, 98SE, 95, 3.11, DOS 7.10 on VM) + Ubuntu 10.04 LTS Lucid Lynx
CPU
Intel Core 2 Duo Processor P8600 (2.40 GHz, 3 MB L2 cache)
Motherboard
Mobile Intel PM45 Express Chipset ICH9M-Enhanced
Memory
4GB 800 MHz DDR2 SDRAM
Graphics Card(s)
ATI Mobility FireGL V5700 with 256 MB
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
15.4-inch WXGA anti-glare (1280 x 800 resolution)
Screen Resolution
1280 x 800
Hard Drives
500GB + 1TB
Mouse
Synaptics PS/2 Port Touchpad, USB Mouse
Internet Speed
4 Mbps
Antivirus
MSE
Browser
Firefox, Chrome, IE
Other Info
Authentec AES2810 Fingerprint Reader
Thanks gladson1976, I did that too, but with no result, and that is also why I know the batch file is not processed. It must be something on the task itself because, as I said, it is not started, so it does not start the batch file and the pause there is useless.

Is is very silly that I don't know how to stop these message windows to be able to read them. Any idea of how to?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home assembled
OS
Windows 7 Ultimate 64-bit SP1
CPU
AMD Athlon 64 II X3 440
Motherboard
M4A785TD-V EVO
Memory
Kingston kit 4GB DDR3 1333MHz (KVR1333D3N9K2/4)
Monitor(s) Displays
ASUS AS VH198S
Screen Resolution
1440x900
Hard Drives
Crucial MX300 2.5" SSD SATA,
Western Digital Caviar Black WD1002FAEX SATA-III,
Samsung HD161HJ SATA-II,
Seagate Barracuda ST3120022A ATA,
Western Digital WD800BB ATA.
Case
Standard
Cooling
Standard
Keyboard
Safeway SW-20
Mouse
Logitech Anywhere, Logitech MX Anywhere 2S, Technet M006
Internet Speed
130 Mbs fiber
Antivirus
Avast Premier
Browser
Firefox, Ice Dragon and Opera
Other Info
PCI ATA-133 Adapter,
Parallel Port Card PCI - PU005V2.
What is the script for anyway ? What does it do ?
Can you post the script here ?

EDIT: I just tried adding a small batch script to TS and it worked perfectly and also PAUSE worked.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP EliteBook 8530w Mobile Workstation
OS
Windows 7 Ultimate x64 (XP, 98SE, 95, 3.11, DOS 7.10 on VM) + Ubuntu 10.04 LTS Lucid Lynx
CPU
Intel Core 2 Duo Processor P8600 (2.40 GHz, 3 MB L2 cache)
Motherboard
Mobile Intel PM45 Express Chipset ICH9M-Enhanced
Memory
4GB 800 MHz DDR2 SDRAM
Graphics Card(s)
ATI Mobility FireGL V5700 with 256 MB
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
15.4-inch WXGA anti-glare (1280 x 800 resolution)
Screen Resolution
1280 x 800
Hard Drives
500GB + 1TB
Mouse
Synaptics PS/2 Port Touchpad, USB Mouse
Internet Speed
4 Mbps
Antivirus
MSE
Browser
Firefox, Chrome, IE
Other Info
Authentec AES2810 Fingerprint Reader
Thanks gladson1976. I've running that batch file for more than six years to clean up some parts of the system, just changing the paths according to the OSs. The Windows disk clean-up is a real shit by itself. So the problem cannot be there. I also run other tasks I created with Task Manager without any problem. My real problem is that I do not have etime nough to read the notice, because if I do, I'm nearly sure I can fix it. How to just that simple thing?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home assembled
OS
Windows 7 Ultimate 64-bit SP1
CPU
AMD Athlon 64 II X3 440
Motherboard
M4A785TD-V EVO
Memory
Kingston kit 4GB DDR3 1333MHz (KVR1333D3N9K2/4)
Monitor(s) Displays
ASUS AS VH198S
Screen Resolution
1440x900
Hard Drives
Crucial MX300 2.5" SSD SATA,
Western Digital Caviar Black WD1002FAEX SATA-III,
Samsung HD161HJ SATA-II,
Seagate Barracuda ST3120022A ATA,
Western Digital WD800BB ATA.
Case
Standard
Cooling
Standard
Keyboard
Safeway SW-20
Mouse
Logitech Anywhere, Logitech MX Anywhere 2S, Technet M006
Internet Speed
130 Mbs fiber
Antivirus
Avast Premier
Browser
Firefox, Ice Dragon and Opera
Other Info
PCI ATA-133 Adapter,
Parallel Port Card PCI - PU005V2.
Setup the task under your administrator account. Then add the administrator permissions to full control for the batch file.
 

My Computer

Computer Manufacturer/Model Number
Too many to describe...
OS
Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
Setup the task under your administrator account. Then add the administrator permissions to full control for the batch file.

I use that account to setup tasks, but how do I do I set the permissions for the batch bile if it is run by the task?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home assembled
OS
Windows 7 Ultimate 64-bit SP1
CPU
AMD Athlon 64 II X3 440
Motherboard
M4A785TD-V EVO
Memory
Kingston kit 4GB DDR3 1333MHz (KVR1333D3N9K2/4)
Monitor(s) Displays
ASUS AS VH198S
Screen Resolution
1440x900
Hard Drives
Crucial MX300 2.5" SSD SATA,
Western Digital Caviar Black WD1002FAEX SATA-III,
Samsung HD161HJ SATA-II,
Seagate Barracuda ST3120022A ATA,
Western Digital WD800BB ATA.
Case
Standard
Cooling
Standard
Keyboard
Safeway SW-20
Mouse
Logitech Anywhere, Logitech MX Anywhere 2S, Technet M006
Internet Speed
130 Mbs fiber
Antivirus
Avast Premier
Browser
Firefox, Ice Dragon and Opera
Other Info
PCI ATA-133 Adapter,
Parallel Port Card PCI - PU005V2.
Neophile,
I meant go to the folder where the batch file is located and give yourself full control over the file.
 

My Computer

Computer Manufacturer/Model Number
Too many to describe...
OS
Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
Bill2, I did that, but no way. Then, on the Task Scheduler, I set the task to be run by the System because I think that would solve any permission problem, but it did no good either. the issue must be caused by something I wrote on the task, but as I can't read the notice, I don't know what it is.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home assembled
OS
Windows 7 Ultimate 64-bit SP1
CPU
AMD Athlon 64 II X3 440
Motherboard
M4A785TD-V EVO
Memory
Kingston kit 4GB DDR3 1333MHz (KVR1333D3N9K2/4)
Monitor(s) Displays
ASUS AS VH198S
Screen Resolution
1440x900
Hard Drives
Crucial MX300 2.5" SSD SATA,
Western Digital Caviar Black WD1002FAEX SATA-III,
Samsung HD161HJ SATA-II,
Seagate Barracuda ST3120022A ATA,
Western Digital WD800BB ATA.
Case
Standard
Cooling
Standard
Keyboard
Safeway SW-20
Mouse
Logitech Anywhere, Logitech MX Anywhere 2S, Technet M006
Internet Speed
130 Mbs fiber
Antivirus
Avast Premier
Browser
Firefox, Ice Dragon and Opera
Other Info
PCI ATA-133 Adapter,
Parallel Port Card PCI - PU005V2.
Can you post the script here so that we can try to debug it?
maybe a new pair of eyes will spot something :)
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP EliteBook 8530w Mobile Workstation
OS
Windows 7 Ultimate x64 (XP, 98SE, 95, 3.11, DOS 7.10 on VM) + Ubuntu 10.04 LTS Lucid Lynx
CPU
Intel Core 2 Duo Processor P8600 (2.40 GHz, 3 MB L2 cache)
Motherboard
Mobile Intel PM45 Express Chipset ICH9M-Enhanced
Memory
4GB 800 MHz DDR2 SDRAM
Graphics Card(s)
ATI Mobility FireGL V5700 with 256 MB
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
15.4-inch WXGA anti-glare (1280 x 800 resolution)
Screen Resolution
1280 x 800
Hard Drives
500GB + 1TB
Mouse
Synaptics PS/2 Port Touchpad, USB Mouse
Internet Speed
4 Mbps
Antivirus
MSE
Browser
Firefox, Chrome, IE
Other Info
Authentec AES2810 Fingerprint Reader
Thank you all. I've found the issue. as expected, it was not on the batch file because I have been running it for ages by just double clicking directly on it. How could it be? The problem had to been something ridiculously silly, but that I could not see because I couldn't stop the message window to close to be able to read – It was like a flash. I couldn't stop it after all, but I tried many things. I fond out the problem was on the path: I had a & character on the path and it was not accepted. The path has always been like that, but as I used the batch file the way I said it did not make any difference. Probably reading the error message window I could have found this right at the first time, but I'm still unable to do that, and that is the only reason why we have lost so much time.

Thank you again for the good will trying to help.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home assembled
OS
Windows 7 Ultimate 64-bit SP1
CPU
AMD Athlon 64 II X3 440
Motherboard
M4A785TD-V EVO
Memory
Kingston kit 4GB DDR3 1333MHz (KVR1333D3N9K2/4)
Monitor(s) Displays
ASUS AS VH198S
Screen Resolution
1440x900
Hard Drives
Crucial MX300 2.5" SSD SATA,
Western Digital Caviar Black WD1002FAEX SATA-III,
Samsung HD161HJ SATA-II,
Seagate Barracuda ST3120022A ATA,
Western Digital WD800BB ATA.
Case
Standard
Cooling
Standard
Keyboard
Safeway SW-20
Mouse
Logitech Anywhere, Logitech MX Anywhere 2S, Technet M006
Internet Speed
130 Mbs fiber
Antivirus
Avast Premier
Browser
Firefox, Ice Dragon and Opera
Other Info
PCI ATA-133 Adapter,
Parallel Port Card PCI - PU005V2.
Just for next time, add a PAUSE after all the commands that might me producing the error message.
 

My Computer

OS
Windows 7
pause will produce the message "Press any key to continue"

Batch.cmd
Code:
@echo on
call "I am a command, see me run"

pause
Run it and the window will pause and not close till you hit any key to continue.

Unless you have @echo Off, then you need to comment that out.
 

My Computer

Computer Manufacturer/Model Number
Self Built
OS
Win 7 Ultimate 32bit
CPU
C2D E6600 2.4Ghz
Motherboard
Intel D965WH
Memory
4G Kingston KHX5400D2
Graphics Card(s)
EVGA GTX 570 HD SC (012-P3-1573-KR)
Sound Card
On-Board
Monitor(s) Displays
Samsung 226BW
Screen Resolution
1680 x 1050
Hard Drives
2 x 250 Seagate Barracuda
2 x 500 Seagate Barracuda (Raid1)
PSU
Corsair TX750W
Case
In-Win C589
Cooling
Stock Intel Cooling
Back
Top