Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

View Poll Results: Should installations compiled with Installer Creator be protected using methods.
Yes, I'd like all my installations to be protected. I don't want people to steal my ideas. 1 16.67%
No, I like to share my ideas because it may open new paths for other people. 5 83.33%
Voters: 6. You may not vote on this poll

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 11-01-2014, 14:11
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,022 Times in 239 Posts
altef_4 is on a distinguished road
Quote:
Originally Posted by Razor12911 View Post
another update pending don't worry.

I'm afraid not, Credits cannot be removed like y_thelastknight said, and also what riodsa123, this is a freeware software and a lot of people spent their time bringing up this program so it can't be done.

and altef_4, y_thelastknight, logrim, pakrat2k2, sentinelks; I finally did this function to read imported regs. can y'all understand it? it can read strings, dword and binary, I'll have to move on to Multistring and ExpandString Soon.

Can't believe I can do such at my age. I'll kill everyone when I get to varsity.

Code:
var
  X: Integer;
  RegType: String;
  FirstLine: Boolean;
begin
  OpenDialog1.Filter := 'Registry Files (*.reg)|*.reg';
  if OpenDialog1.Execute then
  begin
    if FileExists(OpenDialog1.FileName) then
    begin
      Memo1.Lines.LoadFromFile(OpenDialog1.FileName);  //loading regystry entries
      X := 1;
      FirstLine := True;
      repeat //starting reading a file
        RegType := AnsiLeftStr(AnsiRightStr(Memo1.Lines.Strings[X + 2],
          Length(Memo1.Lines.Strings[X + 2]) -
          Length(ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 2], AnsiPos('=',
          Memo1.Lines.Strings[X + 2]) - 1), '"', '')) - 3),
          AnsiPos(':', AnsiRightStr(Memo1.Lines.Strings[X + 2],
          Length(Memo1.Lines.Strings[X + 2]) -
          Length(ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 2], AnsiPos('=',
          Memo1.Lines.Strings[X + 2]) - 1), '"', '')) - 3))); //cutting off string line to get resource type as name |dword:,hex:,="string"
        if (RegType = 'dword:') or (RegType = 'hex:') or
          (AnsiPos('"="', Memo1.Lines.Strings[X + 2]) <> 0) or
          (AnsiPos('@="', Memo1.Lines.Strings[X + 2]) <> 0) or
          (AnsiPos('@=dword:', Memo1.Lines.Strings[X + 2]) <> 0) or
          (AnsiPos('@=hex:', Memo1.Lines.Strings[X + 2]) <> 0) then
        begin //if finding res type then run next part
          StringGrid6.RowCount := StringGrid6.RowCount + 1; //adding new row to list
          if FirstLine then
          begin
            FirstLine := False;
            StringGrid6.Cells[0, StringGrid6.RowCount - 1] :=
              ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[2],
              AnsiPos('\', Memo1.Lines.Strings[2]) - 1), '[', '');
            StringGrid6.Cells[1, StringGrid6.RowCount - 1] :=
              ReplaceStr(ReplaceStr(AnsiRightStr(Memo1.Lines.Strings[2],
              Length(Memo1.Lines.Strings[2]) - Length(StringGrid6.Cells[0,
              StringGrid6.RowCount - 1]) - 2), ']', ''), '\Wow6432Node', '');  //preparing StringGrid if this first line
          end
          else
          begin
            if AnsiPos('[H', Memo1.Lines.Strings[X + 1]) <> 0 then //checking if path or key exists
            begin
              StringGrid6.Cells[0, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 1],
                AnsiPos('\', Memo1.Lines.Strings[X + 1]) - 1), '[', '');
              StringGrid6.Cells[1, StringGrid6.RowCount - 1] :=
                ReplaceStr(ReplaceStr(AnsiRightStr(Memo1.Lines.Strings[X + 1],
                Length(Memo1.Lines.Strings[X + 1]) - Length(StringGrid6.Cells[0,
                StringGrid6.RowCount - 1]) - 2), ']', ''), '\Wow6432Node', '');
            end
            else
            begin
              StringGrid6.Cells[0, StringGrid6.RowCount - 1] :=
                StringGrid6.Cells[0, StringGrid6.RowCount - 2];
              StringGrid6.Cells[1, StringGrid6.RowCount - 1] :=
                StringGrid6.Cells[1, StringGrid6.RowCount - 2];
            end;
          end;
          if (AnsiPos('"="', Memo1.Lines.Strings[X + 2]) <> 0) or
            (AnsiPos('@="', Memo1.Lines.Strings[X + 2]) <> 0) then
            StringGrid6.Cells[2, StringGrid6.RowCount - 1] := 'String'; //writing res type to stringgrid
          if (RegType = 'dword:') or
            (AnsiPos('@=dword:', Memo1.Lines.Strings[X + 2]) <> 0) then
            StringGrid6.Cells[2, StringGrid6.RowCount - 1] := 'DWORD';//writing res type to stringgrid
          if (RegType = 'hex:') or
            (AnsiPos('@=hex:', Memo1.Lines.Strings[X + 2]) <> 0) then
            StringGrid6.Cells[2, StringGrid6.RowCount - 1] := 'Binary';//writing res type to stringgrid
          if StringGrid6.Cells[2, StringGrid6.RowCount - 1] = 'String' then
          begin
            if (AnsiPos('"="', Memo1.Lines.Strings[X + 2]) <> 0) then
            begin
              StringGrid6.Cells[3, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 2],
                AnsiPos('=', Memo1.Lines.Strings[X + 2]) - 1), '"', '');
              StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                AnsiLeftStr
                (ReplaceStr(ReplaceStr(AnsiRightStr(Memo1.Lines.Strings[X + 2],
                Length(Memo1.Lines.Strings[X + 2]) - Length(StringGrid6.Cells[3,
                StringGrid6.RowCount - 1]) - 4), '\\', '\'), '\"', '"'),
                Length(ReplaceStr(ReplaceStr(AnsiRightStr(Memo1.Lines.Strings[X
                + 2], Length(Memo1.Lines.Strings[X + 2]) -
                Length(StringGrid6.Cells[3, StringGrid6.RowCount - 1]) - 4),
                '\\', '\'), '\"', '"')) - 1);
            end
            else
            begin
              StringGrid6.Cells[3, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 2],
                AnsiPos('=', Memo1.Lines.Strings[X + 2]) - 1), '@', '');
              StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                AnsiLeftStr
                (ReplaceStr(ReplaceStr(AnsiRightStr(Memo1.Lines.Strings[X + 2],
                Length(Memo1.Lines.Strings[X + 2]) - Length(StringGrid6.Cells[3,
                StringGrid6.RowCount - 1]) - 3), '\\', '\'), '\"', '"'),
                Length(ReplaceStr(ReplaceStr(AnsiRightStr(Memo1.Lines.Strings[X
                + 2], Length(Memo1.Lines.Strings[X + 2]) -
                Length(StringGrid6.Cells[3, StringGrid6.RowCount - 1]) - 3),
                '\\', '\'), '\"', '"')) - 1);
            end; //preparing and writing values
          end;
          if StringGrid6.Cells[2, StringGrid6.RowCount - 1] = 'DWORD' then
          begin
            if RegType = 'dword:' then
            begin
              StringGrid6.Cells[3, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 2],
                AnsiPos('=', Memo1.Lines.Strings[X + 2]) - 1), '"', '');
              StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                '0x' + AnsiRightStr(Memo1.Lines.Strings[X + 2],
                Length(Memo1.Lines.Strings[X + 2]) - Length(StringGrid6.Cells[3,
                StringGrid6.RowCount - 1]) - 9);
            end
            else
            begin
              StringGrid6.Cells[3, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 2],
                AnsiPos('=', Memo1.Lines.Strings[X + 2]) - 1), '@', '');
              StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                '0x' + AnsiLeftStr(AnsiRightStr(Memo1.Lines.Strings[X + 2],
                Length(Memo1.Lines.Strings[X + 2]) - Length(StringGrid6.Cells[3,
                StringGrid6.RowCount - 1]) - 8),
                Length(AnsiRightStr(Memo1.Lines.Strings[X + 2],
                Length(Memo1.Lines.Strings[X + 2]) - Length(StringGrid6.Cells[3,
                StringGrid6.RowCount - 1]) - 3)) - 1);
            end;
          end;//preparing and writing values
          if StringGrid6.Cells[2, StringGrid6.RowCount - 1] = 'Binary' then
          begin
            if RegType = 'hex:' then
            begin
              StringGrid6.Cells[3, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 2],
                AnsiPos('=', Memo1.Lines.Strings[X + 2]) - 1), '"', '');
              StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiRightStr(Memo1.Lines.Strings[X + 2],
                Length(Memo1.Lines.Strings[X + 2]) - Length(StringGrid6.Cells[3,
                StringGrid6.RowCount - 1]) - 7), ',', ' ');
              repeat
                if AnsiPos('\', Memo1.Lines.Strings[X + 2]) <> 0 then
                begin
                  X := X + 1;
                  StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                    StringGrid6.Cells[4, StringGrid6.RowCount - 1] +
                    ReplaceStr(Memo1.Lines.Strings[X + 2], ',', ' ');
                end;
              until AnsiPos('\', Memo1.Lines.Strings[X + 2]) = 0;
              StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                ReplaceStr(StringGrid6.Cells[4, StringGrid6.RowCount - 1],
                ' \ ', '');
            end
            else
            begin
              StringGrid6.Cells[3, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiLeftStr(Memo1.Lines.Strings[X + 2],
                AnsiPos('=', Memo1.Lines.Strings[X + 2]) - 1), '@', '');
              StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                ReplaceStr(AnsiLeftStr(AnsiRightStr(Memo1.Lines.Strings[X + 2],
                Length(Memo1.Lines.Strings[X + 2]) - Length(StringGrid6.Cells[3,
                StringGrid6.RowCount - 1]) - 6),
                Length(AnsiRightStr(Memo1.Lines.Strings[X + 2],
                Length(Memo1.Lines.Strings[X + 2]) - Length(StringGrid6.Cells[3,
                StringGrid6.RowCount - 1]) - 3)) - 1), ',', ' ');
              repeat
                if AnsiPos('\', Memo1.Lines.Strings[X + 2]) <> 0 then
                begin
                  X := X + 1;
                  StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                    StringGrid6.Cells[4, StringGrid6.RowCount - 1] +
                    ReplaceStr(Memo1.Lines.Strings[X + 2], ',', ' ');
                end;
              until AnsiPos('\', Memo1.Lines.Strings[X + 2]) = 0;
              StringGrid6.Cells[4, StringGrid6.RowCount - 1] :=
                ReplaceStr(StringGrid6.Cells[4, StringGrid6.RowCount - 1],
                ' \ ', '');
            end;
          end;//preparing and writing values
        end;
        X := X + 1;
        if Memo1.Lines.Strings[X + 2] = '' then
          X := X + 1; //go to next line
      until Memo1.Lines.Strings[X + 2] = ''; //check when to stop
    end;
  end;
 end;
i think that this code can be more compact, but this works fine too
p.s for me, this code it's not very difficult, look at bold text (some steps of reading)
Reply With Quote
 


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
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 5 11-06-2020 02:05
Source Code: Conversion Converter Razor12911 Conversion Tutorials 66 31-03-2018 18:53
Preview: Conversion Tool for Advanced Setup Creator Razor12911 Conversion Tutorials 6 10-05-2017 00:30
Simple Conversion Help akarikk Conversion Tutorials 4 09-11-2014 14:21



All times are GMT -7. The time now is 22:34.


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