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

Author Topic: How to run a batch file inside a zip archive from a batch file?  (Read 31181 times)

0 Members and 1 Guest are viewing this topic.

Quantos



    Guru
  • Veni, Vidi, Vici
  • Thanked: 170
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Guru
  • OS: Linux variant
Re: How to run a batch file inside a zip archive from a batch file?
« Reply #30 on: November 24, 2009, 12:48:07 PM »
Papayrus, you won't be getting any additional help from anyone.
Your juvenile and abusive attitude has been observed, measured, and found lacking.

We are volunteers here, supporting people who need it.  If you think you can come in here and abuse us of your own free will, then you have another thing coming.
Evil is an exact science.

papayrus

    Topic Starter


    Rookie

    Re: How to run a batch file inside a zip archive from a batch file?
    « Reply #31 on: November 24, 2009, 12:56:34 PM »
    I said I dont want your help. People like you are sick please don talk to me as I said I am looking for decent people unlike you thanks. Good Day Mate
    Nobody asked YOU I am asking someone that can actually help you are not helpful in anyway and you make no sense get off my post and dont talk to me cause you have nothing good to offer.
    I came here in a good mood with good intentions and you and Slamon Fish should not even be allowed in a public internet access place you just wreck it for everyone and I dont take crap from people like you. Get real or just go away.

    Salmon Trout

    • Guest
    Re: How to run a batch file inside a zip archive from a batch file?
    « Reply #32 on: November 24, 2009, 01:08:34 PM »
    Quote
    get off my post

    Someone's heading for a ban...

    papayrus

      Topic Starter


      Rookie

      Re: How to run a batch file inside a zip archive from a batch file?
      « Reply #33 on: November 24, 2009, 01:10:46 PM »
      Drink some more wine dude.

      papayrus

        Topic Starter


        Rookie

        Re: How to run a batch file inside a zip archive from a batch file?
        « Reply #34 on: November 24, 2009, 02:00:15 PM »
        Someone's heading for a ban...
        [/quoteYou should be banned from the public.

        Helpmeh



          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: How to run a batch file inside a zip archive from a batch file?
        « Reply #35 on: November 24, 2009, 02:23:46 PM »
        Sometimes I wish EVERYONE would get banned.
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        papayrus

          Topic Starter


          Rookie

          Re: How to run a batch file inside a zip archive from a batch file?
          « Reply #36 on: November 24, 2009, 04:08:24 PM »
          May as well delete this it just got trashed by a couple rude people anyway. Actually I think salmon is 2 people 2 accounts lol.

          BatchFileBasics



            Hopeful

            Thanked: 18
            Re: How to run a batch file inside a zip archive from a batch file?
            « Reply #37 on: November 24, 2009, 04:20:32 PM »
            why don't you start by learning how to extract contents from a zip using batch?

            http://www.computerhope.com/forum/index.php?topic=66630.0
            When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

            papayrus

              Topic Starter


              Rookie

              Re: How to run a batch file inside a zip archive from a batch file?
              « Reply #38 on: November 24, 2009, 04:22:28 PM »
              Thankyou for that link I will check it out.

              papayrus

                Topic Starter


                Rookie

                Re: How to run a batch file inside a zip archive from a batch file?
                « Reply #39 on: November 24, 2009, 04:30:01 PM »
                Thankyou for that link I will check it out.
                I checked it out I am confused about the code is this a batch file?

                Set WshShell = CreateObject("Wscript.Shell")
                user = WshShell.ExpandEnvironmentStrings("%UserName%")

                strZipFile = "c:\documents and settings\" & user & "\fr5\resource.zip"
                outFolder = "c:\documents and settings\" & user & "\fr5\"
                   
                Set objShell = CreateObject( "Shell.Application" )
                Set objSource = objShell.NameSpace(strZipFile).Items()
                Set objTarget = objShell.NameSpace(outFolder)
                intOptions = 256
                objTarget.CopyHere objSource, intOptions

                where it says %username% do I just type it as is or do I need to type in a username of some sort?
                also what is strZipFile?

                BatchFileBasics



                  Hopeful

                  Thanked: 18
                  Re: How to run a batch file inside a zip archive from a batch file?
                  « Reply #40 on: November 24, 2009, 05:01:53 PM »
                  no, this is vbscript
                  Code: [Select]
                      strZipFile = ""                                       'name of zip file
                      outFolder = ""                                       'destination folder of unzipped files
                     
                      Set objShell = CreateObject( "Shell.Application" )
                      Set objSource = objShell.NameSpace(strZipFile).Items()
                      Set objTarget = objShell.NameSpace(outFolder)
                      intOptions = 256
                      objTarget.CopyHere objSource, intOptions

                  save  it as extract.vbs

                  then in your batch file put this line
                  Code: [Select]
                  cscript //nologo extract.vbs
                  When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

                  papayrus

                    Topic Starter


                    Rookie

                    Re: How to run a batch file inside a zip archive from a batch file?
                    « Reply #41 on: November 24, 2009, 08:08:39 PM »
                    Thats pretty nice but but how can I use this to run a batch file that is inside of a zip archive?
                    Ok the vbs works great. Is there a way to use it to actually launch the batch file that is inside the zip file OR do I need to extract the batch file then run it then delete it to do it?
                    Also how do I make the directory not need a full path for example I want it to extract the file in the zip archive in the same folder ther vbs is in? I tried strZipFile = "111.zip" and for the next part outFolder = "" with no name but it gets an error I then put in the full path and the error went away but I just want to have it work inside the directory its located in so it can be portable.
                    « Last Edit: November 24, 2009, 08:42:20 PM by papayrus »

                    gh0std0g74



                      Apprentice

                      Thanked: 37
                      Re: How to run a batch file inside a zip archive from a batch file?
                      « Reply #42 on: November 24, 2009, 08:20:07 PM »
                      you got to unzip your archive, then run the batch. which part of this you did not get?

                      papayrus

                        Topic Starter


                        Rookie

                        Re: How to run a batch file inside a zip archive from a batch file?
                        « Reply #43 on: November 24, 2009, 08:42:57 PM »
                        you got to unzip your archive, then run the batch. which part of this you did not get?

                        Ok the vbs works great. Is there a way to use it to actually launch the batch file that is inside the zip file OR do I need to extract the batch file then run it then delete it to do it?
                        Also how do I make the directory not need a full path for example I want it to extract the file in the zip archive in the same folder ther vbs is in? I tried strZipFile = "111.zip" and for the next part outFolder = "" with no name but it gets an error I then put in the full path and the error went away but I just want to have it work inside the directory its located in so it can be portable.

                        gh0std0g74



                          Apprentice

                          Thanked: 37
                          Re: How to run a batch file inside a zip archive from a batch file?
                          « Reply #44 on: November 24, 2009, 09:30:54 PM »
                          OR do I need to extract the batch file then run it then delete it to do it?
                          that's what i said.