Kaseya Community

Unzip from command prompt

  • I am writing a script to download a zip file, unzip it, and then run an executable.

    I am wondering what others are using for an UNZIP tool? It seems that the builting Windows XP/2003 unzip tools do not work from a command prompt.

    Of course, I am looking for something that is freeware - so I don't have to worry about licensing issues for all Kaseya agents.

    Lloyd

    Legacy Forum Name: Unzip from command prompt,
    Legacy Posted By Username: lwolf
  • Whilst I havent used it for literally years, PKUnzip was always my choice back in the days of command line extractors.

    It's freeware also!

    No idea where you can get it from these days though.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: LANWorx
  • LANWorx,

    Thanks. I used PKUNZIP back in the gold-old DOS days. I did some internet searching tonight. I found PKUNZIP available for download in several locations, but I am having a hard to finding anything official that saus if it is truly "freeware", or if it is only free for personal use - which woudl not be my case, or if it is not free and sites are illegally making it available for download.

    We want to make sure that I am "legal" with anything that we use.

    Lloyd

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: lwolf
  • PKWare has replaced with ZIP Reader, which according to their official site is completely free.

    I'd be 99.9% certain that you'd have no 'legal' problems with this whatsoever.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: LANWorx
  • Download the command line version of 7Zip at:

    http://www.7-zip.org/download.html

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: pcmnetmanage
  • Greg,

    Thanks very much.

    Lloyd

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: lwolf
  • Seconding the support for 7Zip, which will extract pretty much anything you'd want (with the possible exception of those annoying late-model WinZip proprietary archives, last I checked).

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: GreyDuck
  • I have also found that 7-zip does a much more efficient job of extracting larger compressed files. would definately say that it is an ideal choice, and opensource is always a bonus.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: YLindsay
  • We use Unzip from Info-Zip. It's very simple to script and works well.

    Michael

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: RCS-Michael
  • I've created a script that uses 7zip. It says the script completes successfully but when I look for the extracted files they're not there. I can go to the pc & do it manually with the same syntax. Any ideas ?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: dfievet
  • could be in the script iself, mind sharing it with us?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: thirteentwenty
  • I've already copied the file to the client w/ another script. I was trying to isolate the failure & it ended up being this piece. I've tried every variant of the system / user drop down plus no quotes. It just won't do what I tell it to. clamport.7z is the archive I want to extract. Funny thing is it says its successful everytime.

    Script Name: copy 7z.exe
    Script Description:

    IF Application is Running
    Parameter 1 : explorer.exe
    THEN
    Execute File
    Parameter 1 : c:\kaseya\7z.exe
    Parameter 2 : "x clamport.7z"
    Parameter 3 : 3
    OS Type : 0
    ELSE


    Don Fievet

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: dfievet
  • At first glance, I'd ask where is "clamport.7z" located? Is it in the same directory as 7z.exe or located elsewhere?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: eruberts@sjconsultant.com
  • Its in the same dir

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: dfievet
  • What happens if you manually run the command from a command prompt?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: eruberts@sjconsultant.com