Sign in to follow this  
Followers 0
Libre

Shell Executing

5 posts in this topic

how can i execute a file like zip or pdf calling the windows shell ?

thanks.


I love this Game :p----------------------Freeware Multilange support or Translate your scripts----------------------aNyBoDy KnOwS WhY A LiGhT iN My KeYbOaRd iS aLlWaIs BlInKiNg !?Who is "General Failure" and what is he doing in my hard disk !!!!!?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

how can i execute a file like zip or pdf calling the windows shell ?

thanks.

More info

it's not simply? :

Run("C:\PROGRA~1\WINZIP\WINZIP32.EXE C:\Test.zip")

Invoke sample vbs added

Zip_extract_here.zip

Edited by Lapo

Share this post


Link to post
Share on other sites

like this:

@Start C:\zipfile.zip

In an autoit script you would do:

Run(@ComSpec & " /c " & '@Start C:\zipfile.zip', "", @SW_HIDE)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

how can i execute a file like zip or pdf calling the windows shell ?

thanks.

Try this.

_ShellExecute("C:\Mydocument.pdf")

Func _ShellExecute($sFile)
Local $run = $sFile; executable you want to run or document you want to open with predef. appl.
Local $args = ""; arguments
Local $verb = "Open"; other valide functions are edit, print, or just leave it blank
Local $dir = ""; path of executabe can leave blank if it's in the system path, c:\windows\, c:\windows\system32 etc..
Local $sw = 3; hide = 0, maximize = 3, minimize = 6

Local $ret = Dllcall("shell32.dll","long","ShellExecuteA", _
            "hwnd",0, _
            "str",$verb, _
            "str",$run, _
            "str",$args, _
            "str",$dir, _
            "int",$sw) 
            
EndFunc

Roy.

Share this post


Link to post
Share on other sites

Try this.

_ShellExecute("C:\Mydocument.pdf")

Func _ShellExecute($sFile)
Local $run = $sFile; executable you want to run or document you want to open with predef. appl.
Local $args = ""; arguments
Local $verb = "Open"; other valide functions are edit, print, or just leave it blank
Local $dir = ""; path of executabe can leave blank if it's in the system path, c:\windows\, c:\windows\system32 etc..
Local $sw = 3; hide = 0, maximize = 3, minimize = 6

Local $ret = Dllcall("shell32.dll","long","ShellExecuteA", _
            "hwnd",0, _
            "str",$verb, _
            "str",$run, _
            "str",$args, _
            "str",$dir, _
            "int",$sw) 
            
EndFunc

Roy.

Thaks man, thats perfect.

I love this Game :p----------------------Freeware Multilange support or Translate your scripts----------------------aNyBoDy KnOwS WhY A LiGhT iN My KeYbOaRd iS aLlWaIs BlInKiNg !?Who is "General Failure" and what is he doing in my hard disk !!!!!?

Share this post


Link to post
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
Sign in to follow this  
Followers 0