Jump to content

InetGet - Get file and execute it doesnt work?


PresFox
 Share

Recommended Posts

Hello,

I am trying to download a patcher and automatically run it, however, the file downloads great (i can see it appear in the directory, with the right filesize) but it refuses to run?

Nothing happens after download, 

if anyone could help me out that would be awesome.

Local $fileDownload = InetGet("urltopatcher" , "installer.exe" , 1,0)
Do
    Sleep(250)
Until InetGetInfo($fileDownload, 2) ; Check if the download is complete.

InetClose($fileDownload)


Run ('installer.exe')
Link to comment
Share on other sites

Hi PresFox,

  Your script might be having trouble finding your installer.

Maybe updating the path info would help...

Bill

Shellexecute works better IMO on EXE files

Edited by billo
Link to comment
Share on other sites

Hello,

I now made my code this: and added admin rights to see or it was the problem, but it still does not work.

After running, the file is in appdataroaming, so that works fine, but it refuses to launch the EXE.

When i manually click the exe, it runs fine..

Added the msgbox, but it never shows

#requireadmin

If ProcessExists("iexplore.exe") Then
    ProcessClose("iexplore.exe")
EndIf

Local $fileDownload = InetGet("filetodownload" , @AppDataDir & "\installer.exe" , 1,0)
Do
    Sleep(250)
Until InetGetInfo($fileDownload, 2) ; Check if the download is complete.

InetClose($fileDownload)
Local $val = ShellExecuteWait(@AppDataDir & "\installer.exe")




MsgBox(0, "Program returned with exit code:", $val)


Global $hCtrl = 0, $Waiting = True

 

Edited by PresFox
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...