Jump to content

Recommended Posts

Posted

Hello all!

I have run into a bit of trouble with a project that I am working on. I currently have an autoit file calling a  java script to  go out and retrieve the latest install of X from an FTP Server. It works great! Well the problem I am running into now is since the file I grab is zipped I have to unzip so then I can run the installation for X. I thought I had found a way using 7-zip but I keep getting an error even if I try to run the installation myself saying "Error: Error loading XML file.. This application will now close." If I extract the files using windows explorer I am able to install the program. 

I have my autoit file calling this .bat file and as a result I am unable to load from the unzipped folder due to this error loading XML file.

cd "C:\Program Files (x86)\7-zip"
7z e "C:\Users\NTS User\Documents\AutoInstall\XInstall.zip" -o"C:\Users\NTS User\Desktop\Autoit\X" -y

 

Am I missing something with this? If anyone could provide insight I would deeply appreciate it. Thanks again! 

 

Richard

P.S. If I forgot to include anything just let me know! 

Posted

There is a Zip.UDF that you can use, but I like this method even better if your on Win 7/8/10

$objShell5 = ObjCreate("Shell.Application")
$FilesInZip5 = $objShell5.NameSpace($sZip).items
$objShell5.NameSpace($sMaps).CopyHere($FilesInZip5,0x4)

$sZip is the path to the zip file, and $sMaps is the path to extract.

  • 1 year later...
Posted

I've made several attempts to decipher how to use this method, but my script always aborts with the failure shown below.

I know almost nothing about using objects in Au3.  Can someone suggest a way to troubleshoot this simple call?  I'm running under Win7 Pro.

Thanks for any help.

 

Unzip Fail.PNG

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...