TJvComputerInfoEx retrieve harddisk id
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
TJvComputerInfoEx retrieve harddisk id
i am using TJvComputerInfoEx i able to retrieve many info of computer as os version and folders location but iam trying to get the hard disk id
using JvComputerInfoEx.VolumeSerialNumber[] , what i have to call in const Drive ?
to be more specific i know that i have to put a volume letter but what if different computer dont have the same volume letter as example
volumeserialnumber['C'] or E OR H OR F OR G
using JvComputerInfoEx.VolumeSerialNumber[] , what i have to call in const Drive ?
to be more specific i know that i have to put a volume letter but what if different computer dont have the same volume letter as example
volumeserialnumber['C'] or E OR H OR F OR G
En son mia tarafından 23 Kas 2015 05:18 tarihinde düzenlendi, toplamda 1 kere düzenlendi.
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: TJvComputerInfoEx retrieve harddisk id
in the normal case windows installed drive.
- If you want this for an operation like license check, copy protection ext. , you also must be know that where the user runs your project? Local computer or remote network like \\miacomputer\project.exe...
- If you want this for an operation like license check, copy protection ext. , you also must be know that where the user runs your project? Local computer or remote network like \\miacomputer\project.exe...
Re: TJvComputerInfoEx retrieve harddisk id
yes this is my point what if pc dont have C drive or the Drive string that i set into application for example
what if VolumeSerialNumber['C'] does not exist on other computer can i detect the current drive i know that i can use
GetCurrentDir[1]; but in my project i want to get all drives together
if there is drive called C OR E OR F OR what ever etc..
what if VolumeSerialNumber['C'] does not exist on other computer can i detect the current drive i know that i can use
GetCurrentDir[1]; but in my project i want to get all drives together
if there is drive called C OR E OR F OR what ever etc..
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: TJvComputerInfoEx retrieve harddisk id
I usually use the users own windows installed drive letter to look for.
This code gives you Windows installed drive letter
Kod: Tümünü seç
Var
Dir: array [0..MAX_PATH] of Char;
WindowsDrive : Char;
begin
GetWindowsDirectory(dir, MAX_PATH);
WindowsDrive := Dir[0]; // array begins at index (0)
ShowMessage( WindowsDrive );
end;
Re: TJvComputerInfoEx retrieve harddisk id
thats helps alot thank you very much mrmarman
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: TJvComputerInfoEx retrieve harddisk id
i worked on a way to get all list drives on pc
i wanted now to use JvComputerInfoEx.Identification.VolumeSerialNumber[Founded drive list as example c + d + f] to get there volium serial like
C5KIM-557-GHMo-1154 etc ... for clear example
but with drives list inside Driveslist variable
Kod: Tümünü seç
procedure GetDriveLetters(Stringlist:TStringList);// grab drive list
var
vDrivesSize: Cardinal;
vDrives : array[0..128] of Char;
vDrive : PChar;
begin
Stringlist.Clear;
vDrivesSize := GetLogicalDriveStrings(SizeOf(vDrives), vDrives);
if vDrivesSize=0 then Exit;
vDrive := vDrives;
while vDrive^ <> #0 do
begin
Stringlist.Add(StrPas(vDrive));
Inc(vDrive, SizeOf(vDrive));
end;
end;
Kod: Tümünü seç
//parse list
var
Gstring : Tstringlist;
I : integer;
Driveslist : string;
begin
Gstring := Tstringlist.Create;
GetDriveLetters(Gstring);
try
Driveslist := StringReplace(Gstring.Text, ':\', '', [rfReplaceAll, rfIgnoreCase]);
finally
Gstring.Free;
end;
C5KIM-557-GHMo-1154 etc ... for clear example
Kod: Tümünü seç
JvComputerInfoEx.Identification.VolumeSerialNumber[DriveC] + '-' + JvComputerInfoEx.Identification.VolumeSerialNumber['E']
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: TJvComputerInfoEx retrieve harddisk id
so, I don't understand what the problem is ?
Driveslist owns the whole drives letter. The rest of that a basic loop inside Driveslist variable.
Driveslist owns the whole drives letter. The rest of that a basic loop inside Driveslist variable.
Re: TJvComputerInfoEx retrieve harddisk id
i found that no need to grab many drives garbing drive that install windows is enough .
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge