Jump to content

Recommended Posts

Posted

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')
Posted (edited)

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

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
  • Recently Browsing   0 members

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