Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Killing the process using a long file name

Posted on 2004-08-12
18
Medium Priority
?
1,077 Views
Last Modified: 2010-04-14
Is it possible to kill a process in Windows 2000 Server from the command line when the only information you have is the long file name?
0
Comment
Question by:billy21
  • 6
  • 5
  • 4
  • +3
18 Comments
 
LVL 65

Accepted Solution

by:
SheharyaarSaahil earned 500 total points
ID: 11786909
Hello billy21 =)

try to make it shorter.... like e.g the process name is ABCDEFGHIJKLM.exe
try making it ABCDEF~1.exe
means the first six characters, then a ~ then 1, then extension
0
 
LVL 6

Author Comment

by:billy21
ID: 11786929
What if it's ABCDEF~2.exe or even ABCDEF~6.exe.  Is there a more certain way?  Or even a way to find out the specific short name?
0
 
LVL 9

Assisted Solution

by:jdeclue
jdeclue earned 500 total points
ID: 11786935
Yes... you need the Windows 2000 server resource kit, there is a tool to kill the process. If someone else doesn't reply first, I am off to see if I can find the name and how I did it.

J
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 9

Expert Comment

by:jdeclue
ID: 11786949
Ok... forget that. What are you using to kill the process now. I use to be able to use the command line to view all of the processes, search them, and then pass the PIDs to the kill app.

j
0
 
LVL 65

Expert Comment

by:SheharyaarSaahil
ID: 11786953
:)

my dear if u will goto Command Prompt and will try to see the files with names more than 7 characters.... u will see that all of them have been shorten to ABCDEF~1.exe..... DOS shortens all Long File Names using this format.....

why dont u give it a try urself..... start command prompt and try to search for long File Names..... u will get the idea :)
0
 
LVL 6

Author Comment

by:billy21
ID: 11786974
Yes but if I have three files..

ABCDEFGHIJKLM.exe - This would be called ABCDEF~1.exe
ABCDEFGHIJKLA.exe - This would be called ABCDEF~2.exe
ABCDEFGHIJKLB.exe - This would be called ABCDEF~3.exe
0
 
LVL 6

Author Comment

by:billy21
ID: 11786997
I used to have a command line utility that could even kill a process remotely.  Can't remember what that was called.  It could provide a list of PIDs too.
0
 
LVL 9

Expert Comment

by:jdeclue
ID: 11787001
Yup.... when you do that use "DIR /X" to see the short names.

J
0
 
LVL 9

Expert Comment

by:jdeclue
ID: 11787013
How about a real scenario... what exactly are you encountering? No if I's please. ;)

J

0
 
LVL 65

Expert Comment

by:SheharyaarSaahil
ID: 11787031
yes i know that :)

but are u trying to say that all those files wud be running in background,,,,, first of all its a rare case that u will get such type of coincidence,,, secondly if by chance u have it,,, then im sure they all are not in the bakground processes.... when u will use the shorten name.... it will only kill the process of its running,,,, if its not running then it will give u an error...... !!!!

Are u trying to do it more Professionally :)
0
 
LVL 6

Author Comment

by:billy21
ID: 11787053
Sorry.  Someone just asked me this question.  i'm not certain of all the details.  He's gone home now.  We are programmers.  I'm guessing he needs to come up with an automated process.
0
 
LVL 6

Assisted Solution

by:nomi17
nomi17 earned 500 total points
ID: 11787080
Here's a Command Line process killer that you may want to try out (it's freeware):
http://www.beyondlogic.org/solutions/processutil/processutil.htm
0
 
LVL 9

Expert Comment

by:jdeclue
ID: 11787084
OK... developers... now that is a different story... from a development point of view it is much easier than scripting it. You can easily right a process that sees them with there long file names.
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 500 total points
ID: 11787100
Use 'pskill' (http://www.sysinternals.com/ntw2k/freeware/pskill.shtml), e.g.

pskill TheProcessHasAReallyLongWoundNameButICanTypeIt.exe

usage: pskill [-?] [\\computer [-u username] [-p password]] <process name | process id>
0
 
LVL 6

Author Comment

by:billy21
ID: 11787103
For some reason he needs to do it from the command line.  Since I have no more info I might just end this here and split these points so not to waste your time.  I have a bunch of suggestions for my colleague so thank you all for your time.

-Billy
0
 
LVL 9

Expert Comment

by:jdeclue
ID: 11787114
Wow, I have never seen so many people respond. I don't need points for this ;) Good luck.

J
0
 
LVL 9

Expert Comment

by:BigC666
ID: 11787120
howdy,

have a look at this http://www.xmlsp.com/pview/prcview.htm

this will kill a process and show the pid of all running.

hope that this helps
0
 
LVL 65

Expert Comment

by:SheharyaarSaahil
ID: 11787189
>> I have a bunch of suggestions for my colleague

lol :D
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question