Jump to content

Oli

Member
  • Posts

    14
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

About Oli

Contact Methods

  • Website URL
    http://www.willowhayes.co.uk

Oli's Achievements

0

Reputation

  1. Thought this might be useful to somebody. It will return the drive letter of the first available CD-ROM drive to the console. program Project1; {$APPTYPE CONSOLE} uses SysUtils, classes, Unit1 in 'Unit1.pas'; var envlist: TStringList; i: integer; begin writeln(getcd(getdisks)+':'); end. unit Unit1; interface uses classes, sysutils, windows; function GetCD(availdisks: string): string; function GetDisks:string; implementation function GetCD(availdisks: string): string; var i :integer; root :pchar; begin result:=chr(0); root:=stralloc(255); for i:=1 to length(availdisks) do begin strpcopy(root,copy(availdisks,i,1)+':\'); if getdrivetype(root)=drive_cdrom then begin result:=availdisks[i]; break; end; end; strdispose(root); end; function GetDisks:string; var availdisks: string; i,n :integer; buf :pchar; begin buf:=stralloc(255); n:=GetLogicalDriveStrings(255,buf); availdisks:=''; for i:=0 to n do if buf[i]<>#0 then begin if (ord(buf[i]) in [$41..$5a]) or (ord(buf[i]) in [$61..$7a]) then availdisks:=availdisks+upcase(buf[i]) end else if buf[i+1]=#0 then break; strdispose(buf); result:=availdisks; end; end.
  2. Hi there I want to build a secure build for Windows Server 2003 where, even though the network cable may be connected during installation from CD, the machine is firewalled (either by IPSec policies or other means). I want to then be able to load hotfixes before finally applying the production ipsec filter. Any ideas on how best to achieve this?
  3. program GetCD; {$APPTYPE CONSOLE} uses SysUtils, classes, Unit1 in 'Unit1.pas'; var envlist: TStringList; i: integer; begin writeln(getcd(getdisks)+':'); end. -------- unit1.pas -------- unit Unit1; interface uses classes, sysutils, windows; function GetCD(availdisks: string): string; function GetDisks:string; implementation function GetCD(availdisks: string): string; var i :integer; root :pchar; begin result:=chr(0); root:=stralloc(255); for i:=1 to length(availdisks) do begin strpcopy(root,copy(availdisks,i,1)+':\'); if getdrivetype(root)=drive_cdrom then begin result:=availdisks; break; end; end; strdispose(root); end; function GetDisks:string; var availdisks: string; i,n :integer; buf :pchar; begin buf:=stralloc(255); n:=GetLogicalDriveStrings(255,buf); availdisks:=''; for i:=0 to n do if buf<>#0 then begin if (ord(buf) in [$41..$5a]) or (ord(buf) in [$61..$7a]) then availdisks:=availdisks+upcase(buf) end else if buf[i+1]=#0 then break; strdispose(buf); result:=availdisks; end; end.
  4. You're welcome. Sorry it took me so long to find you all!
  5. I know this question's been done to death, but I wanted to seek the opinions of people here. I've been using bootable CDs for a few years to install Windows 2000 workstations. They're cool, as they'll happily repartition the disk and use the whole disk as one volume. Great for a workstation. Now I'm doing installations of Windows Server 2003 and I want to create a fixed 8Gb (16Mb maybe) partition to install the OS to. I can then create extra partitions with diskpart.exe later on. However, it looks as if I'm stuffed with bootable CDs. I don't want to boot to DOS, use disk imaging, use a temporary FAT partition or use WinPE. The latter isn't a preference -- I can't use WinPE due to its licensing restrictions. Any ideas anyone?
×
×
  • Create New...