Jump to content

Vbscript code wrapper


topten
 Share

Recommended Posts

I have a vbscript code which is extracting a file from zipped archive

ZipFile5="c:\file.zip"
ExtractTo5="c:\folder"

set objShell5 = CreateObject("Shell.Application")
set FilesInZip5=objShell5.NameSpace(ZipFile5).items
objShell5.NameSpace(ExtractTo5).CopyHere(FilesInZip5),&H4

Set objShell5 = Nothing

I have written an autoit wrapper for that

 

$ZipFile5="C:\file.zip"
$ExtractTo5="C:\folder"



$objShell5 = ObjCreate ("Shell.Application")
$FilesInZip5=$objShell5.NameSpace($ZipFile5).items
$objShell5.NameSpace($ExtractTo5).CopyHere($FilesInZip5),&H4

It works fine if I dont use ",&H4" (option to unzip without progress bar)

When I add ,&H4 - I get an error 

==> Illegal text at the end of statement (one statement per line).:
$objShell5.NameSpace($ExtractTo5).CopyHere($FilesInZip5),&H4
$objShell5.NameSpace($ExtractTo5).CopyHere($FilesInZip5)^ ERROR

How can I use (wrap into autoit)  ,&H4 option?

Link to comment
Share on other sites

I autoit Long type is not with &h You must set 0x4

 

Saludos

Edited by Danyfirex
Link to comment
Share on other sites

I meant this:

$objShell5.NameSpace($ExtractTo5).CopyHere($FilesInZip5), 0x4 ; This way didnt work

Saludos

Link to comment
Share on other sites

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...