Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2017, 07:30
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
FAQs: Inno setup

CODE SNIPPETS

Add Unlimited ShortCuts via Ini
Add unlimited Redists via Ini
Common WinAPI Externs for INNO
Add Unlimited ShortCuts via Ini
How to change appname and other installation settings after compile?
How to add unlimited registey values by an ini?
How can I protect my Script from Vultures?
How to add custom Buttons to Installers
Join Many Files to One Using Inno Only
SH Folder Operations
Updated ISDone Scrpit

any questions or requests, ask here

Feel Free To add your own code

Last edited by Gupta; 05-01-2018 at 06:27.
Reply With Quote
The Following 12 Users Say Thank You to Gupta For This Useful Post:
78372 (26-03-2017), ADMIRAL (10-06-2020), Andu21 (27-04-2017), Cesar82 (28-03-2017), EzzEldin16 (05-01-2018), Flzzy (29-04-2021), Harsh ojha (18-08-2019), Jiva newstone (05-01-2018), kassane (30-06-2017), Lin Ming (30-06-2017), Razor12911 (14-03-2017), Viper645 (10-03-2017)
Sponsored Links
  #2  
Old 06-03-2017, 07:32
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
How to add unlimited shortcuts from an ini?

Code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define public ShortcutsINI ".\\Shortcuts.ini"

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Icons]
#ifnexist ShortCutsINI
  #error Ini doesn't Exists
#endif
#define public Counter
#define public i
#define public Section

#expr Counter = 0
#define public ExeName
#define public ExeFile
#define public ExeGroupFile
#define public ExeParameters
#define public ExeWorkingDir
#define public ExeComment
#define public ExeIconFileName
#define public ExeFlags
#sub AddIcons
  #expr Counter = Counter + 1
  #expr Section = StringChange( "ExeCounter", "Counter", str(Counter) )
  #expr ExeName = ReadIni (SourcePath + ShortcutsINI , Section, "Name")
  #expr Exefile = Readini  (SourcePath + ShortcutsINI , Section, "File")
  #expr ExeParameters = Readini  (SourcePath + ShortcutsINI , Section, "Parameters","")
  #expr ExeWorkingDir = Readini  (SourcePath + ShortcutsINI , Section, "WorkingDir","{app}")
  #expr ExeComment = Readini  (SourcePath + ShortcutsINI , Section, "Comment","Play")
  #expr ExeIconFileName = Readini  (SourcePath + ShortcutsINI , Section, "IconFileName","")
  #expr ExeFlags = Readini  (SourcePath + ShortcutsINI , Section, "Flags","")
  #if ReadIni(SourcePath + ShortcutsINI, Section, "GroupShortCut","0") != "0"
    #expr ExeGroupFile = Readini(SourcePath + ShortcutsINI , Section, "GroupIconName","")
    Name: "{group}\{#ExeGroupFile}"; Filename:"{#ExeFile}"; Parameters: "{#ExeParameters}" ; WorkingDir: "{#ExeWorkingDir}" ; Comment: "{#ExeComment}" ; IconFilename: "{#ExeIconFileName}" ; Flags: {#ExeFlags}  ; 
  #endif
  Name: "{userdesktop}\{#ExeName}"; Filename: "{#ExeFile}"; Parameters: "{#ExeParameters}" ; WorkingDir: "{#ExeWorkingDir}"; Comment: "{#ExeComment}" ; IconFilename: "{#ExeIconFileName}" ; Flags: {#ExeFlags}  ; 
#endsub
#for { i = 1 ; ReadIni( SourcePath + ShortcutsINI, StringChange( "ExeCounter", "Counter", str(i)) , "Name" , "" ) != "" ; i++ } AddIcons
Ini Structure Should be:
Code:
[Exe1]
Name=Play - Some game
File={app}\SomeExecutable
Parameters=/play filename.mid
WorkingDir={app}
Comment=This is my program
IconFileName={app}\myicon.ico
;Flags=createonlyiffileexists
GroupShortCut=0
GroupIconName=SomeExecutableName

[Exe2]
Name=Play - Some game2
File={app}\SomeExecutable
Parameters=/play filename.mid
WorkingDir={app}
Comment=This is my program
IconFileName={app}\myicon.ico
;Flags=createonlyiffileexists
GroupShortCut=0
GroupIconName=SomeExecutableName

[Exe3]
Name=Play - Some game3
File={app}\SomeExecutable
Parameters=/play filename.mid
WorkingDir={app}
Comment=This is my program
IconFileName={app}\myicon.ico
;Flags=createonlyiffileexists
GroupShortCut=0
GroupIconNameSomeExecutableName

[Exe4]
Name=Play - Some game4
File={app}\SomeExecutable
Parameters=/play filename.mid
WorkingDir={app}
Comment=This is my program
IconFileName={app}\myicon.ico
;Flags=createonlyiffileexists
GroupShortCut=0
GroupIconName=SomeExecutableName
I wrote this Myselef
Reply With Quote
The Following 5 Users Say Thank You to Gupta For This Useful Post:
Cesar82 (28-03-2017), EzzEldin16 (05-01-2018), Razor12911 (14-03-2017), TWOELV (13-03-2017), Viper645 (10-03-2017)
  #3  
Old 06-03-2017, 07:43
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
How to add unlimited Redists from an ini?

Code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define public RedistsINI ".\\Redists.ini"

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Run]
#ifnexist RedistsINI
  #error Ini for redists reading can't be find
#endif
#define public Section
#define public i
#define public Counter
#expr Counter =  0
#define public RedistFileName
#define public RedistWorkingDir
#define public RedistParameters
#define public RedistFlags
#define public RedistCheck
#sub AddRedist
  #expr Counter = Counter + 1
  #expr Section = StringChange("RedistCounter", "Counter", str(Counter) )
  #expr RedistFileName = ReadIni(SourcePath + RedistsINI , Section , "FileName")
  #expr RedistWorkingDir = Readini(SourcePath + RedistsINI , Section , "Workingdir","{src}")
  #expr RedistParameters = Readini(SourcePath + RedistsINI , Section , "Parameters","")
  #expr RedistFlags = Readini(SourcePath + RedistsINI , Section, "Flags","waituntilterminated skipifdoesntexist")
  #expr RedistCheck = Readini(SourcePath + RedistsINI , Section , "Checks","")
  Filename: "{#RedistFileName}"; WorkingDir: "{#RedistWorkingDir}" ; Parameters: {#RedistParameters}; Flags: {#RedistFlags}; Check: {#RedistCheck};
#endsub
#for { i = 1 ; ReadIni( SourcePath + RedistsINI, StringChange( "RedistCounter", "Counter", str(i)) , "FileName" , "" ) != "" ; i++ } AddRedist
Ini Structure should be

Code:
[Redist1]
FileName={src}\redist\DirectX\DXSETUP.exe
Workingdir={src}
Parameters=
Flags=waituntilterminated 
;Checks=IsWin64 and Installredist and CheckError

[Redist2]
FileName={src}\redist\vcredist\vcredist_x86.exe
Workingdir={src}
Parameters=/Q
Flags=waituntilterminated 
;Checks=not IsWin64 and Installredist and CheckError

[Redist3]
FileName={src}\redist\vcredist\vcredist_x64.exe
Workingdir={src}
Parameters=/Q
Flags=waituntilterminated 
;Checks=IsWin64 and Installredist and CheckError
For descriptions of Sectio, please reference inno help file
Section - [RUN]

Code is Written by me.
Reply With Quote
The Following 5 Users Say Thank You to Gupta For This Useful Post:
Cesar82 (28-03-2017), EzzEldin16 (05-01-2018), Razor12911 (14-03-2017), Simorq (16-07-2017), TWOELV (13-03-2017)
  #4  
Old 06-03-2017, 08:01
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
ISDOne with All latest compressor ->PZLIB, LZ5, OFR, LZ4, ZSTD etc..

Additonal Functions:
function EXEC_UNPACK( const Exec , Option , inFiles, outDir : string; Deldest : boolean): boolean;
->Exec - Executable Name
->Option - Cmd line for the executable
<infile> -> input file ( file with full Path name as specified by variable infile)
<outfile> -> output file ( infile without extension)
->infile - file to process, masks allowed
->OutDir - output folder
-> Deldest - whether to delete destination or not?

Note: define ppx2 for multitasking...
Attached Files
File Type: 7z ISDone 0.6217.All.7z (5.42 MB, 695 views)
Reply With Quote
The Following 17 Users Say Thank You to Gupta For This Useful Post:
78372 (26-03-2017), ADMIRAL (21-05-2020), Andu21 (28-04-2017), Cesar82 (28-03-2017), EzzEldin16 (05-01-2018), ffmla (06-03-2017), Harsh ojha (18-08-2019), Jiva newstone (01-06-2017), JRD! (10-03-2017), kj911 (24-11-2021), oltjon (06-03-2017), Razor12911 (14-03-2017), shazzla (06-03-2017), Simorq (06-03-2017), Titeuf (09-01-2018), TWOELV (13-03-2017), Viper645 (10-03-2017)
  #5  
Old 10-03-2017, 05:14
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
How to write unlimited archives to an ini?
Attached Files
File Type: 7z ISDone.INI.10.3.2017.7z (5.12 MB, 324 views)
Reply With Quote
The Following 9 Users Say Thank You to Gupta For This Useful Post:
78372 (10-03-2017), ADMIRAL (21-05-2020), Andu21 (10-06-2017), Cesar82 (28-03-2017), EzzEldin16 (05-01-2018), Razor12911 (14-03-2017), Simorq (16-07-2017), TheTimickRus (13-03-2017), TWOELV (13-03-2017)
  #6  
Old 13-03-2017, 02:09
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
Someone via PM asked me:
How to Create Buttons in Installers?
Actually, there can be two ways:
First, Playing with pascal and use panels or listviews to create buttons and use ONMOUSEDOWN event to trigger events
For example, See WPI Script of BLUR or Flat Modules(Module\Form.Functions.iss)

Second, can be using libraries to create buttons such as botva2 or ISab.dll
btnprint.iss (botva2.dll)
Code:
;Created by South.Tver 02.2010

;пример работы с BtnGetText, BtnSetText, BtnSetFontColor, BtnSetTextAlignment

#include "Modules\botva2.iss"

[Setup]
AppName=BtnPrint by South.Tver
AppVerName=BtnPrint by South.Tver
DefaultDirName={pf}\BtnPrint
OutputBaseFilename=setup

[Files]
Source: Files\*; Flags: dontcopy

[;Code]
type
  TTimerProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);

var
  hBtn:HWND;
  CurSimbol:integer;
  TimerID:Longword;
  TestText:ansistring;

function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external '[email protected] stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external '[email protected] stdcall';
function WrapTimerProc(callback:TTimerProc; paramcount:integer):LongWord; external 'wrapcallbackaddr@files:CallbackCtrl.dll stdcall';

procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
begin
  CurSimbol:=CurSimbol+1;
  if CurSimbol>Length(TestText) then begin
    KillTimer(0, TimerID);
    Exit;
  end;
  BtnSetText(hBtn,PAnsiChar(BtnGetText(hBtn)+TestText[CurSimbol]));
end;

procedure BtnClick(hBtn:HWND);
begin
  if not BtnGetChecked(hBtn) then begin
    KillTimer(0, TimerID);
    BtnSetText(hBtn,'');
    CurSimbol:=0;
  end else TimerID:=SetTimer(0, 0, 100, WrapTimerProc(@OnTimer, 4));
end;

function InitializeSetup:boolean;
begin
  if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
  if not FileExists(ExpandConstant('{tmp}\CallbackCtrl.dll')) then ExtractTemporaryFile('CallbackCtrl.dll');
  Result:=True;
end;

procedure InitializeWizard;
begin
  with WizardForm do begin
    InnerNotebook.Hide;
    OuterNotebook.Hide;
    Bevel.Hide;
    Width:=700;
    Height:=700;
    NextButton.Top:=ClientHeight-50;
    CancelButton.Top:=ClientHeight-50;
  end;

  hBtn:=BtnCreate(WizardForm.Handle,-50,-50,WizardForm.ClientWidth+100,WizardForm.ClientHeight+100,'button2.png',18,True);
  CurSimbol:=0;

  TestText:='ЛИЦЕНЗИОННОЕ СОГЛАШЕНИЕ '+
            'Эта лицензия действительна только для граждан стран бывшего СССР. '+
            'Граждане других стран обязаны пользоваться shareware-версией '+
            'программы, которую можно бесплатно скачать с сайта '+
            'http://www.ice-graphics.com/ICEReader '+
            'Программа ICE Book Reader Professional Russian Edition '+
            'распространяется как freeware. '+
            'Все авторские права на программу ICE Book Reader Professional Russian '+
            'Edition принадлежат ICE Graphics. '+
            'Граждане стран бывшего СССР имеют право использовать данную версию '+
            'программы ICE Book Reader Professional Russian Edition в '+
            'некоммерческих целях бесплатно. '+
            'Если условия данной лицензии не устраивают попадающих под ее действие '+
            'лиц, они имеют право воспользоваться на общих основаниях лицензией, '+
            'приведенной в файле License.txt. Для коммерческого использования '+
            'программой ICE Book Reader Professional Russian Edition необходимо '+
            'получить письменное разрешение ICE Graphics ([email protected]). '+
            'ICE Graphics не гарантирует оперативной технической поддержки. '+
            'ICE Graphics оставляет за собой право отменить действие данной '+
            'лицензии для любой из следующих версий программы ICE Book Reader '+
            'Professional Russian Edition. '+
            'Программа ICE Book Reader Professional Russian Edition '+
            'распространяется свободно, при условии того, что настоящий дистрибутив '+
            'не изменен. Ни одно частное лицо или организация не может брать плату '+
            'за распространение ICE Book Reader Professional Russian Edition без '+
            'письменного разрешения ICE Graphics. '+
            'ПРОГРАММА ICE Book Reader Professional Russian Edition ПОСТАВЛЯЕТСЯ ПО '+
            'ПРИНЦИПУ "КАК ЕСТЬ" ("AS IS"). НИКАКИХ ГАРАНТИЙ НЕ ПРИЛАГАЕТСЯ И НЕ '+
            'ПРЕДУСМАТРИВАЕТСЯ. ВЫ ИСПОЛЬЗУЕТЕ ЭТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ НА СВОЙ '+
            'РИСК. ICE Graphics НЕ БУДЕТ ОТВЕЧАТЬ НИ ЗА КАКИЕ ПОТЕРИ ИЛИ ИСКАЖЕНИЯ '+
            'ДАННЫХ, ЛЮБУЮ УПУЩЕННУЮ ВЫГОДУ В ПРОЦЕССЕ ИСПОЛЬЗОВАНИЯ ИЛИ '+
            'НЕПРАВИЛЬНОГО ИСПОЛЬЗОВАНИЯ ЭТОГО ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ. ';

  BtnSetTextAlignment(hBtn,40,30,balLeft);
  BtnSetFontColor(hBtn,$DAE369,$FF0000,$00FF00,$0000FF);
  BtnSetEvent(hBtn,BtnClickEventID,WrapBtnCallback(@BtnClick,1));
end;

procedure DeinitializeSetup;
begin
  KillTimer(0, TimerID);
  gdipShutdown;
end;
botva2_0.9.9 attached ( Open to see more )
Attached Files
File Type: 7z botva2_0.9.9.156.7z (1.29 MB, 179 views)
Reply With Quote
The Following 6 Users Say Thank You to Gupta For This Useful Post:
Cesar82 (28-03-2017), EzzEldin16 (05-01-2018), Razor12911 (14-03-2017), Simorq (27-02-2018), TheTimickRus (13-03-2017), TWOELV (13-03-2017)
  #7  
Old 28-03-2017, 04:13
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
SHFileOperations

;************************************************* **************;
;****************** SHFileOperation.iss ************************;
;************************************************* **************;
;* Include this file in project. Example:
;* #include "SHFileOperation.iss"
;************************************************* **************;
;************************ 1 ************************************;
;* function CopyDir(const fromDir, toDir: string): Boolean;
;* Example 1 (without <fromDir> trailing backslash):
;* CopyDir('C:\TMP\MyApp', 'C:\TMP\Backup');
;* Result: C:\TMP\Backup\MyApp\..all <MyApp> subdirs and files
;* Example 2 (with <fromDir> trailing backslash):
;* CopyDir('C:\TMP\MyApp\', 'C:\TMP\Backup');
;* Result: C:\TMP\Backup\..all <MyApp> subdirs and files
;************************************************* **************;
;************************ 2 ************************************;
;* function MoveDir(const fromDir, toDir: string): Boolean;
;* Example 1 (without <fromDir> trailing backslash):
;* MoveDir('C:\TMP\MyApp', 'C:\TMP\Backup');
;* Result: C:\TMP\Backup\MyApp\..all <MyApp> subdirs and files
;* Example 2 (with <fromDir> trailing backslash):
;* MoveDir('C:\TMP\MyApp\', 'C:\TMP\Backup');
;* Result: C:\TMP\Backup\..all <MyApp> subdirs and files
;************************************************* **************;
;************************ 3 ************************************;
;* function DelDir(dir: string; toRecycle: Boolean): Boolean;
;* If <toRecycle> is True, <dir> deleted in Recycle Bin.
;************************************************* **************;
;************************ 4 ************************************;
;* function RenameDir(const fromDir, toDir: string): Boolean;
;************************************************* **************;
;************************************************* **************;
;************************************************* **************;

Code:
type
   TSHFileOpStruct =  record
     Wnd: HWND;
     wFunc: UINT;
     pFrom: PChar;
     pTo: PChar;
     fFlags: Word; // FILEOP_FLAGS;
     fAnyOperationsAborted: BOOL;
     hNameMappings: HWND; // Pointer;
     lpszProgressTitle: PChar; { only used if FOF_SIMPLEPROGRESS }
   end;

const
// use in wFunc
   { $EXTERNALSYM FO_MOVE }
   FO_MOVE           = $0001;
   { $EXTERNALSYM FO_COPY }
   FO_COPY           = $0002;
   { $EXTERNALSYM FO_DELETE }
   FO_DELETE         = $0003;
   { $EXTERNALSYM FO_RENAME }
   FO_RENAME         = $0004;
// use in fFlags
   { $EXTERNALSYM FOF_MULTIDESTFILES }
   FOF_MULTIDESTFILES         = $0001;
   { $EXTERNALSYM FOF_CONFIRMMOUSE }
   FOF_CONFIRMMOUSE           = $0002;
   { $EXTERNALSYM FOF_SILENT }
   FOF_SILENT                 = $0004;  { don't create progress/report }
   { $EXTERNALSYM FOF_RENAMEONCOLLISION }
   FOF_RENAMEONCOLLISION      = $0008;
   { $EXTERNALSYM FOF_NOCONFIRMATION }
   FOF_NOCONFIRMATION         = $0010;  { Don't prompt the user. }
   { $EXTERNALSYM FOF_WANTMAPPINGHANDLE }
   FOF_WANTMAPPINGHANDLE      = $0020;  { Fill in
SHFILEOPSTRUCT.hNameMappings
                                          Must be freed using
SHFreeNameMappings }
   { $EXTERNALSYM FOF_ALLOWUNDO }
   FOF_ALLOWUNDO              = $0040;
   { $EXTERNALSYM FOF_FILESONLY }
   FOF_FILESONLY              = $0080;  { on *.*, do only files }
   { $EXTERNALSYM FOF_SIMPLEPROGRESS }
   FOF_SIMPLEPROGRESS         = $0100;  { means don't show names of files }
   { $EXTERNALSYM FOF_NOCONFIRMMKDIR }
   FOF_NOCONFIRMMKDIR         = $0200;  { don't confirm making any
needed dirs }
   { $EXTERNALSYM FOF_NOERRORUI }
   FOF_NOERRORUI              = $0400;  { don't put up error UI }


function SHFileOperation(const lpFileOp: TSHFileOpStruct):Integer;
external '[email protected] stdcall';

{****************************************************************}
{****************************************************************}
{****************************************************************}

function BackupDir(const fromDir, toDir: string; IsMove: Boolean): Boolean;
var
  fos: TSHFileOpStruct;
  _fromDir, _toDir: string;
  SR: TFindRec;
  res: Boolean;
begin
    ForceDirectories(toDir);
  if IsMove then
    fos.wFunc  := FO_MOVE else
    fos.wFunc  := FO_COPY;
    fos.fFlags := FOF_FILESONLY or FOF_SILENT or
               FOF_NOCONFIRMATION or FOF_NOCONFIRMMKDIR;
    _fromDir:= AddBackslash(fromDir);
    _toDir  := AddBackslash(toDir);
  if (Length(fromDir) = Length(_fromDir)) then
    begin
        res:= FindFirst(_fromDir + '*', SR);
      try
        while res do
        begin
          if (SR.Name <> '') and (SR.Name <> '.') and (SR.Name <> '..') then
          begin
            if SR.Attributes = FILE_ATTRIBUTE_DIRECTORY then
              begin
                _fromDir:= _fromDir + SR.Name + #0#0;
                _toDir  := _toDir + #0#0;
                fos.pFrom  := PChar(_fromDir);
                fos.pTo    := PChar(_toDir);
              end else
              begin
                _fromDir:= _fromDir + SR.Name + #0#0;
                _toDir  := _toDir   + SR.Name + #0#0;
                fos.pFrom  := PChar(_fromDir);
                fos.pTo    := PChar(_toDir);
              end;
                Result := (0 = ShFileOperation(fos));
                _fromDir:= ExtractFilePath(_fromDir);
                _toDir:= ExtractFilePath(_toDir);
          end;
          res := FindNext(SR);
        end;
      finally
        FindClose(SR);
      end;
    end else
    begin
      _fromDir:= RemoveBackslashUnlessRoot(_fromDir) + #0#0;
      _toDir  := RemoveBackslashUnlessRoot(_toDir)   + #0#0;
      fos.pFrom  := PChar(_fromDir);
      fos.pTo    := PChar(_toDir);
      Result := (0 = ShFileOperation(fos));
    end;
end;

{****************************************************************}
function MoveDir(const fromDir, toDir: string): Boolean;
begin
  Result := BackupDir(fromDir, toDir, True);
end;

{****************************************************************}
function CopyDir(const fromDir, toDir: string): Boolean;
begin
  Result := BackupDir(fromDir, toDir, False);
end;

{****************************************************************}
function DelDir(dir: string; toRecycle: Boolean): Boolean;
var
  fos: TSHFileOpStruct;
  _dir: string;
begin
    _dir:= RemoveBackslashUnlessRoot(dir) + #0#0;
    fos.wFunc  := FO_DELETE;
    fos.fFlags := FOF_SILENT or FOF_NOCONFIRMATION;
  if toRecycle then
    fos.fFlags := fos.fFlags or FOF_ALLOWUNDO;
    fos.pFrom  := PChar(_dir);
  Result := (0 = ShFileOperation(fos));
end;

{****************************************************************}
function RenameDir(const fromDir, toDir: string): Boolean;
var
  fos: TSHFileOpStruct;
  _fromDir, _toDir: string;
begin
    _fromDir:= RemoveBackslashUnlessRoot(fromDir) + #0#0;
    _toDir  := RemoveBackslashUnlessRoot(toDir) + #0#0;
    fos.wFunc  := FO_RENAME;
    fos.fFlags := FOF_FILESONLY or FOF_ALLOWUNDO or
              FOF_SILENT or FOF_NOCONFIRMATION;
    fos.pFrom  := PChar(_fromDir);
    fos.pTo    := PChar(_toDir);
  Result := (0 = ShFileOperation(fos));
end;

{****************************************************************}
function FilesMaskOperation(const fromDir, toDir, fileMask: string; FileOp: Integer; EmptyDirRemove: Boolean; toRecycle: Boolean): Boolean;
var
  fos: TSHFileOpStruct;
  _fromDir, _toDir: string;
  FSR, DSR: TFindRec;
  FindResult: Boolean;
  APath: string;
begin
  APath := AddBackslash(fromDir);
  FindResult := FindFirst(APath + fileMask, FSR);
  try
    while FindResult do
    begin
      if FSR.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then
        begin
          Case FileOp of
            FO_COPY:
              begin
                fos.wFunc  := FO_COPY;
              end;
            FO_MOVE:
              begin
                fos.wFunc  := FO_MOVE;
              end;
            FO_DELETE:
              begin
                fos.wFunc  := FO_DELETE;
                if toRecycle then fos.fFlags := fos.fFlags or FOF_ALLOWUNDO;
              end;
            FO_RENAME:
              begin
                fos.wFunc  := FO_RENAME;
              end;
          else
            ;
          end;
            fos.fFlags := fos.fFlags or FOF_FILESONLY or FOF_SILENT or
                   FOF_NOCONFIRMATION or FOF_NOCONFIRMMKDIR;
            _fromDir:= APath + FSR.Name + #0#0;
            _toDir:= AddBackslash(toDir) + FSR.Name + #0#0;
            ForceDirectories(ExtractFilePath(_toDir));
            fos.pFrom  := PChar(_fromDir);
            fos.pTo    := PChar(_toDir);
            Result := (0 = ShFileOperation(fos));
        end;
      FindResult := FindNext(FSR);
    end;
    FindResult := FindFirst(APath + '*.*', DSR);
    while FindResult do
    begin
      if ((DSR.Attributes and FILE_ATTRIBUTE_DIRECTORY) = FILE_ATTRIBUTE_DIRECTORY) and
        not ((DSR.Name = '.') or (DSR.Name = '..')) then
{Recursion} FilesMaskOperation(APath + DSR.Name, AddBackslash(toDir) + DSR.Name, fileMask, FileOp, EmptyDirRemove, toRecycle);
      FindResult := FindNext(DSR);
    end;
  finally
    FindClose(FSR);
    FindClose(DSR);
    if EmptyDirRemove then RemoveDir(APath);
  end;
end;

function CopyFiles(const fromDir, toDir, fileMask: string): Boolean;
begin
  Result := FilesMaskOperation(fromDir, toDir, fileMask,
         FO_COPY, False, False);
end;

function MoveFiles(const fromDir, toDir, fileMask: string): Boolean;
begin
  Result := FilesMaskOperation(fromDir, toDir, fileMask,
         FO_MOVE, True, False);
end;

function DelFiles(const fromDir, fileMask: string; toRecycle: Boolean ): Boolean;
begin
  Result := FilesMaskOperation(fromDir, '', fileMask,
         FO_DELETE, True, toRecycle);
end;
{****************************************************************}
{****************************************************************}

Last edited by Gupta; 28-03-2017 at 04:24.
Reply With Quote
The Following 2 Users Say Thank You to Gupta For This Useful Post:
Cesar82 (28-03-2017), EzzEldin16 (05-01-2018)
  #8  
Old 31-03-2017, 20:12
78372 78372 is offline
Registered User
 
Join Date: Dec 2016
Location: Bangladesh
Posts: 650
Thanks: 772
Thanked 949 Times in 309 Posts
78372 is on a distinguished road
Q: How to change appname and other installation settings after compile?
A: Use the attached example. Just open the Setup.dll with notepad and you can change in CustomInstallSettings section. Put your reg files and redists in the support dir. Use the source to create your own scripts
Attached Files
File Type: 7z IS.7z (1.77 MB, 143 views)
File Type: 7z src.7z (992.1 KB, 90 views)
__________________
NOT AVAILABLE

Last edited by 78372; 01-04-2017 at 23:06. Reason: Source Uploaded
Reply With Quote
The Following 7 Users Say Thank You to 78372 For This Useful Post:
ADMIRAL (21-05-2020), EzzEldin16 (05-01-2018), Gupta (31-03-2017), Harsh ojha (18-08-2019), Jiva newstone (05-01-2018), Simorq (16-07-2017), Viper645 (01-04-2017)
  #9  
Old 04-04-2017, 03:20
78372 78372 is offline
Registered User
 
Join Date: Dec 2016
Location: Bangladesh
Posts: 650
Thanks: 772
Thanked 949 Times in 309 Posts
78372 is on a distinguished road
How to add unlimited registey values by an ini?

You can use the attached example. Include the iss with your installer script and edit the registry.ini file
Attached Files
File Type: rar RegExample.rar (655 Bytes, 34 views)
__________________
NOT AVAILABLE
Reply With Quote
The Following 2 Users Say Thank You to 78372 For This Useful Post:
EzzEldin16 (05-01-2018), hitman797 (04-08-2022)
  #10  
Old 26-04-2017, 09:02
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
How can I protect my Script from Vultures?
Here,
uses tools by altef_4.
open ZMKr.exe, compress your script.iss{should be of same name} with this
and make Data.cab
compile ISSPP.iss

Now for distribution of your file, just distribute ISSPP.exe with IS_Files( both in ISSPP Folder )
Attached Files
File Type: 7z ISSPP_pckr_Edition.7z (1.44 MB, 287 views)
Reply With Quote
The Following 7 Users Say Thank You to Gupta For This Useful Post:
78372 (29-04-2017), ADMIRAL (10-06-2020), EzzEldin16 (05-01-2018), Harsh ojha (18-08-2019), KaktoR (23-08-2017), romulus_ut3 (27-04-2017), Titeuf (06-01-2018)
  #11  
Old 05-01-2018, 06:03
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
Join many Files to One using Inno Only

Code:
const
  joinFileBufsize = 4096;

procedure ConcatenateFiles(const InFileNames: array of string; const OutFileName: string);
var
  i: Integer;
  InStream, OutStream: TFileStream;
  read : longInt;
  Buffer : string;
begin
  OutStream := TFileStream.Create(OutFileName, fmOpenwrite);
  try
    // if not done so, read() will fail, maybe it internally assumes that bufsize is 0
    for i := 0 to joinFileBufsize do
      buffer := buffer + '0';
    for i := 0 to high(InFileNames) do
    begin
      InStream := TFileStream.Create(InFileNames[i], fmOpenRead);
      try
        while InStream.Position <> InStream.Size do
        begin
          read := InStream.Read(buffer,joinFileBufsize);
          OutStream.Write(buffer,read);
        end;
      finally
        InStream.Free;
      end;
    end;
  finally
    OutStream.Free;
  end;
end;

function InitializeSetup(): Boolean;
begin
  ConcatenateFiles(['test.iss','join.iss'],'JoinTest');
end;
Reply With Quote
The Following 4 Users Say Thank You to Gupta For This Useful Post:
78372 (05-01-2018), ADMIRAL (21-05-2020), EzzEldin16 (05-01-2018), Simorq (27-02-2018)
  #12  
Old 05-01-2018, 06:25
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 714 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
Common WinAPI for Inno
PS: This will get updates with the time with changelog

Code:
#ifdef UNICODE
    #define A "W"
#else
    #define A "A"
#endif

#ifndef WINDOWSH
  #define WINDOWSH
#endif

const
  {PRIORITY_CLASSES}
  //https://msdn.microsoft.com/en-us/library/windows/desktop/ms686219(v=vs.85).aspx
  NORMAL_PRIORITY_CLASS           = $00000020;
  IDLE_PRIORITY_CLASS             = $00000040;
  HIGH_PRIORITY_CLASS             = $00000080;
  REALTIME_PRIORITY_CLASS         = $00000100;

  {MOUSE_EVENTS}
  //https://msdn.microsoft.com/en-us/library/windows/desktop/ms646260(v=vs.85).aspx
  MOUSEEVENTF_MOVE            = $0001; { mouse move }
  MOUSEEVENTF_LEFTDOWN        = $0002; { left button down }
  MOUSEEVENTF_LEFTUP          = $0004; { left button up }
  MOUSEEVENTF_RIGHTDOWN       = $0008; { right button down }
  MOUSEEVENTF_RIGHTUP         = $0010; { right button up }
  MOUSEEVENTF_MIDDLEDOWN      = $0020; { middle button down }
  MOUSEEVENTF_MIDDLEUP        = $0040; { middle button up }
  MOUSEEVENTF_WHEEL           = $0800; { wheel button rolled }
  MOUSEEVENTF_HWHEEL          = $1000; { hwheel button rolled }
  MOUSEEVENTF_MOVE_NOCOALESCE = $2000; { hwheel button rolled }
  MOUSEEVENTF_ABSOLUTE        = $8000; { absolute move }

  {ANIMATE_WINDOWS}
  //https://msdn.microsoft.com/en-us/library/windows/desktop/ms632669(v=vs.85).aspx
  AW_FADE_IN = $00080000;
  AW_FADE_OUT = $00090000;
  AW_SLIDE_IN_LEFT = $00040001;
  AW_SLIDE_OUT_LEFT = $00050002;
  AW_SLIDE_IN_RIGHT = $00040002;
  AW_SLIDE_OUT_RIGHT = $00050001;
  AW_SLIDE_IN_TOP = $00040004;
  AW_SLIDE_OUT_TOP = $00050008;
  AW_SLIDE_IN_BOTTOM = $00040008;
  AW_SLIDE_OUT_BOTTOM = $00050004;
  AW_DIAG_SLIDE_IN_TOPLEFT = $00040005;
  AW_DIAG_SLIDE_OUT_TOPLEFT = $0005000a;
  AW_DIAG_SLIDE_IN_TOPRIGHT = $00040006;
  AW_DIAG_SLIDE_OUT_TOPRIGHT = $00050009;
  AW_DIAG_SLIDE_IN_BOTTOMLEFT = $00040009;
  AW_DIAG_SLIDE_OUT_BOTTOMLEFT = $00050006;
  AW_DIAG_SLIDE_IN_BOTTOMRIGHT = $0004000a;
  AW_DIAG_SLIDE_OUT_BOTTOMRIGHT = $00050005;
  AW_EXPLODE = $00040010;
  AW_IMPLODE = $00050010;
  AW_HOR_POSITIVE = $00000001;
  AW_HOR_NEGATIVE = $00000002;
  AW_VER_POSITIVE = $00000004;
  AW_VER_NEGATIVE = $00000008;
  AW_CENTER = $00000010;
  AW_HIDE = $00010000;
  AW_ACTIVATE = $00020000;
  AW_SLIDE = $00040000;
  AW_BLEND = $00080000;


  {System Metrices}
  //https://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx
  SM_ARRANGE = 56;
  SM_CLEANBOOT = 67;
  SM_CMONITORS = 80;
  SM_CMOUSEBUTTONS = 43;
  SM_CONVERTIBLESLATEMODE =  $2003;
  SM_CXBORDER = 5;
  SM_CXCURSOR = 13;
  SM_CXDLGFRAME = 7;
  SM_CXDOUBLECLK = 36;
  SM_CXDRAG = 68;
  SM_CXEDGE = 45;
  SM_CXFIXEDFRAME = 7;
  SM_CXFOCUSBORDER = 83;
  SM_CXFRAME = 32;
  SM_CXFULLSCREEN = 16;
  SM_CXHSCROLL = 16;
  SM_CXHTHUMB = 10;
  SM_CXICON = 11;
  SM_CXICONSPACING = 38;
  SM_CXMAXIMIZED = 61;
  SM_CXMAXTRACK = 59;
  SM_CXMENUCHECK = 71;
  SM_CXMENUSIZE = 54;
  SM_CXMIN = 28;
  SM_CXMINIMIZED = 57;
  SM_CXMINSPACING = 47;
  SM_CXMINTRACK = 34;
  SM_CXPADDEDBORDER = 92;
  SM_CXSCREEN = 0;
  SM_CXSIZE = 30;
  SM_CXSIZEFRAME = 32;
  SM_CXSMICON = 49;
  SM_CXSMSIZE = 52;
  SM_CXVIRTUALSCREEN = 78;
  SM_CXVSCROLL = 2;
  SM_CYBORDER = 6;
  SM_CYCAPTION = 4;
  SM_CYCURSOR = 14;
  SM_CYDLGFRAME = 8 ;
  SM_CYDOUBLECLK = 37;
  SM_CYDRAG = 69;
  SM_CYEDGE = 46;
  SM_CYFIXEDFRAME = 8;
  SM_CYFOCUSBORDER = 84;
  SM_CYFRAME = 33;
  SM_CYFULLSCREEN = 17;
  SM_CYHSCROLL = 3;
  SM_CYICON = 12;
  SM_CYICONSPACING = 39;
  SM_CYKANJIWINDOW = 18;
  SM_CYMAXIMIZED = 62;
  SM_CYMAXTRACK = 60;
  SM_CYMENU = 15;
  SM_CYMENUCHECK = 72 ;
  SM_CYMENUSIZE = 55;
  SM_CYMIN = 29;
  SM_CYMINIMIZED = 58;
  SM_CYMINSPACING = 48;
  SM_CYMINTRACK = 35;
  SM_CYSCREEN = 1;
  SM_CYSIZE = 31;
  SM_CYSIZEFRAME = 33;
  SM_CYSMCAPTION = 51;
  SM_CYSMICON = 50;
  SM_CYSMSIZE = 53;
  SM_CYVIRTUALSCREEN = 79;
  SM_CYVSCROLL = 20;
  SM_CYVTHUMB = 9 ;
  SM_DIGITIZER = 94;
  SM_IMMENABLED = 82;
  SM_MAXIMUMTOUCHES = 95;
  SM_MEDIACENTER = 87;
  SM_MENUDROPALIGNMENT = 40;
  SM_MIDEASTENABLED = 74;
  SM_MOUSEPRESENT = 19;
  SM_MOUSEHORIZONTALWHEELPRESENT = 91;
  SM_MOUSEWHEELPRESENT = 75;
  SM_NETWORK = 63;
  SM_PENWINDOWS = 41;
  SM_REMOTECONTROL = $2001;
  SM_REMOTESESSION = $1000;
  SM_SAMEDISPLAYFORMAT = 81;
  SM_SECURE =44;
  SM_SERVERR2 = 89;
  SM_SHOWSOUNDS = 70;
  SM_SHUTTINGDOWN = $2000;
  SM_SLOWMACHINE = 73;
  SM_STARTER = 88;
  SM_SWAPBUTTON = 23;
  SM_SYSTEMDOCKED = $2004;
  SM_TABLETPC = 86;
  SM_XVIRTUALSCREEN = 76;
  SM_YVIRTUALSCREEN = 77;






 { Window field offsets for GetWindowLong() }
  {$EXTERNALSYM GWL_WNDPROC}
  GWL_WNDPROC = -4;
  {$EXTERNALSYM GWL_HINSTANCE}
  GWL_HINSTANCE = -6;
  {$EXTERNALSYM GWL_HWNDPARENT}
  GWL_HWNDPARENT = -8;
  {$EXTERNALSYM GWL_STYLE}
  GWL_STYLE = -16;
  {$EXTERNALSYM GWL_EXSTYLE}
  GWL_EXSTYLE = -20;
  {$EXTERNALSYM GWL_USERDATA}
  GWL_USERDATA = -21;
  {$EXTERNALSYM GWL_ID}
  GWL_ID = -12;

  { Class field offsets for GetClassLong() }
  {$EXTERNALSYM GCL_MENUNAME}
  GCL_MENUNAME = -8;
  {$EXTERNALSYM GCL_HBRBACKGROUND}
  GCL_HBRBACKGROUND = -10;
  {$EXTERNALSYM GCL_HCURSOR}
  GCL_HCURSOR = -12;
  {$EXTERNALSYM GCL_HICON}
  GCL_HICON = -14;
  {$EXTERNALSYM GCL_HMODULE}
  GCL_HMODULE = -16;
  {$EXTERNALSYM GCL_CBWNDEXTRA}
  GCL_CBWNDEXTRA = -18;
  {$EXTERNALSYM GCL_CBCLSEXTRA}
  GCL_CBCLSEXTRA = -20;
  {$EXTERNALSYM GCL_WNDPROC}
  GCL_WNDPROC = -24;
  {$EXTERNALSYM GCL_STYLE}
  GCL_STYLE = -26;
  {$EXTERNALSYM GCW_ATOM}
  GCW_ATOM = -32;
  {$EXTERNALSYM GCL_HICONSM}
  GCL_HICONSM = -34;


  {EXTENDED WINDOWS STYLES}
  { Window Styles }
  {$EXTERNALSYM WS_OVERLAPPED}
  WS_OVERLAPPED = 0;
  {$EXTERNALSYM WS_POPUP}
  WS_POPUP = $80000000;
  {$EXTERNALSYM WS_CHILD}
  WS_CHILD = $40000000;
  {$EXTERNALSYM WS_MINIMIZE}
  WS_MINIMIZE = $20000000;
  {$EXTERNALSYM WS_VISIBLE}
  WS_VISIBLE = $10000000;
  {$EXTERNALSYM WS_DISABLED}
  WS_DISABLED = $8000000;
  {$EXTERNALSYM WS_CLIPSIBLINGS}
  WS_CLIPSIBLINGS = $4000000;
  {$EXTERNALSYM WS_CLIPCHILDREN}
  WS_CLIPCHILDREN = $2000000;
  {$EXTERNALSYM WS_MAXIMIZE}
  WS_MAXIMIZE = $1000000;
  {$EXTERNALSYM WS_CAPTION}
  WS_CAPTION = $C00000;      { WS_BORDER or WS_DLGFRAME  }
  {$EXTERNALSYM WS_BORDER}
  WS_BORDER = $800000;
  {$EXTERNALSYM WS_DLGFRAME}
  WS_DLGFRAME = $400000;
  {$EXTERNALSYM WS_VSCROLL}
  WS_VSCROLL = $200000;
  {$EXTERNALSYM WS_HSCROLL}
  WS_HSCROLL = $100000;
  {$EXTERNALSYM WS_SYSMENU}
  WS_SYSMENU = $80000;
  {$EXTERNALSYM WS_THICKFRAME}
  WS_THICKFRAME = $40000;
  {$EXTERNALSYM WS_GROUP}
  WS_GROUP = $20000;
  {$EXTERNALSYM WS_TABSTOP}
  WS_TABSTOP = $10000;

  {$EXTERNALSYM WS_MINIMIZEBOX}
  WS_MINIMIZEBOX = $20000;
  {$EXTERNALSYM WS_MAXIMIZEBOX}
  WS_MAXIMIZEBOX = $10000;

  {$EXTERNALSYM WS_TILED}
  WS_TILED = WS_OVERLAPPED;
  {$EXTERNALSYM WS_ICONIC}
  WS_ICONIC = WS_MINIMIZE;
  {$EXTERNALSYM WS_SIZEBOX}
  WS_SIZEBOX = WS_THICKFRAME;

  { Common Window Styles }
  {$EXTERNALSYM WS_OVERLAPPEDWINDOW}
  WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or
    WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX);
  {$EXTERNALSYM WS_TILEDWINDOW}
  WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW;
  {$EXTERNALSYM WS_POPUPWINDOW}
  WS_POPUPWINDOW = (WS_POPUP or WS_BORDER or WS_SYSMENU);
  {$EXTERNALSYM WS_CHILDWINDOW}
  WS_CHILDWINDOW = (WS_CHILD);

  { Extended Window Styles }
  {$EXTERNALSYM WS_EX_DLGMODALFRAME}
  WS_EX_DLGMODALFRAME = 1;
  {$EXTERNALSYM WS_EX_NOPARENTNOTIFY}
  WS_EX_NOPARENTNOTIFY = 4;
  {$EXTERNALSYM WS_EX_TOPMOST}
  WS_EX_TOPMOST = 8;
  {$EXTERNALSYM WS_EX_ACCEPTFILES}
  WS_EX_ACCEPTFILES = $10;
  {$EXTERNALSYM WS_EX_TRANSPARENT}
  WS_EX_TRANSPARENT = $20;
  {$EXTERNALSYM WS_EX_MDICHILD}
  WS_EX_MDICHILD = $40;
  {$EXTERNALSYM WS_EX_TOOLWINDOW}
  WS_EX_TOOLWINDOW = $80;
  {$EXTERNALSYM WS_EX_WINDOWEDGE}
  WS_EX_WINDOWEDGE = $100;
  {$EXTERNALSYM WS_EX_CLIENTEDGE}
  WS_EX_CLIENTEDGE = $200;
  {$EXTERNALSYM WS_EX_CONTEXTHELP}
  WS_EX_CONTEXTHELP = $400;

  {$EXTERNALSYM WS_EX_RIGHT}
  WS_EX_RIGHT = $1000;
  {$EXTERNALSYM WS_EX_LEFT}
  WS_EX_LEFT = 0;
  {$EXTERNALSYM WS_EX_RTLREADING}
  WS_EX_RTLREADING = $2000;
  {$EXTERNALSYM WS_EX_LTRREADING}
  WS_EX_LTRREADING = 0;
  {$EXTERNALSYM WS_EX_LEFTSCROLLBAR}
  WS_EX_LEFTSCROLLBAR = $4000;
  {$EXTERNALSYM WS_EX_RIGHTSCROLLBAR}
  WS_EX_RIGHTSCROLLBAR = 0;

  {$EXTERNALSYM WS_EX_CONTROLPARENT}
  WS_EX_CONTROLPARENT = $10000;
  {$EXTERNALSYM WS_EX_STATICEDGE}
  WS_EX_STATICEDGE = $20000;
  {$EXTERNALSYM WS_EX_APPWINDOW}
  WS_EX_APPWINDOW = $40000;
  {$EXTERNALSYM WS_EX_OVERLAPPEDWINDOW}
  WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE);
  {$EXTERNALSYM WS_EX_PALETTEWINDOW}
  WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST);

  {$EXTERNALSYM WS_EX_LAYERED}
  WS_EX_LAYERED = $00080000;
  {$EXTERNALSYM WS_EX_NOINHERITLAYOUT}
  WS_EX_NOINHERITLAYOUT = $00100000; // Disable inheritence of mirroring by children
  {$EXTERNALSYM WS_EX_LAYOUTRTL}
  WS_EX_LAYOUTRTL = $00400000; // Right to left mirroring
  {$EXTERNALSYM WS_EX_COMPOSITED}
  WS_EX_COMPOSITED = $02000000;
  {$EXTERNALSYM WS_EX_NOACTIVATE}
  WS_EX_NOACTIVATE = $08000000;

  LWA_ALPHA = $2;

{ ShowWindow() Commands }
  {$EXTERNALSYM SW_SHOWNA}
  SW_SHOWNA = 8;
  {$EXTERNALSYM SW_RESTORE}
  SW_RESTORE = 9;
  {$EXTERNALSYM SW_SHOWDEFAULT}
  SW_SHOWDEFAULT = 10;
  {$EXTERNALSYM SW_FORCEMINIMIZE}
  SW_FORCEMINIMIZE = 11;
  {$EXTERNALSYM SW_MAX}
  SW_MAX = 11;

  { Old ShowWindow() Commands }
  {$EXTERNALSYM HIDE_WINDOW}
  HIDE_WINDOW = 0;
  {$EXTERNALSYM SHOW_OPENWINDOW}
  SHOW_OPENWINDOW = 1;
  {$EXTERNALSYM SHOW_ICONWINDOW}
  SHOW_ICONWINDOW = 2;
  {$EXTERNALSYM SHOW_FULLSCREEN}
  SHOW_FULLSCREEN = 3;
  {$EXTERNALSYM SHOW_OPENNOACTIVATE}
  SHOW_OPENNOACTIVATE = 4;

  { Identifiers for the WM_SHOWWINDOW message }
  {$EXTERNALSYM SW_PARENTCLOSING}
  SW_PARENTCLOSING = 1;
  {$EXTERNALSYM SW_OTHERZOOM}
  SW_OTHERZOOM = 2;
  {$EXTERNALSYM SW_PARENTOPENING}
  SW_PARENTOPENING = 3;
  {$EXTERNALSYM SW_OTHERUNZOOM}
  SW_OTHERUNZOOM = 4;

  { SetWindowPos Flags }
  {$EXTERNALSYM SWP_NOSIZE}
  SWP_NOSIZE = 1;
  {$EXTERNALSYM SWP_NOMOVE}
  SWP_NOMOVE = 2;
  {$EXTERNALSYM SWP_NOZORDER}
  SWP_NOZORDER = 4;
  {$EXTERNALSYM SWP_NOREDRAW}
  SWP_NOREDRAW = 8;
  {$EXTERNALSYM SWP_NOACTIVATE}
  SWP_NOACTIVATE = $10;
  {$EXTERNALSYM SWP_FRAMECHANGED}
  SWP_FRAMECHANGED = $20;    { The frame changed: send WM_NCCALCSIZE }
  {$EXTERNALSYM SWP_SHOWWINDOW}
  SWP_SHOWWINDOW = $40;
  {$EXTERNALSYM SWP_HIDEWINDOW}
  SWP_HIDEWINDOW = $80;
  {$EXTERNALSYM SWP_NOCOPYBITS}
  SWP_NOCOPYBITS = $100;
  {$EXTERNALSYM SWP_NOOWNERZORDER}
  SWP_NOOWNERZORDER = $200;  { Don't do owner Z ordering }
  {$EXTERNALSYM SWP_NOSENDCHANGING}
  SWP_NOSENDCHANGING = $400;  { Don't send WM_WINDOWPOSCHANGING }
  {$EXTERNALSYM SWP_DRAWFRAME}
  SWP_DRAWFRAME = SWP_FRAMECHANGED;
  {$EXTERNALSYM SWP_NOREPOSITION}
  SWP_NOREPOSITION = SWP_NOOWNERZORDER;
  {$EXTERNALSYM SWP_DEFERERASE}
  SWP_DEFERERASE = $2000;
  {$EXTERNALSYM SWP_ASYNCWINDOWPOS}
  SWP_ASYNCWINDOWPOS = $4000;

  {$EXTERNALSYM HWND_TOP}
  HWND_TOP = (0);
  {$EXTERNALSYM HWND_BOTTOM}
  HWND_BOTTOM = (1);
  {$EXTERNALSYM HWND_TOPMOST}
  HWND_TOPMOST = (-1);
  {$EXTERNALSYM HWND_NOTOPMOST}
  HWND_NOTOPMOST = (-2);

   { GetSetWindowWordLong offsets for use with WC_DIALOG windows }
  {$EXTERNALSYM DWL_MSGRESULT}
  DWL_MSGRESULT = 0;
  {$EXTERNALSYM DWL_DLGPROC}
  DWL_DLGPROC = 4;
  {$EXTERNALSYM DWL_USER}
  DWL_USER = 8;

  { Background Modes }
  {$EXTERNALSYM TRANSPARENT}
  TRANSPARENT = 1;
  {$EXTERNALSYM OPAQUE}
  OPAQUE = 2;
  {$EXTERNALSYM BKMODE_LAST}
  BKMODE_LAST = 2;

  {ARC Direction}
  {$EXTERNALSYM AD_COUNTERCLOCKWISE}
  AD_COUNTERCLOCKWISE = 1;
  {$EXTERNALSYM AD_CLOCKWISE}
  AD_CLOCKWISE = 2;

  {TBPFLAG}
  TBPF_NOPROGRESS = $0;
  TBPF_INDETERMINATE = $1;
  TBPF_NORMAL = $2;
  TBPF_ERROR = $4;
  TBPF_PAUSED = $8;

type
  HDC = THandle;

function ReleaseCapture: HWND;
  external '[email protected] stdcall';
function GetCapture: HWND;
  external '[email protected] stdcall';
function SetCapture(hWnd: HWND): HWND;
  external '[email protected] stdcall';

function AnimateWindow(hWnd: HWND; dwTime: DWORD; dwFlags: DWORD): Boolean;
  external '[email protected] stdcall';

function ShowWindow(hWnd: HWND; nCmdShow: Integer):Boolean;
  external '[email protected] stdcall';
function DestroyWindow(hWnd: HWND):Boolean;
  external '[email protected] stdcall';

function GetSystemMetrics(nIndex :Integer):Integer;
  external '[email protected] stdcall';

function SetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, wFlags: Longint):Boolean;
  external '[email protected] stdcall';
function MoveWindow(hWnd: HWND; X, Y, nWidth, nHeight: Longint; bRepaint: BOOL):Boolean;
  external '[email protected] stdcall';
function GetClientRect(hWnd: HWND; var lpRect :TRECT):BOOL;
  external '[email protected] stdcall';
function GetWindowRect(hWnd: HWND; var lpRect :TRECT):BOOL;
  external '[email protected] stdcall';
function ScreenToClient(hWnd: HWND; var lpPoint :TPoint):BOOL;
  external '[email protected] stdcall';
function ClientToScreen(hWnd: HWND; var lpPoint :TPoint):BOOL;
  external '[email protected] stdcall';
function GetDC( hWnd: HWND ):HDC;
  external '[email protected] stdcall';
function GetCursorPos(var lpPoint : TPoint):BOOL;
  external '[email protected] stdcall';

function SetBkMode(hdc: HDC; iBkMode :Integer):Integer;
  external '[email protected] stdcall';

{Line And Curve Function}
function Arc(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXStartArc, nYStartArc, nXEndArc, nYEndArc:Integer):BOOL;
  external '[email protected] stdcall';
function AngleArc(hdc: HDC; X, Y :Integer; dwRadius : DWORD; eStartAngle, eSweepAngle :Single):BOOL;
  external '[email protected] stdcall';
function ArcTo(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2 : Integer):BOOL;
  external '[email protected] stdcall';
function  GetArcDirection(hdc: HDC):Integer;
  external '[email protected] stdcall';
function SetArcDirection(DC: HDC; Direction: Integer): Integer;
  external '[email protected] stdcall';
function LineTo(DC: HDC; X, Y: Integer): BOOL;
  external '[email protected] stdcall';
function MoveToEx(DC: HDC; p2, p3: Integer; var p4: TPoint): BOOL;
  external '[email protected] stdcall';
function Rectangle( hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect :Integer):BOOL;
  external '[email protected] stdcall';

function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint;
  external 'SetWindowLong{#A}@user32.dll stdcall';
function GetWindowLong(hWnd: HWND; nIndex: Longint): Longint;
  external 'GetWindowLong{#A}@user32.dll stdcall';

function SetLayeredWindowAttributes(hwnd:HWND; crKey:Longint; bAlpha:byte; dwFlags:longint ):longint;
  external 'SetLayeredWindowAttributes@user32 stdcall';

function CallWindowProc(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam, lParam: Longint): Longint;
  external '[email protected] stdcall';

function GetTickCount: DWORD;
  external '[email protected] stdcall';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord;
 external '[email protected] stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord;
 external '[email protected] stdcall';

function Size64(Hi, Lo: Integer): Extended;
begin
	Result:= Lo;
  if Lo < 0 then
   Result := Result + MaxInt + MaxInt + 2;
	for Hi := Hi - 1 Downto 0 do
   Result:= Result + MaxInt + MaxInt + 2;
   Result:=Result/(1024*1024);
End;

function GetFileSize(FileName :String): Extended;
var
  TempRec : TFindRec;
begin
  FindFirst(FileName,TempRec);
  Result := Size64(TempRec.SizeHigh,TempRec.SizeLow);
end;
Reply With Quote
The Following 3 Users Say Thank You to Gupta For This Useful Post:
78372 (05-01-2018), EzzEldin16 (05-01-2018), Jiva newstone (05-01-2018)
  #13  
Old 27-02-2018, 17:28
Simorq's Avatar
Simorq Simorq is offline
Registered User
 
Join Date: Mar 2014
Location: Iran
Posts: 642
Thanks: 3,602
Thanked 1,304 Times in 464 Posts
Simorq is on a distinguished road
Hi
Please use an example of ppx2.
Reply With Quote
  #14  
Old 28-04-2021, 20:53
Newbie-repacker Newbie-repacker is offline
Banned
 
Join Date: Apr 2021
Location: In My Home Sweet Home
Posts: 27
Thanks: 57
Thanked 0 Times in 0 Posts
Newbie-repacker is on a distinguished road
Quote:
Originally Posted by Gupta View Post
How can I protect my Script from Vultures?
Here,
uses tools by altef_4.
open ZMKr.exe, compress your script.iss{should be of same name} with this
and make Data.cab
compile ISSPP.iss

Now for distribution of your file, just distribute ISSPP.exe with IS_Files( both in ISSPP Folder )
Need a lil help

Actually if i know the pass of data.cab
how it is possible to extract the script.iss

Listen
This script is mine only............
but am really feeling very torpid to make that script again......
pls help me if u can.......
I swear the script is mine original

I want it urgently as am working on setup installer.....
I converted its .iss to data.cab
the next day my pc crashed and i was only left with data.cab(thanks to me, i made its backup but not of script.iss )

So can u help me

Last edited by Newbie-repacker; 01-05-2021 at 11:33.
Reply With Quote
  #15  
Old 29-04-2021, 02:47
PsYcHo_RaGE's Avatar
PsYcHo_RaGE PsYcHo_RaGE is offline
Registered User
 
Join Date: Mar 2018
Location: DarckSide
Posts: 238
Thanks: 193
Thanked 157 Times in 77 Posts
PsYcHo_RaGE is on a distinguished road
Quote:
Originally Posted by Newbie-repacker View Post
Need a lil help

Actually if i know the pass of data.cab
how it is possible to extract the script.iss

I want it urgently as am working on setup installer.....
I converted its .iss to data.cab
the next day my pc crashed and i was only left with data.cab(thanks to me, i made its backup but not of script.iss )

So can u help me
The post was about "How to protect it from guys like you?"
Nothing can help you here but to figure it out yourself
__________________
“WE ALL GO A LITTLE MAD SOMETIMES”
Reply With Quote
The Following 4 Users Say Thank You to PsYcHo_RaGE For This Useful Post:
doofoo24 (30-04-2021), Grumpy (30-04-2021), KaktoR (29-04-2021), mausschieber (29-04-2021)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BlackBox v2 y_thelastknight Conversion Tutorials 566 13-10-2023 17:04
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
Inno Setup: Additional Libraries altef_4 Conversion Tutorials 50 21-10-2020 09:59
Useful Dll for Inno Setup users peterf1999 Conversion Tutorials 88 01-12-2017 16:00
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57



All times are GMT -7. The time now is 04:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com