View Single Post
  #41  
Old 16-03-2015, 03:15
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Good work altef_4

PS: In example script (bp.iss) of "BASS Protect Plugin For Inno Setup" could add to line to script.

Code:
DeleteFile(ExpandConstant('{tmp}\')+fil);
Add green line in this script part:
Code:
#ifdef IS_ENHANCED
size_:=ExtractTemporaryFileSize(fil);
SetLength(Buffer,size_);
ExtractTemporaryFileToBuffer(fil,Cast{#defined UNICODE ? "Ansi" : ""}StringToInteger(Buffer));
#else
if not FileExists(ExpandConstant('{tmp}\')+fil) then ExtractTemporaryFile(fil);
FileSize(fil,size_);
SetLength(Buffer,size_);
LoadStringFromFile(ExpandConstant('{tmp}\')+fil,Buffer);
DeleteFile(ExpandConstant('{tmp}\')+fil);
#endif
If used Inno Setup Standard (Not Enhanced) delete the audio file after reading, not keeping it in the temporary folder.
Not protect, but hinders users from gaining access to the audio file.
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
altef_4 (16-03-2015)