
16-03-2015, 10:29
|
 |
Registered User
|
|
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,022 Times in 239 Posts
|
|
Quote:
Originally Posted by LuisCésar82
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.
|
yes, this method will work.
|