program Neue_Startbilder_fuer_Windows_95_die_per_Zufall_ausgewaehlt_werden;
uses dos,crt;
    label
      Bild_Schreiben_0,Bild_Schreiben_1,Bild_Schreiben_2,Bild_Schreiben_3,
      Bild_Schreiben_4,Bild_Schreiben_5,Bild_Schreiben_6,Bild_Schreiben_7,
      Bild_Schreiben_8,Bild_Schreiben_9,Ende;
    var
      Bild_Variable, File_Position,
      Zufallszahl                  : Integer;
      Bat_File,Ini_File            : Text;
      Bat_Name,Ini_Name            : String[15];
    const
      Batchdatei_Bild_1: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_1.bmp c:\',
                                                     'rename c:\bild_1.bmp logo.sys');

      Batchdatei_Bild_2: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_2.bmp c:\',
                                                     'rename c:\bild_2.bmp logo.sys');

      Batchdatei_Bild_3: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_3.bmp c:\',
                                                     'rename c:\bild_3.bmp logo.sys');

      Batchdatei_Bild_4: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_4.bmp c:\',
                                                     'rename c:\bild_4.bmp logo.sys');

      Batchdatei_Bild_5: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_5.bmp c:\',
                                                     'rename c:\bild_5.bmp logo.sys');

      Batchdatei_Bild_6: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_6.bmp c:\',
                                                     'rename c:\bild_6.bmp logo.sys');

      Batchdatei_Bild_7: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_7.bmp c:\',
                                                     'rename c:\bild_7.bmp logo.sys');

      Batchdatei_Bild_8: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_8.bmp c:\',
                                                     'rename c:\bild_8.bmp logo.sys');

      Batchdatei_Bild_9: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_9.bmp c:\',
                                                     'rename c:\bild_9.bmp logo.sys');

      Batchdatei_Bild_0: array [1..6] of String[30]=('@echo off',
                                                     'c:\',
                                                     'cd\',
                                                     'del logo.sys',
                                                     'copy c:\win_pic\bild_0.bmp c:\',
                                                     'rename c:\bild_0.bmp logo.sys');
begin
  
  Bat_Name:='C:\MASTER.BAT';Ini_Name:='C:\PICTURE.INI';

  assign (Bat_File,Bat_Name);assign (Ini_File,Ini_Name);

  reset(Ini_file);
  readln(Ini_File,Zufallszahl);close(Ini_File);

  Randomize;
  Bild_Variable:=Random(Zufallszahl);

    if Bild_Variable=0 then goto Bild_Schreiben_0;
    if Bild_Variable=1 then goto Bild_Schreiben_1;
    if Bild_Variable=2 then goto Bild_Schreiben_2;
    if Bild_Variable=3 then goto Bild_Schreiben_3;
    if Bild_Variable=4 then goto Bild_Schreiben_4;
    if Bild_Variable=5 then goto Bild_Schreiben_5;
    if Bild_Variable=6 then goto Bild_Schreiben_6;
    if Bild_Variable=7 then goto Bild_Schreiben_7;
    if Bild_Variable=8 then goto Bild_Schreiben_8;
    if Bild_Variable=9 then goto Bild_Schreiben_9;

  Bild_Schreiben_0:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_0[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_1:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_1[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_2:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_2[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_3:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_3[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_4:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_4[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_5:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_5[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_6:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_6[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_7:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_7[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_8:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_8[File_Position]);
                     close(bat_file);goto Ende;
  Bild_Schreiben_9:
   rewrite(Bat_File);for File_Position:=1 to 6 do writeln(Bat_File,Batchdatei_Bild_9[File_Position]);
                     close(bat_file);goto Ende;
  Ende:
  end.