FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   altef_4's installer (https://fileforums.com/showthread.php?t=93899)

altef_4 13-07-2013 06:31

Quote:

Originally Posted by red01 (Post 420953)
thanks for your reply

that error solved but now comes new one. :D

error 01 came first then i remove the line with error and proceed
it shows new error. see the pics.

just remove whole line with error

red01 13-07-2013 21:06

2 Attachment(s)
it works after removing that line

i am facing some issue here
1. it ask for next disk specially for data.srep (see the pic please) . it may be due to some error in my installer.ini (please take a look for that).

It extract everything smoothly after that.

2. it goes slowly upto 4% (extraction and installation) and then direcly jump from 4% to 17%.
after that there is no problem in installation percentage.

is it okay?

altef_4 14-07-2013 03:48

Quote:

Originally Posted by red01 (Post 420979)
it works after removing that line

i am facing some issue here
1. it ask for next disk specially for data.srep (see the pic please) . it may be due to some error in my installer.ini (please take a look for that).

It extract everything smoothly after that.

2. it goes slowly upto 4% (extraction and installation) and then direcly jump from 4% to 17%.
after that there is no problem in installation percentage.

is it okay?

1.Archive1Output={app}\data\ maybe this will be work, MAYBEEE xD
2.a)Records=0
b)Compile script
c)copy created records.inf from folder with setup.exe
d)paste created records.inf to Dll_Pack\ISDone\
e)Records=1
f)Compile script
g)maybe this will be work!!!

red01 14-07-2013 04:42

Quote:

Originally Posted by altef_4 (Post 420988)
1.Archive1Output={app}\data\ maybe this will be work, MAYBEEE xD
2.a)Records=0
b)Compile script
c)copy created records.inf from folder with setup.exe
d)paste created records.inf to Dll_Pack\ISDone\
e)Records=1
f)Compile script
g)maybe this will be work!!!

sorry but i cant see any records.inf there.:confused:

altef_4 14-07-2013 12:37

Quote:

Originally Posted by red01 (Post 420990)
sorry but i cant see any records.inf there.:confused:

b2)install game from your backup

red01 14-07-2013 20:27

Quote:

Originally Posted by altef_4 (Post 420997)
b2)install game from your backup

sorry but i dont get what you want to say...

how this will solve that issue?

altef_4 14-07-2013 23:29

1.Archive1Output={app}\data\ maybe this will be work, MAYBEEE xD
2.a)Records=0 (in installer.ini)
b)Compile script
b2)Install game from your compiled script (setup.exe)
c)copy created records.inf from folder with setup.exe (will be creatad after install)
d)paste created records.inf to Dll_Pack\ISDone\
e)Records=1
f)Compile script
g)maybe this will be work!!!

red01 15-07-2013 00:33

i will try the solution for issue no.2.

Issue 01 (asking for disk) solved after ur answer (1.Archive1Output={app}\data\ maybe this will be work, MAYBEEE xD)

...

can i make .cab or .zip files for the folders (graphics, files,languages, sound etc.) ?
just asking

altef_4 15-07-2013 04:49

Quote:

Originally Posted by red01 (Post 421013)
i will try the solution for issue no.2.

Issue 01 (asking for disk) solved after ur answer (1.Archive1Output={app}\data\ maybe this will be work, MAYBEEE xD)

...

can i make .cab or .zip files for the folders (graphics, files,languages, sound etc.) ?
just asking

ISDone 0.6f support .zip ,so my installer too

red01 15-07-2013 05:01

1 Attachment(s)
Quote:

Originally Posted by altef_4 (Post 421019)
ISDone 0.6f support .zip ,so my installer too

i make .zip files of file folder.
it gives me an error (see the pic).

red01 15-07-2013 05:05

Quote:

Originally Posted by altef_4 (Post 421011)
1.Archive1Output={app}\data\ maybe this will be work, MAYBEEE xD
2.a)Records=0 (in installer.ini)
b)Compile script
b2)Install game from your compiled script (setup.exe)

when i do
records=0 and compile the script and then finally install the game.

the installation progress bar shows 200% and did not finish installtion even i wait for 10 minutes, in last i have to cancel the installation.

what should i do now?

altef_4 16-07-2013 06:28

Quote:

Originally Posted by red01 (Post 421021)
when i do
records=0 and compile the script and then finally install the game.

the installation progress bar shows 200% and did not finish installtion even i wait for 10 minutes, in last i have to cancel the installation.

what should i do now?

if you change Records=0 progress will be more then 100% but must install your game normal, a.g you have 4 archives then progress wil be 400%

red01 16-07-2013 20:29

Quote:

Originally Posted by altef_4 (Post 421011)
1.Archive1Output={app}\data\ maybe this will be work, MAYBEEE xD
2.a)Records=0 (in installer.ini)
b)Compile script
b2)Install game from your compiled script (setup.exe)
c)copy created records.inf from folder with setup.exe (will be creatad after install)
d)paste created records.inf to Dll_Pack\ISDone\
e)Records=1
f)Compile script
g)maybe this will be work!!!


Thanks for your replies.

i follow the instructions.
issue one solved
Issue 2 , now it stuck at 38.4% and jump to 72%.

Thanks again
..

What about .zip issue?
DId you look for it?

altef_4 17-07-2013 07:10

Quote:

Originally Posted by red01 (Post 421066)
Thanks for your replies.

i follow the instructions.
issue one solved
Issue 2 , now it stuck at 38.4% and jump to 72%.

Thanks again
..

What about .zip issue?
DId you look for it?

show me what text in your line with error (line139)

red01 17-07-2013 20:29

1 Attachment(s)
for starting i start by making a .zip file of "File" folder.
then remove the original "File" folder.
and
compile the script and then it give me error. see the pic please.

method of zip creation.
i select all files within "File" folder and then create File.zip (no compression).

i try with file.zip in script (line with error) but no luck.

red01 17-07-2013 20:33

1 Attachment(s)
is it possible to add?

altef_4 18-07-2013 02:03

Quote:

Originally Posted by red01 (Post 421090)
for starting i start by making a .zip file of "File" folder.
then remove the original "File" folder.
and
compile the script and then it give me error. see the pic please.

method of zip creation.
i select all files within "File" folder and then create File.zip (no compression).

i try with file.zip in script (line with error) but no luck.

i don't right understand you before, you don't need pack any files located in folder with script because all this files are in setup.exe after compiling

red01 18-07-2013 02:30

Quote:

Originally Posted by altef_4 (Post 421096)
i don't right understand you before, you don't need pack any files located in folder with script because all this files are in setup.exe after compiling


you mean in end , i dont need those extra files and folders.
Just setup.exe and database is enough?
:D


what about my question about "Possible?" (look at the posts above)...

altef_4 18-07-2013 04:24

Quote:

Originally Posted by red01 (Post 421097)
you mean in end , i dont need those extra files and folders.
Just setup.exe and database is enough?
:D


what about my question about "Possible?" (look at the posts above)...

all files are nessesary to compile script after you use only setup.exe and archives

about posible, it's possible but in new versions when i did it

red01 18-07-2013 05:14

i am looking forward for that version. :D

Can i pm you? I want to learn something from you.

altef_4 19-07-2013 11:08

Quote:

Originally Posted by red01 (Post 421101)
i am looking forward for that version. :D

Can i pm you? I want to learn something from you.

ok

jksengko 12-08-2013 17:47

what happen??
 
1 Attachment(s)
pls toll me what happen??

pakrat2k2 12-08-2013 20:25

what was the error message ?

altef_4 13-08-2013 00:57

Quote:

Originally Posted by jksengko (Post 421827)
pls toll me what happen??

Inno Setup Enhanced Edition 5.5.1 UNICODE

altef_4 17-10-2013 03:30

1 Attachment(s)
hi guys, i need a little of your help, please test this tool on different os and hardware and report me about results, thanks :)

Razor12911 17-10-2013 07:26

1 Attachment(s)
there mate

mausschieber 17-10-2013 07:31

Quote:

Originally Posted by altef_4 (Post 424515)
hi guys, i need a little of your help, please test this tool on different os and hardware and report me about results, thanks :)

Works on Windows 8 Pro X64
See Screenshot
Information true

http://i.imagebanana.com/img/9g84ye8g/Unbenannt1.jpg

y_thelastknight 19-10-2013 03:39

mine windows 8 pro 32bit
http://img822.imageshack.us/img822/151/gzm9.png

altef_4 19-10-2013 07:36

also, please, confirm that information is true or not

y_thelastknight 19-10-2013 08:44

my information are true..

Razor12911 19-10-2013 11:03

mine weren't true. check the ram avaliable.

altef_4 19-10-2013 11:28

Quote:

Originally Posted by Razor12911 (Post 424623)
mine weren't true. check the ram avaliable.

i use Windows DxDiag to check the system, its easy but long, hare are code:
Code:

[Code]
//XML module 1.0
type
TTagPoint = record Name: String; BeginPos, EndPos, Level: Integer; end;

const
 
CP_ACP = 0; CP_UTF8 = 65001;

Function MultiByteToWideChar(CodePage: UINT; dwFlags: DWORD; lpMultiByteStr: PAnsiChar; cbMultiByte: integer; lpWideCharStr: PAnsiChar; cchWideChar: integer): longint; external '[email protected] stdcall';
Function WideCharToMultiByte(CodePage: UINT; dwFlags: DWORD; lpWideCharStr: PAnsiChar; cchWideChar: integer; lpMultiByteStr: PAnsiChar; cbMultiByte: integer; lpDefaultChar: integer; lpUsedDefaultChar: integer): longint; external '[email protected] stdcall';

function AnsiToUtf8(strSource: string): string;
var
nRet, nRet2: integer; WideCharBuf, MultiByteBuf: AnsiString;
begin
 
SetLength(WideCharBuf, Length(strSource) * 2);
  SetLength(MultiByteBuf, Length(strSource) * 2);
  nRet:= MultiByteToWideChar(CP_ACP, 0, strSource, -1, WideCharBuf, Length(WideCharBuf));
  nRet2:= WideCharToMultiByte(CP_UTF8, 0, WideCharBuf, -1, MultiByteBuf, Length(MultiByteBuf), 0, 0);
  MultiByteBuf:=Copy(MultiByteBuf, 1, nRet2-1);
  Result:= MultiByteBuf;
end;

function GetExists(TagArr: array of TTagPoint): Boolean;
var Part1, Part2, Temp: Boolean; n: integer;
begin
if
(GetArrayLength(TagArr) > 1) then begin
 
Temp:= True;
  for n:= GetArrayLength(TagArr)-1 downto 1 do begin
   
Part1:=False; If TagArr[n].BeginPos > TagArr[n-1].BeginPos then Part1:=True;
    Part2:=False; If TagArr[n].EndPos < TagArr[n-1].EndPos then Part2:=True;
    Temp:=Temp and (Part1 and Part2);
  end;
  If Temp then Result:= True;
end else begin
 
Result:=False; if (TagArr[0].BeginPos > 0) and (TagArr[0].EndPos > 0) then Result:= true;
end;
end;

function ExpandTags(const sFileText, sTagName: string): array of TTagPoint;
var i: integer; sTags: array of TTagPoint;
begin
SetArrayLength(Result, 0);
If Pos('\', STagName) > 0 then try
  repeat
   
i:= GetArrayLength(sTags); SetArrayLength(sTags, i+1);
    sTags[i].Name:= Copy(sTagName, 1, Pos('\', sTagName)-1);
    sTags[i].Level:= i; Delete(sTagName, 1, Pos('\', sTagName));
  until Pos('\', STagName) = 0;
  finally begin i:= GetArrayLength(sTags); SetArrayLength(sTags, i+1); sTags[i].Level:= i;
                  sTags[i].Name:= Copy(sTagName, 1, Length(sTagName));
          end;
end else begin
 
SetArrayLength(sTags, 1); sTags[0].Name:= sTagName;
end;
Result:= sTags;
end;

function XMLChangeValue(sFileName, sTagName, sTagParam: string): Boolean;
var sFileText: Ansistring; i: Integer; Tags: array of TTagPoint;
begin
Result:= False
if LoadStringFromFile(sFileName, sFileText) then begin
 
Tags:= Expandtags(sFileText, sTagName);
  for i:=0 to GetArrayLength(Tags)-1 do begin
   
Tags[i].BeginPos:= Pos('<'+Tags[i].Name, sFileText);
    if (Tags[i].BeginPos <> 0) then while sFileText[Tags[i].BeginPos] <> '>' do Tags[i].BeginPos:=Tags[i].BeginPos+1;
    Tags[i].EndPos:= Pos('</'+Tags[i].Name+'>', sFileText)
  end;
  If GetExists(Tags) then begin
   
i:= GetArrayLength(Tags)-1;
    Result:= SaveStringToFile(sFileName, Copy(sFileText,1,Tags[i].BeginPos) + AnsiToUtf8(sTagParam) + Copy(sFileText,Tags[i].EndPos,Length(sFileText)), False);
  end;
end;
end;

function XMLWriteValue(sFileName, sTagname, sTagType, sTagParam: string): Boolean;
var sFileText: AnsiString; sSpace, sText: string; i, k, n, CopyPos: Integer; Tags: array of TTagPoint;
begin
Result:= False;
if not FileExists(sFileName) then
 
SaveStringToFile(sFileName, '<?xml version="1.0" encoding="utf-8" standalone="yes"?>', False);
if LoadStringFromFile(sFileName, sFileText) then begin
 
Tags:= Expandtags(sFileText, sTagName);
  for i:=0 to GetArrayLength(Tags)-1 do begin
   
Tags[i].BeginPos:= Pos('<'+Tags[i].Name, sFileText);
    if (Tags[i].BeginPos <> 0) then while sFileText[Tags[i].BeginPos] <> '>' do Tags[i].BeginPos:=Tags[i].BeginPos+1;
    Tags[i].EndPos:= Pos('</'+Tags[i].Name+'>', sFileText)
  end;
  i:= GetArrayLength(Tags)-1; sText:='';
  if ((i-1)<>0) then for n:=0 to i-1 do begin
   
sSpace:= #13#10; if (Tags[n].Level-1>=0) then for k:=0 to Tags[n].Level-1 do sSpace:=sSpace+#9;
    if (Tags[n].BeginPos=0)and(Tags[n].EndPos=0) then sText:= sText+sSpace+'<'+Tags[n].Name+'>';
  end;
    sSpace:=#13#10; for k:= 0 to Tags[i].Level-1 do sSpace:= sSpace+#9; if (i+1=1) then sSpace:=#13#10;
    if (i+1=1)or(Tags[i-1].BeginPos=0) then begin CopyPos:= 1; while sFileText[CopyPos] <> '>' do CopyPos:=CopyPos+1; end else CopyPos:=Tags[i-1].BeginPos;
    if (sTagParam <> '')and(sTagType <> '') then sText:= sText+sSpace+'<'+Tags[i].Name+' type="'+sTagType+'">'+AnsiToUtf8(sTagParam)+'</'+Tags[i].Name+'>';
    if (sTagParam = '')and(sTagType = '') then sText:= sText+sSpace+'<'+Tags[i].Name+'>'+sSpace+'</'+Tags[i].Name+'>';
  if ((i-1)<>0) then for n:=i-1 downto 0 do begin
   
sSpace:= #13#10; if (Tags[n].Level-1>=0) then for k:=0 to Tags[n].Level-1 do sSpace:=sSpace+#9;
    if (Tags[n].BeginPos=0)and(Tags[n].EndPos=0) then sText:= sText+sSpace+'</'+Tags[n].Name+'>';
  end;
  Result:= SaveStringToFile(sFilename, Copy(sFileText, 1, CopyPos)+sText+Copy(sFileText,CopyPos+1,Length(sFileText)), False)
end;
end;

function XMLReadValue(sFileName, sTagName: string; var sData: string): Boolean;
var sFileText: ansistring; i: Integer; Tags: array of TTagPoint;
begin
Result:= False
if LoadStringFromFile(sFileName, sFileText) then begin
 
Tags:= ExpandTags(sFileText, sTagName);
  for i:=0 to GetArrayLength(Tags)-1 do begin
   
Tags[i].BeginPos:= Pos('<'+Tags[i].Name, sFileText);
    if (Tags[i].BeginPos <> 0) then while sFileText[Tags[i].BeginPos] <> '>' do Tags[i].BeginPos:=Tags[i].BeginPos+1;
    Tags[i].EndPos:= Pos('</'+Tags[i].Name+'>', sFileText);
  end;
  If GetExists(Tags) then begin
   
i:= GetArrayLength(Tags)-1;
    sData:= Copy(sFileText, Tags[i].BeginPos+1, Tags[i].EndPos-Tags[i].BeginPos-1);
    Result:= True;
  end;
end;
end;

function XMLDeleteValue(sFileName, sTagName: string): Boolean;
var b,e,i: Integer; sFileText: ansistring; Tags: array of TTagPoint;
begin
Result:= False;
if LoadStringFromFile(sFileName, sFileText) then begin
 
Tags:= ExpandTags(sFileText, sTagName);
  for i:=0 to GetArrayLength(Tags)-1 do begin
   
Tags[i].BeginPos:= Pos('<'+Tags[i].Name, sFileText);
    if (Tags[i].BeginPos <> 0) then while sFileText[Tags[i].BeginPos] <> '>' do Tags[i].BeginPos:=Tags[i].BeginPos+1;
    Tags[i].EndPos:= Pos('</'+Tags[i].Name+'>', sFileText)
  end;
  If GetExists(Tags) then begin
   
i:= GetArrayLength(Tags)-1;
    b:= Tags[i].BeginPos-1; e:= Tags[i].EndPos;
    while (b-1<>1)and(sFileText[b-1] <> '>') do b:=b-1;
    while (e+1<>Length(sFileText))and(sFileText[e-2] <> '>') do e:=e+1;
    Result:= SaveStringToFile(sFileName, Copy(sFileText,1,b) + Copy(sFileText,e,Length(sFileText)), False);
  end;
end;
end;
//END

function InitializeSetup: Boolean;
var res:integer;
  tra,ara,pro,dxv,dxw,vnm:string;
begin
Exec(ExpandConstant('{win}\system32\dxdiag.exe'),'/whql:off /x '+ExpandConstant('{tmp}')+'\dxdiag.xml',ExpandConstant('{tmp}'),0,ewWaitUntilTerminated,res);
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'DDIVersion',dxv); //video dx
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'DirectXVersion',dxw); //OS dx
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'Processor',pro); //Processor
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'Memory',tra); // All RAM
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'AvaliableOSMem',ara); //Avaliable RAM
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'CardName',vnm); //Videocard name
if MsgBox('Processor name: '+pro+#13+'Videocard Name: '+vnm+#13+'OS DirectX Ver: '+dxw+#13+'VideoCard DirectX Ver: DirectX '+dxv+#13+'Ram All/Avaliable: '+tra+'/'+ara,mbInformation,MB_OK) = MB_OK then Result:=False;
end;

totally main part is XML module xD

Razor12911 19-10-2013 11:38

you did that dxdiag xml... whatever it is? you created it?

altef_4 19-10-2013 11:45

Quote:

Originally Posted by Razor12911 (Post 424626)
you did that dxdiag xml... whatever it is? you created it?

Win + R then DxDiag and you will see :)

Razor12911 19-10-2013 11:54

damn man, you are awesome.

Razor12911 19-10-2013 14:22

1 Attachment(s)
I used the DXDiag exmaple and look what I got.

amin fear 24-10-2013 05:57

@altef_4

Thanks for sharing your amazing script...

Nice to hear again from you after a long period...;)

Works flawlessly on my system and every provided information are correct...

http://s4.picofile.com/file/79811546...DxDiag_Web.jpg

amin fear 28-10-2013 09:18

Quote:

Originally Posted by altef_4 (Post 424862)
hi guys, and again i need a liitle of your help, i create a siple "plugin" for BASS.dll that allows to play music from memory location (not from temporary folder), please test it, you must have bass.dll 2.4.10 and sound.mp3 in folder with script and bp.dll (bass protect)

I have tested your script with latest & newest version of bass.dll (2.4.10) from www.un4seen.com...

The script compiles without any error but when testing the created setup ( pressing F9 ) , i am getting this error in Setup program startup...

http://s2.picofile.com/file/79853560...s_Idea_Web.jpg

I have the inno setup v 5.5.1 enhanced edition...

hope to help you...;)

ayateknik 28-10-2013 15:14

Quote:

Originally Posted by altef_4 (Post 424625)
i use Windows DxDiag to check the system, its easy but long, hare are code:
Code:

[Code]
//XML module 1.0
type
TTagPoint = record Name: String; BeginPos, EndPos, Level: Integer; end;

const
 
CP_ACP = 0; CP_UTF8 = 65001;

Function MultiByteToWideChar(CodePage: UINT; dwFlags: DWORD; lpMultiByteStr: PAnsiChar; cbMultiByte: integer; lpWideCharStr: PAnsiChar; cchWideChar: integer): longint; external '[email protected] stdcall';
Function WideCharToMultiByte(CodePage: UINT; dwFlags: DWORD; lpWideCharStr: PAnsiChar; cchWideChar: integer; lpMultiByteStr: PAnsiChar; cbMultiByte: integer; lpDefaultChar: integer; lpUsedDefaultChar: integer): longint; external '[email protected] stdcall';

function AnsiToUtf8(strSource: string): string;
var
nRet, nRet2: integer; WideCharBuf, MultiByteBuf: AnsiString;
begin
 
SetLength(WideCharBuf, Length(strSource) * 2);
  SetLength(MultiByteBuf, Length(strSource) * 2);
  nRet:= MultiByteToWideChar(CP_ACP, 0, strSource, -1, WideCharBuf, Length(WideCharBuf));
  nRet2:= WideCharToMultiByte(CP_UTF8, 0, WideCharBuf, -1, MultiByteBuf, Length(MultiByteBuf), 0, 0);
  MultiByteBuf:=Copy(MultiByteBuf, 1, nRet2-1);
  Result:= MultiByteBuf;
end;

function GetExists(TagArr: array of TTagPoint): Boolean;
var Part1, Part2, Temp: Boolean; n: integer;
begin
if
(GetArrayLength(TagArr) > 1) then begin
 
Temp:= True;
  for n:= GetArrayLength(TagArr)-1 downto 1 do begin
   
Part1:=False; If TagArr[n].BeginPos > TagArr[n-1].BeginPos then Part1:=True;
    Part2:=False; If TagArr[n].EndPos < TagArr[n-1].EndPos then Part2:=True;
    Temp:=Temp and (Part1 and Part2);
  end;
  If Temp then Result:= True;
end else begin
 
Result:=False; if (TagArr[0].BeginPos > 0) and (TagArr[0].EndPos > 0) then Result:= true;
end;
end;

function ExpandTags(const sFileText, sTagName: string): array of TTagPoint;
var i: integer; sTags: array of TTagPoint;
begin
SetArrayLength(Result, 0);
If Pos('\', STagName) > 0 then try
  repeat
   
i:= GetArrayLength(sTags); SetArrayLength(sTags, i+1);
    sTags[i].Name:= Copy(sTagName, 1, Pos('\', sTagName)-1);
    sTags[i].Level:= i; Delete(sTagName, 1, Pos('\', sTagName));
  until Pos('\', STagName) = 0;
  finally begin i:= GetArrayLength(sTags); SetArrayLength(sTags, i+1); sTags[i].Level:= i;
                  sTags[i].Name:= Copy(sTagName, 1, Length(sTagName));
          end;
end else begin
 
SetArrayLength(sTags, 1); sTags[0].Name:= sTagName;
end;
Result:= sTags;
end;

function XMLChangeValue(sFileName, sTagName, sTagParam: string): Boolean;
var sFileText: Ansistring; i: Integer; Tags: array of TTagPoint;
begin
Result:= False
if LoadStringFromFile(sFileName, sFileText) then begin
 
Tags:= Expandtags(sFileText, sTagName);
  for i:=0 to GetArrayLength(Tags)-1 do begin
   
Tags[i].BeginPos:= Pos('<'+Tags[i].Name, sFileText);
    if (Tags[i].BeginPos <> 0) then while sFileText[Tags[i].BeginPos] <> '>' do Tags[i].BeginPos:=Tags[i].BeginPos+1;
    Tags[i].EndPos:= Pos('</'+Tags[i].Name+'>', sFileText)
  end;
  If GetExists(Tags) then begin
   
i:= GetArrayLength(Tags)-1;
    Result:= SaveStringToFile(sFileName, Copy(sFileText,1,Tags[i].BeginPos) + AnsiToUtf8(sTagParam) + Copy(sFileText,Tags[i].EndPos,Length(sFileText)), False);
  end;
end;
end;

function XMLWriteValue(sFileName, sTagname, sTagType, sTagParam: string): Boolean;
var sFileText: AnsiString; sSpace, sText: string; i, k, n, CopyPos: Integer; Tags: array of TTagPoint;
begin
Result:= False;
if not FileExists(sFileName) then
 
SaveStringToFile(sFileName, '<?xml version="1.0" encoding="utf-8" standalone="yes"?>', False);
if LoadStringFromFile(sFileName, sFileText) then begin
 
Tags:= Expandtags(sFileText, sTagName);
  for i:=0 to GetArrayLength(Tags)-1 do begin
   
Tags[i].BeginPos:= Pos('<'+Tags[i].Name, sFileText);
    if (Tags[i].BeginPos <> 0) then while sFileText[Tags[i].BeginPos] <> '>' do Tags[i].BeginPos:=Tags[i].BeginPos+1;
    Tags[i].EndPos:= Pos('</'+Tags[i].Name+'>', sFileText)
  end;
  i:= GetArrayLength(Tags)-1; sText:='';
  if ((i-1)<>0) then for n:=0 to i-1 do begin
   
sSpace:= #13#10; if (Tags[n].Level-1>=0) then for k:=0 to Tags[n].Level-1 do sSpace:=sSpace+#9;
    if (Tags[n].BeginPos=0)and(Tags[n].EndPos=0) then sText:= sText+sSpace+'<'+Tags[n].Name+'>';
  end;
    sSpace:=#13#10; for k:= 0 to Tags[i].Level-1 do sSpace:= sSpace+#9; if (i+1=1) then sSpace:=#13#10;
    if (i+1=1)or(Tags[i-1].BeginPos=0) then begin CopyPos:= 1; while sFileText[CopyPos] <> '>' do CopyPos:=CopyPos+1; end else CopyPos:=Tags[i-1].BeginPos;
    if (sTagParam <> '')and(sTagType <> '') then sText:= sText+sSpace+'<'+Tags[i].Name+' type="'+sTagType+'">'+AnsiToUtf8(sTagParam)+'</'+Tags[i].Name+'>';
    if (sTagParam = '')and(sTagType = '') then sText:= sText+sSpace+'<'+Tags[i].Name+'>'+sSpace+'</'+Tags[i].Name+'>';
  if ((i-1)<>0) then for n:=i-1 downto 0 do begin
   
sSpace:= #13#10; if (Tags[n].Level-1>=0) then for k:=0 to Tags[n].Level-1 do sSpace:=sSpace+#9;
    if (Tags[n].BeginPos=0)and(Tags[n].EndPos=0) then sText:= sText+sSpace+'</'+Tags[n].Name+'>';
  end;
  Result:= SaveStringToFile(sFilename, Copy(sFileText, 1, CopyPos)+sText+Copy(sFileText,CopyPos+1,Length(sFileText)), False)
end;
end;

function XMLReadValue(sFileName, sTagName: string; var sData: string): Boolean;
var sFileText: ansistring; i: Integer; Tags: array of TTagPoint;
begin
Result:= False
if LoadStringFromFile(sFileName, sFileText) then begin
 
Tags:= ExpandTags(sFileText, sTagName);
  for i:=0 to GetArrayLength(Tags)-1 do begin
   
Tags[i].BeginPos:= Pos('<'+Tags[i].Name, sFileText);
    if (Tags[i].BeginPos <> 0) then while sFileText[Tags[i].BeginPos] <> '>' do Tags[i].BeginPos:=Tags[i].BeginPos+1;
    Tags[i].EndPos:= Pos('</'+Tags[i].Name+'>', sFileText);
  end;
  If GetExists(Tags) then begin
   
i:= GetArrayLength(Tags)-1;
    sData:= Copy(sFileText, Tags[i].BeginPos+1, Tags[i].EndPos-Tags[i].BeginPos-1);
    Result:= True;
  end;
end;
end;

function XMLDeleteValue(sFileName, sTagName: string): Boolean;
var b,e,i: Integer; sFileText: ansistring; Tags: array of TTagPoint;
begin
Result:= False;
if LoadStringFromFile(sFileName, sFileText) then begin
 
Tags:= ExpandTags(sFileText, sTagName);
  for i:=0 to GetArrayLength(Tags)-1 do begin
   
Tags[i].BeginPos:= Pos('<'+Tags[i].Name, sFileText);
    if (Tags[i].BeginPos <> 0) then while sFileText[Tags[i].BeginPos] <> '>' do Tags[i].BeginPos:=Tags[i].BeginPos+1;
    Tags[i].EndPos:= Pos('</'+Tags[i].Name+'>', sFileText)
  end;
  If GetExists(Tags) then begin
   
i:= GetArrayLength(Tags)-1;
    b:= Tags[i].BeginPos-1; e:= Tags[i].EndPos;
    while (b-1<>1)and(sFileText[b-1] <> '>') do b:=b-1;
    while (e+1<>Length(sFileText))and(sFileText[e-2] <> '>') do e:=e+1;
    Result:= SaveStringToFile(sFileName, Copy(sFileText,1,b) + Copy(sFileText,e,Length(sFileText)), False);
  end;
end;
end;
//END

function InitializeSetup: Boolean;
var res:integer;
  tra,ara,pro,dxv,dxw,vnm:string;
begin
Exec(ExpandConstant('{win}\system32\dxdiag.exe'),'/whql:off /x '+ExpandConstant('{tmp}')+'\dxdiag.xml',ExpandConstant('{tmp}'),0,ewWaitUntilTerminated,res);
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'DDIVersion',dxv); //video dx
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'DirectXVersion',dxw); //OS dx
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'Processor',pro); //Processor
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'Memory',tra); // All RAM
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'AvaliableOSMem',ara); //Avaliable RAM
XMLReadValue(ExpandConstant('{tmp}\dxdiag.xml'),'CardName',vnm); //Videocard name
if MsgBox('Processor name: '+pro+#13+'Videocard Name: '+vnm+#13+'OS DirectX Ver: '+dxw+#13+'VideoCard DirectX Ver: DirectX '+dxv+#13+'Ram All/Avaliable: '+tra+'/'+ara,mbInformation,MB_OK) = MB_OK then Result:=False;
end;

totally main part is XML module xD

my project this code example. iss but I can not just add to the code to add anything else Do I need to add an extra dll jpg or png image

http://i40.tinypic.com/2qi7q1g.jpg

How can I do like the picture

altef_4 30-10-2013 08:15

Quote:

Originally Posted by ayateknik (Post 424951)
my project this code example. iss but I can not just add to the code to add anything else Do I need to add an extra dll jpg or png image

http://i40.tinypic.com/2qi7q1g.jpg

How can I do like the picture

Ask Razor12911, the screen of his script


All times are GMT -7. The time now is 13:08.

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