Over 1 million tech questions and answers.

Taskkill, Tasklist, Net Stop do not work in batch file but work at command prompt

Q: Taskkill, Tasklist, Net Stop do not work in batch file but work at command prompt

I would like to add some info here as I had the above problem, and couldn't find the answer anywhere except on a site that wanted money! Aaargh! The nerve of it!

But I saw a topic here with the exact same problem, although the solution was quite different. (Here: http://forums.techguy.org/windows-xp/944096-taskkill-does-not-work-batch.html )

I can't recall now why I thought about the firewall, but as you guys have helped me in the past, I'd like to leave some information here for people who Google the following problems and think they have found a site with a solution, only to find that the site wants your credit card number. Bah!

Here are the errors I had:

1. Net stop: System Error 5 has occurred. Access is Denied

2. Tasklist or Taskkill: The RPC server is unavailable

Both of my problems were caused by the Comodo firewall on a new PC running XP SP3.
The startup command file calls various other command files and I got the above errors when they executed the Net, Taskkill and Tasklist commands.

When I entered the commands (net stop, taskkill, tasklist) at a command prompt, they worked.

The problem was because the Comodo firewall had a "Defence +" setting for a "Sandbox" that was enabled.
When I disabled the sandbox, everything worked as I expected, i.e. as on my old PC that I was replacing.

I hope this helps someone in the future.

If you tech guys would like to add some techy details as to what the sandbox was doing, that would be great.

Read other answers
Preferred Solution: Taskkill, Tasklist, Net Stop do not work in batch file but work at command prompt

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)


Hi Everybody

This is my first post on this forum.

I am trying to create a batch file which prompts for an user input. Depending upon what the user response is, I want to terminate a particular application.

When I use the "Taskkill" command at the "Command Prompt", it works and terminates the desired application. However, when I use it in the batch file, the application doesnt' terminate.

Any suggestions, how can I get it to work from within a batch file? I am using Windows XP Professional SP3.

The batch file is reproduced here for your immediate reference :-

@echo on
set /p Input =
if /i "%Input%"=="y" goto DoNotProceed
exit /b

taskkill /im notepad.exe

This batch file is actually the batch file that is run as a "Before Backup" task using GFI backup program. I am testing the above batch trying to terminate Notepad application but the intent is to termiate this GFI application. I know the image name for this application.

The "Taskkill" command as it is works from any location. The active directory does not have to be "Windows\System32" which houses the "Taskkill" exe file.

This batch file runs but doesn't terminate the "Notepad" application.
An early response shall be highly valued.

Best regards

Deepak Agarwal

A:Taskkill does not work in batch file but works at command prompt

Read other 6 answers

Hey guys. If I have posted this in the wrong topic forum, forgive me I am new here, and didn't see a forum for command prompt.

Just had a quick question about my command prompt...when I open cmd, and type in "tasklist" to view my processes, I am greeted with and error that states "ERROR: The system cannot find the file specified". I go into the folder for windows/system32, and "tasklist.exe" is there, however I still receive the error in cmd. Any reason why this is happening? Did I accidentally erase something? Any input would be greatly appreciated. Thank you.


A:Cannot open "tasklist" in command prompt

That is not a valid command, try using the Task Master, press Ctrl + Alt + Delete and click on Processes.

Read other 3 answers

if possible suggest a way using registry key.Thanks :)

Read other answers

Well, I was bored today and so decided to muck about with the command prompt, seeing what it could do. After reading a (good) basic tutorial from here on it, I reckoned it could save me a few seconds at boot up, and make me feel nice and nerdy (:D). So, I created the following batch file, to run the programs I use when I start up:cd My Documents
cd C:\Program Files\Windows Media Player
cd C:\Program Files\Mozilla Firefox
cd C:\Program Files\MSN Messenger
cd C:\Program Files\Mozilla Thunderbird
exitNow, that should work fine, and it seems to work - it runs all of it until "thunderbird.exe". Now, as far as I can see, it runs the thunderbird line (as the program appears), however, it will NOT run the exit line UNTIL I close thunderbird... I tried switching up the order and it definetely seems to be a problem with thunderbird - anything after launching thunderbird will not run until thunderbird has been closed... Why?Help?

A:Command Prompt Batch File Not Fully Running

I suspect command line parameters to start and exit are needed. I just checked google, so this might get you startedhttp://kb.mozillazine.org/Command_line_arg...s_(Thunderbird)Hey, have fun learning the stuff. So every one of those started and exited properly before going to the next or was it all asynchronous and you watched'm all at one time? Just curious.

Read other 4 answers

I have a VPN connection that I works fine when the following is entered from command prompt:
rasdial name id password
However - when i try to issue this same command withing a bat or cmd file it fails with a Remote Access Error 623
Im trying it like this
rasdial vpnname username password /phonebook:"location of phonebook"

Any ideas?

Read other answers

I'm trying to launch an Access 97 database with a link table from a dos batch file that is executed by the AT command. My environment is an NT Server w/SQL on top. I'm trying to automate a export/import process using Access to filter and save the data into a text file to be imported into another application. The problem is when the batch file is run from the AT command I get a login prompt for the link table. When I run the batch file alone it doesn't do that. A login/password isn't necessary to open the database either. I don't know if I need a switch when opening Access or a switch for the AT command or if I need to recreate the ODBC drivers with a login or password. I need to know where to go from here.
My AT command is
AT 14:00 /interactive "c:\juris.bat"
My Juris batch file is
@echo on
cd program files
MSACCESS "c:\access\juris.mdb"
I would appreciate ANY info, thanks.

A:Receiving login prompt when running batch file from the AT command.

This could be so many things but first I would check the file permissions on the server it sounds like your login does not give you full acces or because your running from dos you have not logged on the server

Read other 1 answers

Ok, I've got an extremely old version of DOS that needs to launch a batch file that requires cmd.exe .

For this reason there are two things I can't do. I cannot simply launch the batch file by entering in the path\filename and i can't use "start Path\filename" because start is a relatively new addition to the DOS.

So what I'm looking for is something I can type into an OLD version of dos that will call up the CURRENT CMD command prompt, execute the batch file, and then close.

So far... I'm lost.

A:Alternative ways to launch a batch file from the command prompt?

How about double clicking or drag and drop?

Read other 4 answers

does anyone know how to make a batch file where you could start ,disable , stop and manual for a service from the command prompt ?

for example instead of going to services.msc and right clicking on a service then clicking on properties then making the startup to be manual,automatic or disable . I could do with a batch file where i would just launch the batch file and it would make the startup to manual and then disable the service that i want to disable.

A:How to make a batch file on starting and stopping services from command prompt ?

Aside from the obvious, what is it you're trying to accomplish? What services do you want disabled at one time but not another?

Read other 15 answers

My batch file, containing MySql,  runs fine thru command prompt but not as a scheduled task in Windows Task Scheduler. 

The first two lines of the file run fine but the third line for MySql does not.  Don't know if the problem is MySql or maybe security.  I submitted this on the MySql forum as well.
Batch file is as follows: 

@echo off 
cd c:\program files\mysql\MySql Server 5.7\bin\ 
MySql -u%1 -p%2 -D%3 < %4 
Error is 2 which is file not found

It is called thru scheduler as follows under the Actions tab: 

Program Script: RestoreInvoices.bat 
Add arguments (optional): "root" "xxxxx" "invoices_backup" "p:\InvoicesRestore.sql" 
Start in (optional): C:\Users\akushner\ 

The first two lines in the batch file run just fine but it blows up on the third line (the MySql line). Just cannot run the batch file thru Windows Task scheduler. windows 7

Read other answers

how can i bring Control panel to desktop using batch file or registry key or command prompt

Read other answers

any help, I have looked in the internet but the tutorials there are no good, HELP!

A:How does command prompt work?

Quote: Originally Posted by Gackybelton

any help, I have looked in the internet but the tutorials there are no good, HELP!

Well, what do you want to do with it? It has far to many uses to list.

Read other 9 answers


I am new to program and deisgn and I am working form a Video tutorial while I am using the operating system Windows XP. I am trying to use the command prompt feature. In this video tutorial the instructor is using operating system Windows Vista.

In opening command prompt I find there is a differnce in the first line of the coding in eighter operating systems.

In windows XP the first line in the coding displays as follows:

C:\Documents and Settings\Henry>

In Vista the first line appears as follows:


When using command prompt In XP I have this first line by default:

C:\Documents and Settings \Henry>

From there I add the following cd\

Which makes the line look like this

C:\Documents and Setings\Henry>cd \

Then hit enter and type in the next line:

C:\cd cs

Then hit the Tab key. From there all of my information should display in command prompt. Nothing happens.

While the instructor in the tutorial manages to use command prompt while using Vista I trying to duplicate the same using Windows XP. But I do not get the same results as the video instruction does. This is the first step in the command prompt process I am trying to work with. There are more commands to come in the program. Is there some way that I can adjust the coding in the first line that appears in the command p... Read more

A:How Can I get Command Prompt To Work

Hello Henry,

It looks like the video is asking you to change directories ( the cd command). After you type "cd cs", you need to press enter, not tab, as that will tell the operating system to execute that command. As a side note, you may want to be sure that the folder named 'cs' exists on your computer. If not, you can create a new folder with that name by typing "md cs" and pressing enter.

Hope this helps.

Read other 4 answers

Hello all.

I've recently tried to work my command prompt and it will not work. I have no idea why but it just won't. When I use Run, and type 'cmd', and then come onto prompt, it doesn't work and gives me the message:


C:\Documents and Settings\Name>nslookup
'nslookup' is not recognized as an internal or external command,
operable program or batch file.

Thanks for any help.

A:Command Prompt Doesn't work?

I had a similar situation a long time ago, and was only able to repair by doing a non-destructive recovery. Like to find out what others know about this as well...

Read other 5 answers

When I try and use the command prompt I this this msg

C:\windows\system32\autoexec.nt. The system file is not suitable for running MS-DOS and Microsoft Windows applications. Choose 'Close' to terminate the application.


A:command prompt wont work

Well, first of all the "command prompt" you want to use in XP is cmd not command

The older version will normally run, but not with respect to everything.

Other issues with respect to "autoexec.nt" can usually be resolved by restoring it if it has changed or become corrupted.

These folks have provided an all in one restore for similar such problems, see Elvandil's post here:


Read other 2 answers

command prompt won't recognize commands

A:command prompt doesn't work

Hi nreeves2, welcome to TSF !

What commands are you trying to run ? When did the problem start and what's the last thing you did on the computer beforehands ?

Go to start => run and type cmd, do you get into the command prompt window ? If so type path and report the result.

Read other 1 answers


My command prompt somehow dosn't seem to work like i want it to. E.g. I want to enable the administrator account. So i type: net user administrator /active:yes
Or i type ipconfig /all or getmac to get the mac address.

No matter what command i type i get the message: 'something' is not recognized as an internal or external command, operable program or batch file

I tried to run command prompt both admin and as common user.

Have anyone any suggestion for what i can do?



A:command prompt dosn't work

You get this error only when you don't type it correctly. Try typing simple commands like diskpart or ipconfig and check what comes up.

Read other 9 answers

it's weird, i've been trying to port-forward but I can't because my command prompt won't work! when I type Ipconfig/all it says...

___'ipconfig' is not recognized as an
___internal or external command,
___operable program or batch file.

A:My command prompt doesn't work, help!?

Welcome to TSF!

I'm assuming you are typing Ipconfig/all into the Command Prompt, so you Command Prompt is workiing, it's ipconfig that seems to be MIA.

Have you looked to see if it's actually present? It should be in Windows\system32
If it's there, type the following into a Command Prompt window to see if the system can find it:

For %I In (ipconfig.exe) Do @Echo %~dp$PATH:I
It should display C:\WINDOWS\system32\

If it shows ECHO is on. instead, then ipconfig.exe is either missing, or your path statement is missing the System32 folder.
type Set path to display the path statement. You should see at least the following three folders on the Path= line:
C:\>set path

I'm assuming you can connect to the Internet on this PC?
What version of XP, and what Service Pack are you running?


Read other 1 answers

Hi guys

I have run into a problem that i just cannot seeme to get to the root of, and im rarely resorting to posting on forums but i really need guidance from some people who might be able to help me bughunt where the problem could be.

here is a description of the problem :

I am running a .bat file that contains takkill /f /im command, and everything is fine and dandy, when running the .bat taskkill works like a charm , same when using a cmd for the command.

I do however use a system that allows me to launch the same .bat file through another executable. i use this system all the time for many batch launches in order to make many machines run the same batch file, and have had no problems with it whatsoever in the past, all it does is launch the same .bat file that have proven to work ok.

however when launching the .bat through the above system taskkill.exe gives the somewhat nonedesciptive error : "ERROR: The specified module could not be found".

I have tried tried many things in order to find out why the .bat command would give different results depending on how it is launched. If i try running tasklist.exe without arguments to just produce a list of processes, the result is the same and this makes me conclude that it is the actual executable (taskkill.exe/tasklist.exe) that refuses/fails to start when the .bat is launched through my system.

just for info i have tried to "cd C:\windows\system32\" before making that .bat launch, allso... Read more

A:Curious behavior by taskkill.exe/tasklist.exe

Do results change if you run the .bat file "as Administrator"?

Does Event Viewer log the error with any more detail?

Is this the only problem the machine has?

Read other 19 answers

hi guys! lately i've been having some problems with my windows xp command prompt.

whenever i type in a command i always receive this message:

"[any]" is not recongized as an internal or external command, operable program or batch file.

"[any]" would be any command i type in like "edit" or "ipconfig".

i've looked around but i'm still confuse as to how i can fix this. i also noticed i can't seem to get into safe mode (tapping F8) on boot up. has anyone ever came across this problem before?

thanks in advance!

A:my windows xp command prompt doesn't work

Does this only happen in Start>Run and type in or in the Command Prompt from the Start>All Programmes>Accesories menu as well?

Read other 2 answers

Ah, I just love finding new problems with these machines I work on. It would be nice if they all had the same or similar problems, but NO... Anyway, an eMachines PC I'm working on now will not carry out commands entered at the command prompt. I type in MSCONFIG, it does nothing. I type in REGEDIT and, for a split second, the REGEDIT window opens, then quickly closes. So, instead of using Start > Run, I went to the command prompt and entered the same commands. Same result. So far, I've found Internet Optimizer and deleted related files/folders. I'm getting ready to run more "diagnostic" software, but if anyone has any ideas out there, I'm all ears... Thanks!

A:Solved: Command prompt commands won't work

This computer, I swear, has a mind of it's own... Okay: As with a few of the machines I've worked on down here in the basement (Mulder? You down there?) it won't recognize the network when plugged in—which is to say that I can't get to the internet. That's a problem because I wanted to run Spybot and it updates before it runs. So, I installed AVG antivirus. I discovered, as others have, that it hangs on the msobshell.dll file. So that makes two otherwise effective software programs useless. Does anyone know of a FREE utility (the store isn't spending money on this type of software) that I can download onto a CD from one machine to run on the infected one? HEY!! IT WORKED!! Was rebooting that PC as I was typing this. I can now run MSCONFIG and Task Manager will open. If I have additional problems, I'll let ya know... Thanks. [So: AVG Antivirus was helpful after rebooting machine.]

Read other 1 answers

I am running Hyper-V on Windows 10.

I am using the PC for media playback / gaming in big screen and rarely see the desktop. I have an service running and APP on my phone, so i can start batch files and programs without the need for a KB/M.

I have just setup a VM, but i dont want it running all the time, i just want to use it to do some video rendering or whatever when i need it to, i especially don't want it to be running when playing games.

so is there a way i could write a batch file or VBS to start the VM (not connect) then i could connect to VM via remote desktop on my laptop (or other machine)

and another batch file to turn it off, when i want to do some gaming?

i have googled for about an hour but came up empty

Read other answers

Im learning to programme and I wanted to do some of my work at home.
So i downloaded jdk 5.0 (from sun.com) and jEdit.
I wanted to compile the 'programme' i'd just written with Command Prompt, but whenever i type javac something.java
it says dat javac is not recognized

Ive been told to add the input/output txt files into a specific folder and then go to my computer>properties>advanced>environment....
In the user, i added CLASSPATH
and the other one already had a 'Path' and there i pasted the directory where the input/output tct can be found.
And then i restarted the pc.
But i keep getting the same msg..
And i think the command : java
doesn't work either

I checked around online and they said that i should check in the folder 'bin' if there was a javac.exe and a java.exe if there weren't any, then sth went wrong w/ the intallation.
I re-installed it and there it was.
But Command Prompt still doesn't recognize the command.

A:"javac'' and ''java'' won't work (Command Prompt)

Read other 12 answers

When I try to use ctrl-alt-delete to brring up the task manager, it doesn't work and when trying to use programs that use command promt, a message appears that say it is beign used by another program. Both task manager and command prompt work in safe mode but not in normal mode. I have ran several virus scans and spyware removal tools but they still dont work. Here is my HijackThis log. Thank you in advanced.

Logfile of HijackThis v1.99.1
Scan saved at 6:53:16 PM, on 12/20/2006
Platform: Windows XP SP2 (WinNT 5.01.2600)
MSIE: Internet Explorer v7.00 (7.00.5730.0011)

Running processes:
C:\Program Files\Adobe\Photoshop Elements 3.0\PhotoshopElementsFileAgent.exe
C:\Program Files\Common Files\Command Software\dvpapi.exe
C:\Program Files\Adobe\Photoshop Elements 3.0\PhotoshopElementsDeviceConnect.exe
C:\Program Files\Common Files\New Boundary\PrismXL\PRISMXL.SYS
C:\Program Files\CyberLink\PowerDVD\PDVDServ.exe
C:\Program Files\Digital Media Reader\shwiconem.exe
C:\Program F... Read more

A:Task Manager and Command Prompt doesn't work

Hi and welcome to TSF.

I am currently reviewing your log. Please note that this is under the supervision of an expert analyst, and I will be back with a fix for your problem as soon as possible.

You may wish to Subscribe to this thread (Thread Tools) so that you are notified when you receive a reply.

Please be patient with me during this time.

Read other 11 answers

Hi, thank you for taking your time to read this.

As the title suggests, my command prompt will not work. Everytime I tried opening it through start>run>cmd, or %windows%\system32\cmd.exe, or just clicking on it, my screen refreshes for 2 seconds where the task bar disappears and reapears, and all explorer windows are closed afterwards.

I suspect it could be the Conflicker worm since my windows automatic updates wont turn on. I tried reinstalling service pack 2 and it seemed to be fixed for a while, but the problem came back the next day.

I've been using Mcafee for a few years now. Recently the scans seem to be picking up a file called KeepMainM.cab that i cant seem to remove. I've tried to remove it manually, with Malwarebytes, and FileKill but the problems with command prompt persists, so i'm not sure if its connected. Also, I cannot seem to open Mcafee.com with IE or Firefox.

For some reason my scans with scaning software seems to be quite slow. Malwarebytes, McAfee virus scan, and Microsoft Windows MSRT scans all ran for over 15 hours until they finished, and saying nothing was found when it was finished.

Also, I recently did something to set my PC back to factory configuration (not sure what its called, but windows reinstalled and hardrive was left intact), and the problem with Command Prompt occured afterwards. Not sure if that helps.

I really dont want to have to completely reformat my PC, and thanks for the help.

Logfile of Trend Micro Hij... Read more

Read other answers

This is for my sister,I hope someone can help us out...

her computer is a windows 7.It shut down one day while she was at work.Message said, computer shut down improperly, so she rebooted it.. it started in safemode. wouldnt go any where else... so we tried the f8 and command prompt and it opened but as soon as she started to type in user passwords2 the command prompt closed and rebooted the computer to the windows log on screen with her password in the "user" box, we cant get it to do anything, and the command prompt wont let us type in anything.. each time it jumps back to the windows logon.. we tried password reset but it also asks for a password then when she types it in says wrong password..she cant remove the user name in the box and every PW she puts in.. she went and bought a usb disk thinking we can create a password disk well it wont work when it comes to the option to choose cd/dvd or usb.. nothing... what else can we do.Im trying to help via phone.. Can I create a password disk for her on my computer which by the way is not a win7 I have a Dell exp... is there a full working one I seen many trial are they any good? Can someone please help us..

A:Windows 7 logon Locked out Command Prompt Wont work

Here is a tutorial for using the Offline NT password program- I've lost the password to my Windows Administrator account, how do I get it back?

The website to download has been changed to Offline Windows Password & Registry Editor

Notice that if you want to use a CD, you have to burn, not copy the .iso file on the disc.

Read other 1 answers

I'm on Windows XP Professional, Dual-Booting RedHat Linux 9 (Just upgraded from 8)
This is very odd. I recently found a folder in my recycling bin called Jgl_Rt ( I think it was after I installed the new Freelancer demo from PCGAMER. . . or perhaps when I transfered a zip file with a bunch of jpg's I had scanned from my grandma's house) so I was curious, and dragged it onto my desktop to take a look inside. I couldn't open the folder, because it said access denied, and I couldn't delete it. I tried to change the read-only attribute under properties and it said access denied. I tried to scan the file with 3 different anti-virus software. Avast! Home edition, Norton 2003, and PC-Cillin 2002. None of them were able to access the file, therefore, they couldn't scan it. Now, almost all the jpg's and zips on my computer, as well as many random files around my computer are locked in place. They now have the same symptoms of that folder. A few of them I was able to fix when scanning and choosing repair, which I could then delete. . . but that only applied to a few files, and not all of them. No virus was detected yet on my computer. What the hell is going on!? I tried checkdisk, and defragmenting my drive (Why did I think defragmenting would help, I have no idea.).
Eventually I got rid of jgl_rt by doing a system restore point, but that made a few other folders do the same thing. . . I got a few of them to delete in command prompt under safe mode wi... Read more

Read other answers

recently,i uninstalled all Malwarebytes software and from then I was unable to open .exe files,not even command prompt and regedit and getting error as "no such interface supported".i tried all the methods like changing registry values(I
can open cmd in safemode options and through that I can access regedit and import Exe.reg but changes regains while restart) and sfc /scannow but nothing works me.so please get me out of this,thanks in advance

Read other answers

Here's an anomaly.

In my W7 Ultimate Administrator Command Prompt, I'm trying to set the colors as follows:
Screen Background: 192, 192, 192
Screen Text: 0, 0, 255

You can see the selection area by right-clicking the Title Bar (or the little black box at top left) and clicking Properties or Defaults.

My preference (RGB numbers above) is a light gray background with bright blue text.

Problem is, the background won't stay set. It keeps reverting to a murky green, 128, 128, 0.

No problem, says I. The colors can be set in the registry. But can they?

Here's the rub. Under the key HKEY_CURRENT_USER/Software/Microsoft/Command Processor, the Set DefaultColor command only works for a 2-character combination of 0 to 9 plus A to F. You can see the same thing working in the Command Prompt box itself. If you type 'color' followed by say, f0, you'll get black text on a white background. color 0f will get you white text on black. And so on.

Now, if you Google for 'command prompt colors' you'll get umpteen pages like this one that show the colors represented by the 16 characters:


Have a look for 'gray' in any of those charts and you'll find it's represented by the numeral 8.

But go back to the palette in the Command Box and you'll see that there are TWO grays. And the gray that 8 gets is a DARK gray, not the LIGHT gray beside it on the palette.

So if I type color 89 in the box, I get blue text on a DARK gray background, not t... Read more

A:Command Prompt Color - Registry setting doesn't work for this combo.

Hi Teckneeculler,

Instead of changing colour defaults globally, I suggest you create a shortcut to Cmd.exe on your desktop, then make your desired colour changes in the Colours tab of the shortcut's Properties pane.

Avoid making changes under "HKCU\Software\Microsoft\Command Processor". All command prompt sessions will always be overridden with these preferences. That means if you change the value of DefaultColor you'll be stuck with the colour profile on all command prompt instances until you revisit the registry and reset its value back to 0.

To automatically reset the global defaults you've changed, I've attached a registration file you should merge.

Read other 4 answers

I run VLC from command line on Windows 7 Pro x64 with this command:
vlc.exe -I telnet --telnet-password=1 dshow:// ":dshow-vdev=none" ":dshow-adev=" ":live-caching=300" ":sout=#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=mp3,dst=:8080/}" :no-sout-rtp-sap
:no-sout-standard-sap :sout-keep

It's start and work. I can connect to with another VLC and listen audio from my microphone.
But when I run this command from bat-file, VLC start and not work. I cann't connect to
I can connect to VLC with telnet, but command "get_time" give 0. Another commands give the same output when VLC broadcast audio from microphone correct (info, is_playing, playlist, get_title). When I run VLC from command line it work correct: "get_time"
give correct number of seconds.

When I run this bat-file from command line manualy VLC run and work correct. If I run bat-file I cann't connect to but I can connect to VLC with telnet and all commands say that it's playing broadcast audio. Only "get_time"
give 0.

I want run VLC from task manager and then stop it.
I created question on  VideoLan https://forum.videolan.org/viewtopic.php?f=14&t=141468
But I assume problem in Windows command line promt.
Why the same command can give different result in command line and in bat-file? How can I solve this problem?

Read other answers

I am having problems running some batch files I use to start and shutdown Avast Anti-Virus

the BAT files are in the install file and I have shortcuts pointing to them

the start up one works, but the shut down one only kills the service and wont kill the process..

here is the code:

NET STOP "avast! Antivirus"

tskill AvastUI

I have tried tskill, taskkill, using /PID 912 and /IM with and without .exe on the end of the process name

Iam at a loss as to why its not working? the CMD Prompt window seems to execute the order but the process is still running?
anyone help?


Read other answers

I installed Win XP SP1(Home) over Win98SE 10 days ago and when I try Start-> Run-> cmd-> tasklist /svc it tells me that "tasklist is not recognized as an internal or external command, program, or batch file". I was led to believe that this command worked in XP so am I missing something here?

Thanks, Rob

A:[Resolved] Run->cmd->tasklist /svc - doesn't work

Read other 8 answers

Hi all, I am studying for the 70-686 Windows 7 test with a book by Darri Gibson. One of the exercises in the book is to perform a hardlink migration with USMT. I had an installation of Windows 7 with a few files in the music, documents, and pictures folder, and then I performed a new installation of Windows 7 on top of that, which put all the files and settings from the previous Windows 7 installation in the Windows.old folder on the C: drive. I installed the Windows AIK (Automated Installation Kit) and USMT on this new system.
Now I just copied the code to migrate the data from the Windows.old folder from Darril Gibson's book and made it into a batch file. The problem is, when I go to run the batch file, I get the following error: "The filename or extension is too long". Below is an exact copy of the code. What do I need to change to get this working? I've tried putting all the paths in parenthesis but I still get the same error.

cd "c:\program files\windows aik\tools\usmt\amd64" rem scanstate.exe c:\store /v:13 /o /c /hardlink /nocompress /efs:hardlink /i:migapp.xml /i:migdo
cs.xml /offlinewindir:c:\windows.old\windows rem loadstate.exe c:\store /v:1
3 /c /lac:magawin /lae /i:migapp.xml /i:migdocs.xml /sf /hardlink /nocompress

A:USMT Hardlink Migration Batch File Won't Work

Tim we cannot help you with your homework here. You are supposed to figure this out on your own. This thread is now closed.

Read other 1 answers

I got a batch file includes backup file and delete 7 days older bak files. The batch file works by click the batch file.  I put the batch file at the Windows task schedule. It run the backup part not deleting part.
My PC is W7 X64
forfiles /p "G:\DB-Frontend-Bak" /s /m *.* /d -7 /c "cmd /c del @path"
forfiles /p "G:\DB-Backend-Bak" /s /m *.* /d -7 /c "cmd /c del @path"
Why? Any help will be appreciated.


Read other answers

Hello all,

I am trying to write a batch file that will rebuild the Windows Media Player library automatically but I'm a little confused, perhaps someone can enlighten me

I wrote the following based on this:

How-To Rebuild Your Windows Media Player 12 Library


echo msgbox"Warning, this will close Windows Media Player",16,"Warning!" >> popup.vbs
WScript.exe popup.vbs
del popup.vbs

sc stop WMPNetworkSvc

TASKKILL /IM wmplayer.exe /F
TASKKILL /IM wmpnetwk.exe /F

set WMPDIR=%USERPROFILE%\AppData\Local\Microsoft\Media Player

mkdir %WMPDIR%\TomBackup
copy %WMPDIR%\CurrentDatabase*.wmdb %WMPDIR%\TomBackup
copy %WMPDIR%\LocalMLS*.wmdb %WMPDIR%\TomBackup
del /F /Q %WMPDIR%\CurrentDatabase*.wmdb
del /F /Q %WMPDIR%\LocalMLS*.wmdb

echo msgbox"Windows Media Player Library Rebuilt",64,"Process Completed!" >> popup2.vbs
WScript.exe popup2.vbs
del popup2.vbs

sc start WMPNetworkSvc
start %PROGRAMFILES%\Windows Media Player\wmplayer.exe
start %PROGRAMFILES%\Windows Media Player\wmpnetwk.exe
And as you can see, my batch file does (in theory) exactly what that tutorial suggests but it does not work! When I run it it it all seems to work, apart from this part:

mkdir %WMPDIR%\TomBackup
copy %WMPDIR%\CurrentDatabase*.wmdb %WMPDIR%\TomBackup
copy %WMPDIR%\LocalMLS*.wmdb %WMPDIR%\TomBackup
del /F /Q %WMPDIR%\CurrentDatabase*.wmdb
del /F /Q %WMPDIR%\LocalMLS*.wmdb
The di... Read more

A:Rebuild Windows Media Player Library - Why wont my batch file work?

Originally Posted by tom982

set WMPDIR=%USERPROFILE%\AppData\Local\Microsoft\Media Player


You need to enclose the: -

%USERPROFILE%\AppData\Local\Microsoft\Media Player in "" (Quotes) for it to work. OK?

set WMPDIR="%USERPROFILE%\AppData\Local\Microsoft\Media Player"

Read other 6 answers

Hi, I have Vista Home Premium 32-bit with Intel Pentium Dual CPU T2390. For
some time the "open destination file" command doesn't work. It was too far
back to use system restore point, plus I've installed a lot of software since than and don't want to redo it.
Any help would be appreciated.
Thank you!

A:open destination file command doesn't work

Where should "open destination file" appear? -- what function are you performing?

Read other 14 answers

I have Dell laptop which come with OEM. I read a lot then the only solution is to download from Windows creation tool by Microsoft.

Problem is, once I boot from the USB or DVD which the tool provides. It stuck at command prompt. I tried use legacy boot and Uefi boot. Result are same.

Anyone getting same issue?

Read other answers

The command prompt window keeps flashing and I don't know how to make it stop. It says "access is denied. The system cannot find the path specified." Writing this post is difficult because it keeps interferring. Please help! This is the computer I use for work

A:Command Prompt Window Won't Stop Flashing

Read other 7 answers

Hi guys,

I have a task from my belkin flip KVM that loses its task icon pretty frequently, but the process is still running.

I've made a batch file

taskkill -IM flip.exe
this works fine in killing the flip.exe

what i'd like though is kill the exe then pause for 4-7 seconds and then start the flip.exe again. I'm not a programmer in any way, so if anyone can help it would be great.

(it's driving me flipping mad!) LOL

A:creating a batch taskkill?

got reference for a pause...but I'm not sure if I'm implementing it correctly....and the start command just makes the cmd window stay open and flip doesn't start. again syntax is totally wrong me thinks.

taskkill -IM flip.exe
PING -n 1 -w 5000 >NUL
START "C:\Program Files (x86)\Belkin\Flip\flip.exe"
anyone got any ideas?

Read other 2 answers

hi. was wondering i'm trying to create batch that kills all processes but not batch itself so far:

@echo off
taskkill /F /FI "USERNAME eq testuser" /FI "WINDOWTITLE ne KILLALL" /FI "IMAGENAME ne cmd.exe" /FI "IMAGENAME ne kill.bat"
pause > nul
echo done!
so far taskkill kills batch file too! any ideas?

A:how to taskkill all processes using batch but not itself?

Hi, well if you kill all tasks.... what are you trying to achieve maybe something simple like:-

taskkill /im explorer.exe /f

Read other 5 answers

I am wondering if anyone can provide the equivalent to this linux script. When run against a text file with one entry per line being the name of a directory, it deletes the named directories.

On linux, I run this against the text list.
while IFS='' read -r line || [[ -n "$line" ]]; do
rm -R $line
done < "$1"

I am not sure how to make it do the same for Windows. I can do this, but I'm hoping there's a way to delete based on what's in the text file. Also, wouldn't want it to prompt for deletion of each, but to just delete.

@echo on
cd \
dir /D /N 0
for /D %%f in (XX*) do rmdir %%f /s
%comspec% /k

Thank you

Read other answers

Hi Guys,

I want to make one batch file which daily copies yesterday's files from one folder & paste it to another folder.

C:/111 folder has following files.
1.zip had yesterday's date
2.zip had yesterday's date
3.zip had last sunday's date

now, when i will run batch file today, it only copies 1.zip & 2.zip & move to another folder C:/222

So C:/222 contains following
1.zip had yesterday's date
2.zip had yesterday's date

Please note , i have to run this batch file daily which should not require any changes.

Read other answers

When I try to use the tasklist command from command prompt on a remote computer using Windows XP, it comes up asking for a password. I am a local administrator on the remote box but when I type in my password it keeps saying login invalid. I have tried logging in as the administrator to the domain and kept the same message. It only happens on this one remote box. I can ping it fine or use remote desktop connection with no issues. It used to work fine in the past and I am able to use tasklist on other computers in the network with no issues.

Any suggestions?

Read other answers

Hey Guys,

I have 3 DOS scripts that has to be merged into one .bat file . Basically i am trying to clean the temp files and getting the svn update and compiling and publishing the .net webapplication. below are my individual scripts.

to clean the file :

@echo off

echo *** Deleting ASP.NET temporary files (.NET 4.0)... ***

echo Deleting 32-bit files...
rmdir "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root" /Q /S

echo Deleting 64-bit files...
rmdir "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root" /Q /S

to get svn update :

@echo off

echo == Initiating system instance variables...
echo. -- Setting the variables...

:: Here you need to make some changes to suit your system.
set SOURCE=D:\Nutrition_Build\Trunk
set SVN=C:\Program Files\TortoiseSVN\bin

:: Unless you want to modify the script, this is enough.

echo. %SOURCE%
echo. %SVN%
echo. ++ Done setting variables.
echo == Updating source from SVN
echo. -- Running update...
"%SVN%\TortoiseProc.exe" /command:update /path:"%SOURCE%" /closeonend:2
echo. ++ Done.

echo. -- Cleaning up...
set SVN=
echo. ++ Done.
To compile and publish:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_compiler.exe -v / -p "E:\Sample\Myproject\Src" -u -f E:\BuildOutput\
Please help me on merging this three scripts into one file.


A:DOS command in batch file

Looks like you could simply merge them as I don't see any branching being done (no goto).

Read other 3 answers


I want to calculate the no of lines in a file. and also to read the last line of that file.

Read other answers

<This post has now been solved>


Sorry if this is not the place but does anyone know how to do the following?

I am trying to create a batch file to search a directory for a specified file type and list it in a text file then get the batch file to read that text file and copy all the files it found to a directory.

i have created the following which does work... the problem is, when there is a space in the filename it says it cant find the file, i don't know how to get it to include spaces i would normally by using " ??

dir /s /b c:\source\*.txt >c:\files2copy.txt
for /f %%i in (c:\files2copy.txt) do xcopy %%i %%j %%k c:\dest
Any help will be greatly appreciated.

A:Batch File - For Command??

Hi JDobb, is there any reason that you cant do a two step process? Like create your list, then go back and have XCOPY work on the original directory. XCOPY is works fine for me with spaces in the file names, and it is designed to work on multiple files, where it looks like you are using it on individual files in the for loop.

xcopy "*.txt" J:\test\test2\*.*

here is a backup file that I use now and then

@echo off
@echo Process saver run history
@type 00SaveProcesses.log

echo this will backup the "Processes" folder to the primary backup (\\LEN\L)
xcopy c:\users\PB\datapart\Processes\*.* \\len\Processes\*.* /s /d /y /f /c
::/y suppress overwrite prompting
::/f display full file names as copying
::/c continues on error
::/s subdirectories
::/d only newer files
echo complete %date% --- %time% >> 00SaveProcesses.log
I have several other varations of this basic idea if you work best from examples.

Caution, while you are working this out, Use the /L flag on XCOPY to check that it is going to work before running, or in your for loop

do @echo xcopy %%j ...
to show what it is going to do before you do it. Remember that the commandline has no pity, and it will eat your lunch without asking.

If you want to use the FOR loop, check in help where it describes the /F "options" part. You have to be careful with the "delims=..." section to get it right.

and be especially careful using batch code that you... Read more

Read other 5 answers