• Can DOS Batch file Tell Running Program to Exit

    Home » Forums » AskWoody support » Windows » Windows Vista, XP and earlier » Questions: Vista, XP back to 3.1 » Can DOS Batch file Tell Running Program to Exit

    Author
    Topic
    #502121

    I am running an old program in WinXP in VirtualBox and would like to be able to initiate a normal exit of that old program from a batch file but I don’t think there is any way to do that.

    Any ideas will be appreciated!

    Thanks,
    Bill

    Viewing 7 reply threads
    Author
    Replies
    • #1527732

      You haven’t said where the BATch file is running, but I presume also in VirtualBox.

      I know of no way to perform a normal exit, but you could kill the task.
      Not having XP any more I can’t go much further, but have a look at either KILL /? or TASKKILL.EXE /?, whichever applies to XP.

      Later…

      Some research and further thought says that TASKKILL is available in XP Pro but not XP Home (no idea why), and there is also the SysInternals command PsKill

      Note that I have no knowledge of the provenance of the download link for TASKKILL from the GreasyPC Blogspot link…

      BATcher

      Plethora means a lot to me.

    • #1527791

      Thanks Batcher for the suggestions. Yes, the batch file is running in VirtualBox.

      The reason for looking into this is that there is one data file in the virtual machine that needs to be copied into the normal file structure so it can be backed up normally. I need to read more about VirtualBox; maybe it has a provision for backing up a file in this kind of situation.

      Thanks,
      Bill

    • #1528571

      XP allows you to backup a file that is in use, as do later versions of Windows. Load a free backup program and backup the file locally (on the VM) then copy it to the required location.

      cheers, Paul

    • #1528761

      Thanks for the suggestion Paul. I’m not clear about whether or not it is possible to back up the virtual drive that contains the file, after the VirtualBox is closed. After all, that file is not any use to me except in the virtual environment because the program will only run in that environment. So, if I can just backup that virtual drive I’ll have my backup covered. I would appreciate anything you know about this.

      Thanks,
      Bill

    • #1528774

      The virtual disk contains all the operating system files as well as your program and data, so backing up the VD regularly may be overkill. My suggested backup method.
      Backup the VM files once. These can be restored to another machine if recovery is required.
      Backup the data files created by the application in the VM and copy them to to the physical machine. Do this regularly.
      Backup data on the physical machine regularly.

      cheers, Paul

    • #1528897

      Thanks Paul. I didn’t think of those system files being in the same place. I’ll go back and look at the situation again and go from there.

      Thanks,
      Bill

    • #1528944

      From someone somewhere in internet land, I got the following batchfile:
      rem BATchfiling Windows Update
      sc config wuauserv start=auto
      net start wuauserv
      C:WINDOWSSystem32wuapp.exe startmenu
      pause
      net stop wuauserv
      sc config wuauserv start=disabled
      pause
      exit

      The person who wrote this and the other ON & OFF batchfile was and still is a genius! 🙂
      I hope to give proper credit to that person!

      Meanwhile, maybe the above batchfile can be modified to work for you.

      "Take care of thy backups and thy restores shall take care of thee." Ben Franklin, revisted

      • #1529018

        Roland – I’d be happier about the BATch file you quote if the author had given some information about why the WUAUSERV service was originally stopped on the author’s machine.

        And even happier if the BATch file automatically caused the running of outstanding important updates, without merely bringing up the Windows Update menu!

        Hence the need for included explanations/comments in all BATch files…

        BATcher

        Plethora means a lot to me.

    • #1532695

      BATcher
      Roland – I’d be happier about the BATch file you quote if the author had given some information about why the WUAUSERV service was originally stopped on the author’s machine.

      And even happier if the BATch file automatically caused the running of outstanding important updates, without merely bringing up the Windows Update menu!

      Hence the need for included explanations/comments in all BATch files…

      This might be why, ( there are many issues with xp update, I just picked the one that had SOLVED).
      Came from another source.
      I am not sure if allowed or not to post the link, but I have saved it if anyone wants to know more.
      It says;

      Question

      How to fix windows update error

      Solved Answer

      Actually, Most of the windows update issues occurs due to the last windows update couldn’t updated properly or maybe get corrupted file. Once it get corrupted, you’ll get the error message while updating the windows and your windows can’t be update. That’s why it has stopped when you try to update your windows again. and give you a error message. might be have some more problem with windows systems files. Anyway, we have the proper solution to fix windows update errors. Here you learn how to re-register all the “dll” files that related to windows update and also learn how to get start working all the services related with Windows update, Please follow the steps mentioned below.

      I used a an alterantive search engine and get surprising results.

    Viewing 7 reply threads
    Reply To: Can DOS Batch file Tell Running Program to Exit

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: