How to launch and taskill (without /F) a cmd.exe in Windows service?

Posted on 2012-09-04
Last Modified: 2012-10-02
I have 2 questions:
1) Is it possible to launch an interactive GUI application from a Windows service so that     the app runs as a normal app (not service)?

2) When I launch cmd.exe from a Windows service application, the cmd.exe becomes a service. Can I safely terminate it (taskkill without /F option)? Or is there another way how to terminate it?

Question by:tomasCZ1
    LVL 18

    Expert Comment

    1) no
    2) yes

    Author Comment

    Can you please tell me how to terminate cmd.exe service launched from a Windows service? Your help is greatly appreciated.

    thanks in advance.
    LVL 18

    Accepted Solution

    sc stop <servicename>


    taskkill cmd.exe

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
    A while back when OPSMGR 2012 was released we were very excited about getting it into our environment and upgrading our 2007 implementation,  we started our planning and we then proceeded with our implementation. All went as planned & our system …
    Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
    The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now