Hi All;
Between 2 HardDisks in AMS
How can i get main serial's of HardDisks?
Best
Professional Software Development Tools
Hi All;
Between 2 HardDisks in AMS
How can i get main serial's of HardDisks?
Best
Drive.Enumerate and Drive.GetInformation should help there. (I think these are the right function names.)
In Drive.Enum we cant see HardDisk Name.
Code:local Drives = Drive.Enumerate(); local Constructed = "Drive information is as follows.\r\n"; for K, V in pairs(Drives) do local Information = Drive.GetInformation(V); if (Information) then Constructed = Constructed..[[ Label: ]]..Information.Label..[[ File System: ]]..Information.FileSystem..[[ Serial Number: ]]..Information.SerialNumber..[[ Display Name: ]]..Information.DisplayName..[[ ]]; else Constructed = Constructed.."\r\nCouldn't get information for drive "..V..", Skipping..\r\n"; end end Dialog.Message("Information", Constructed);
Dear Sakuya;
Thanks for saple but
in this how can i get HardDisk name like "MAXTOR G765UD"
And how can i find that Drive C in wich HardDisk?
Not possible with AutoPlay at the moment, a DLL or ActiveX component may help you though.
I can Get Hardware ID.
But i want to find if User have 2 HardDisks How Can i understand that Drive C:\ in wich one?
Every body
Help
Regards
Drive.GetType will provide the information you seem to need after you've enumerated the drives you can then get the type of each one.
If I Have 2 HardDisks how can i find that Drive like D:\ For wich HardDisks?
As mentioned previously use Drive.Enumerate. That will return a table containing e.g. A: C: D: E: and you can loop through table checking each drive type as you go.
I Checked it.
Whene i have 2 HardDisks that all fixed in my case and for example they have 4 Drive partition like C D E F
All drive in Drive.type have a one type that is the :
DRIVE_FIXED-3-The drive is a non-removable (fixed) drive.
There are 10 types of people in the world: those who understand binary, and those who don't.
all think that i need CD\DVD Drive Label or type.
But my question is not never it.
I want to find how can i find "HardDisk" Label that wich Drive Partition is in use by it .
Sampel:
HardDisk: MAXTOR DR63TR Partmgr: C:\ , D:\
HardDisk: TOSHIBA 788KU7 Partmgr:E:\
How can i find That C:\ is in use by MAXTOR DR63TR
Hi All
I find a new Function but I want convert it to AMS
This Code is a VB Lang and Get HardDisk SerialNumber
1- With API :
Private Declare Function GetVolumeSerialNumber Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
2- Define Var :
Public Function DiscSerialNumber(ByVal RootPath As String) As String
Dim VolLabel As String
Dim VolSize As Long
Dim Serial As Long
Dim MaxLen As Long
Dim Flags As Long
Dim Name As String
Dim NameSize As Long
Dim S As String
Dim r As Boolean
r = GetVolumeSerialNumber(RootPath, VolLabel, VolSize, Serial, MaxLen, Flags, Name, NameSize)
DiscSerialNumber = Serial
End Function
3- Call Function
Text1.Text = DiscSerialNumber("c:\")
Now you can get your SN HD with Certain Partition.
Please Help to Convert it to AMS.
Regards
kernel32 is a Windows API DLL (Dynamic Link Library).
Take a look at the AMS help on the DLL.CallFunction, you might get somewhere with that, but Basic is a good choice for this sort of thing. You could run a Basic program or DLL from your AMS program.
Alternatively, one of the expert AMS users such as AMSWaves may be able to produce a plugin for you at reasonable cost:
http://www.amswaves.com/
AMSWaves already have a plugin that gives AMS projects the ability to use Visual Basic Scripts, which may be all you need.