mritter Posted September 27, 2008 Posted September 27, 2008 I just wrote some new code that uses tskill. I wrote it at work on XP Pro. Took it home, it would not work. Said file not found. After cussing at it I Google'd it and tskill is for XP and lower. Vista uses taskkill. No big deal. Or so I thought.Example:XP:tskill SleepVista:taskkill /im Sleep.exeExtra arg required and the .exe extension is required. Throws everyone's config file off if migrate from XP to Vista, or add a first instance on Vista it will not work.Anyone have or know of a Vista compatible tskill I could put in the Tools folder to keep backward compatibility?
Kelsenellenelvian Posted September 27, 2008 Posted September 27, 2008 Actually I just picked the one from XP sp3 pro and I use it in a couple of my addons for win 2000.
DJPro Posted October 2, 2008 Posted October 2, 2008 Hi Mritter,In vista i use:taskkill /F /IM PicasaMediaDetector.exe (for example)works all the timeGreetz,DJP
Kelsenellenelvian Posted October 3, 2008 Posted October 3, 2008 Thats the thing though djpro.XP Home and win 2000 do Not have taskkill.exe built into them. henceforth we have a problem.
mritter Posted October 8, 2008 Author Posted October 8, 2008 So I have been doing some thinking.............tskill should have been made into a system variable, %tskill%, from the very start. It wasn't, ah well, now it is going to make things a little harder for the end user.The only real soultion is to delete it from the drop-down box so it is up to the user to know which version to use: tskill or taskkill. AND how to use each one. See above.I don't see it being feasible for me to write code to check how the user calls the command. Too many headaches.If you have a problem with this, tell me now. Else it is headed for the cutting block.
Kelsenellenelvian Posted October 8, 2008 Posted October 8, 2008 Chop it or add the other to the dropdown box so that BOTH show. Either way I will adjust the manual so that it reflects your decision.
mritter Posted November 6, 2008 Author Posted November 6, 2008 I made a way to internally handle this problem. Now I need to know what OS uses what command.Vista: taskkillXP: tskill2000: tskill2003: ???2008: ???I am assuming if not Vista, then use tskill. Tell me if I am wrong.
ricktendo Posted November 6, 2008 Posted November 6, 2008 Vista does have tskillMaybe you vLited it and removed Terminal Services
mritter Posted November 6, 2008 Author Posted November 6, 2008 I did vLite it and probably did remove it. Sweet. Either way, code already done for XP/Vista. Can take it back out.Thanks
mritter Posted November 6, 2008 Author Posted November 6, 2008 Maybe not so sweet.I looked at 2 factory installed Dell's at work, neither had tskill. What Vista are you using, Ricktendo?
cluberti Posted November 6, 2008 Posted November 6, 2008 New Vista Ultimate SP1 x64 build has it in %windir%\system32 as version 6.0.6001.18000. The screenshot here shows version .22291, which appears to come from KB958652.So, if you don't have it by default, install 958652. However, I'm not sure how a Vista build is missing this file, as the hotfix installs for all versions (including the basic variants). I guess it's possible, though - maybe the folks who don't have it are running a specific Vista build or version?
CoffeeFiend Posted November 7, 2008 Posted November 7, 2008 Why even use an external exe for something so simple, instead of the Terminate method of the Win32_Process class? (fully documented on MSDN and all, just google it). Unless that doesn't work in a HTA (can't say I bothered trying).
mritter Posted November 7, 2008 Author Posted November 7, 2008 crahak: Great idea. Implemented it and works great. Thanks.
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