mpking Posted January 7, 2005 Posted January 7, 2005 I've been writing a script to remove a program. It requires that it be killed before it gets removed. I've been using ProcessExists to get the PID, and then ProcessClose if it's running and it works perfectly in Windows XP. However, when I move onto Windows 2000, It doesn't. When I view the process name in Taskmanager, the processname is truncated. The exectuable is SmartEnforcer.exe but it displays in Windows 2000 as SmartEnforcer.e Has Windows 2000 always been like this? Using pskill from sysinternals displays the same information. Any thoughts on how to work around this? I can add a second kill statement for SmartEnforcer.e but that's fixing the symptom. What's causing the problem?
mpking Posted January 7, 2005 Author Posted January 7, 2005 Ok, After another 30 minutes of searching, and trying random word combo's in google, I found my answer in a .NET forum.http://www.dotnet247.com/247reference/msgs/7/35219.aspxApparently in WinNT 4.0 and Win 2k, the process name is truncated to 15 characters.Go figure.I was actually surprised the ProcessExists and ProcessKill commands work in Windows98
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now