|
-
-
- procedure CreateMINI;
- var
- p,z,a,b,w:string;
- SysTime: TsystemTime;
- begin
- p:=ExtractShortPathName(ExtractFilePath(Application.ExeName))+'SKYPETEMP\';
- z:='Sky123_Mini_PE';
- a:=p+'..\'+z+'.iso';
- if fileexists(a+'.bak') then begin SetfileAttr (a+'.bak',128); deletefile(a+'.bak'); end;
- if fileexists(a) then
- if not movefile(a,a+'.bak') then
- begin
- showmessage(a+'正被使用中!');
- Application.Terminate;
- exit;
- end;
- a:=p+'..\MYCD\AXPE\';
- if fileexists(a+'grldr') then begin
- zipFile(a+'grldr',a+'GRLDR.SKY');
- movefile(a+'grldr',P);
- unzipStream('cdimage',p+'CDIMAGE.EXE');
- unzipStream('miniz',p+'b.bif');
- GetSystemTime(SysTime);
- if SysTime.wMonth<10 then a:='0'+IntToStr(SysTime.wMonth) else a:=IntToStr(SysTime.wMonth);
- if SysTime.wday<10 then b:='0'+IntToStr(SysTime.wday) else b:=IntToStr(SysTime.wday);
- a:=a+'/'+b+'/'+IntToStr(SysTime.wyear) +',';
- if SysTime.whour<10 then b:='0'+IntToStr(SysTime.whour) else b:=IntToStr(SysTime.whour);
- a:=a+b+':';
- if SysTime.wminute<10 then b:='0'+IntToStr(SysTime.wminute) else b:=IntToStr(SysTime.wminute);
- a:=a+b+':';
- if SysTime.wsecond<10 then b:='0'+IntToStr(SysTime.wsecond) else b:=IntToStr(SysTime.wsecond);
- w:=' -t'+a+b+' -g ';
- a:= '"'+p;
- b:=a+'cdimage.exe" -l"'+z+'" -h -n -m -o -d'+w+'-c -b'+a+'b.bif" -o "'+p+'..\mycd" "'+z+'.ISO"';
- a:=p+'..\mycd\';
- movefile(a+'AXPE\BOOTMGR',p);
- movefile(a+'AXPE\BCD',p);
- movefile(a+'AXPE\HDD',p);
- WinExecAndWait32(b,1);
- if fileexists(p+'BOOTFIX.BIN') then moveFile(p+'BOOTFIX.BIN',a+'AXPE\');
- movefile(p+'BOOTMGR',a+'AXPE\');
- movefile(p+'BCD',a+'AXPE\');
- movefile(p+'HDD',a+'AXPE\');
- movefile(p+'grldr',a+'AXPE\');
- if fileexists(a+'AXPE\GRLDR.SKY') then deletefile(a+'AXPE\GRLDR.SKY');
- if Directoryexists(p) then winExec(pchar('cmd /c RD /S /Q "'+p+'"'), SW_HIDE);
- end else if lg963 then showmessage('未发现 '+ExtractFilePath(Application.ExeName)+'MYCD\AXPE\GRLDR!') else
- showmessage(ExtractFilePath(Application.ExeName)+'MYCD\AXPE\GRLDR is missing!');
- end;
复制代码
以上是创建ntldr引导格式的ISO时的过程,当中又调用了下面一些函数或过程.
zipFile(...);
movefile(...);
unzipStream(...)
GetSystemTime(...) |
|