Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Anyone can help me for an simple bat file?  (Read 3995 times)

0 Members and 1 Guest are viewing this topic.

lkoksoon

  • Guest
Anyone can help me for an simple bat file?
« on: March 22, 2007, 02:37:42 AM »
I'm newbie in learning the bat file. Just try to use it this 2 days.
Now i face a problem to writing a bat file.

if i want to close an application using the bat file, how can i write it?

Is it like this "shutdown -f (application_name) " ??

lordoftheplat



    Hopeful

  • teh god.
  • Thanked: 1
    Re: Anyone can help me for an simple bat file?
    « Reply #1 on: March 22, 2007, 05:11:43 AM »
    u know that doesnt do anything at all....well kinda just logs u off closing all app
    only does something if u go like
    shutdown -s -f
    that will force shutdown closing all application
    « Last Edit: March 22, 2007, 05:16:14 AM by lordoftheplat »
    zepperblood.deviantart.com

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: Anyone can help me for an simple bat file?
    « Reply #2 on: March 22, 2007, 06:03:18 AM »
    no lordoftheplat, without '-t 00' then it will shutdown the computer. Without it the computer shuts down in 30 seconds.

    That isn't what Lkoksoon wants....he wants a batch file to close a program. I don't know how to do it though.

    lordoftheplat



      Hopeful

    • teh god.
    • Thanked: 1
      Re: Anyone can help me for an simple bat file?
      « Reply #3 on: March 22, 2007, 06:18:22 AM »
      hmm u seem to not understand what i say carbon dudeoxide.... i just told him that
      using shutdown -f wont do anything....
      and wats up wif -t "00" i never even mention a single thing about time
      zepperblood.deviantart.com

      uli_glueck

      • Guest
      Re: Anyone can help me for an simple bat file?
      « Reply #4 on: March 22, 2007, 06:43:25 AM »
      To close a programm use the "kill" command.
      To find out the name off the process you want to kill use the "tlist" command.

      for example:
      kill soffice.exe

      hope it helps
      uli

      lordoftheplat



        Hopeful

      • teh god.
      • Thanked: 1
        Re: Anyone can help me for an simple bat file?
        « Reply #5 on: March 22, 2007, 06:47:39 AM »
        that works?? i never knew..
        zepperblood.deviantart.com

        ghostdog74



          Specialist

          Thanked: 27
          Re: Anyone can help me for an simple bat file?
          « Reply #6 on: March 22, 2007, 07:32:17 AM »
          Quote
          I'm newbie in learning the bat file. Just try to use it this 2 days.
          Now i face a problem to writing a bat file.

          if i want to close an application using the bat file, how can i write it?

          Is it like this "shutdown -f (application_name) " ??
          if you want to close a program and you are in XP, you can use taskkill.

          Carbon Dudeoxide

          • Global Moderator

          • Mastermind
          • Thanked: 169
            • Yes
            • Yes
            • Yes
          • Certifications: List
          • Experience: Guru
          • OS: Mac OS
          Re: Anyone can help me for an simple bat file?
          « Reply #7 on: March 22, 2007, 07:34:54 AM »
          Quote
          hmm u seem to not understand what i say carbon dudeoxide.... i just told him that
          using shutdown -f wont do anything....
          and wats up wif -t "00" i never even mention a single thing about time
          Talking about your second post, lol

          --------------------------------------------------

          Ghostdog and uli_glueck, kill and taskkill doesn't work for me, Windows XP
          « Last Edit: March 22, 2007, 07:37:36 AM by carbondudeoxide »

          ghostdog74



            Specialist

            Thanked: 27
            Re: Anyone can help me for an simple bat file?
            « Reply #8 on: March 22, 2007, 08:37:14 AM »
            Quote
            Ghostdog and uli_glueck, kill and taskkill doesn't work for me, Windows XP
            what is your error messages?? if you search google for  "Windows XP taskkill" , the very first result points you to M$ website. So taskkill is definitely a command in XP. Try to check taskkill /?. Or your PATH to DOS commands are not defined.
            « Last Edit: March 22, 2007, 08:39:37 AM by ghostdog74 »

            lkoksoon

            • Guest
            Re: Anyone can help me for an simple bat file?
            « Reply #9 on: March 22, 2007, 07:03:33 PM »
            ya, i tried already. The taskkill is a MSDOS command and can use to end an application.

            Now there is exist another problem, the taskkill only work in window 2000 and xp pro, so the xp home can't use that command.  >:( >:(

            ghostdog74



              Specialist

              Thanked: 27
              Re: Anyone can help me for an simple bat file?
              « Reply #10 on: March 22, 2007, 08:07:29 PM »
              you can always try kill.exe from the windows resource kit. If you don't have the resource kit, you can download here.
              Or you can download pskill . Not sure if they will work on XP home, but you can always give it  a try

              Carbon Dudeoxide

              • Global Moderator

              • Mastermind
              • Thanked: 169
                • Yes
                • Yes
                • Yes
              • Certifications: List
              • Experience: Guru
              • OS: Mac OS
              Re: Anyone can help me for an simple bat file?
              « Reply #11 on: March 23, 2007, 03:34:15 AM »
              How come taskkill doesn't work for me.......where is it located? e.g. system32

              lordoftheplat



                Hopeful

              • teh god.
              • Thanked: 1
                Re: Anyone can help me for an simple bat file?
                « Reply #12 on: March 23, 2007, 06:12:10 AM »
                you have to get the .exe file carbon dudeoxide and save the .exe into your sys32
                zepperblood.deviantart.com

                Carbon Dudeoxide

                • Global Moderator

                • Mastermind
                • Thanked: 169
                  • Yes
                  • Yes
                  • Yes
                • Certifications: List
                • Experience: Guru
                • OS: Mac OS
                Re: Anyone can help me for an simple bat file?
                « Reply #13 on: March 23, 2007, 07:04:36 AM »
                Nope. It doesn't matter though.