Need code to get hard disk serial number

Does anyone have a working piece of PowerScript code to read the hard disk
volume serial number under Win95? This is the eight character string (such
as '3733-1ED8') that you see when you run the ChkDsk command.

Thanks in advance,

Justin

-
Remove the X from my reply to address!
-
Justin Purington
jnp@mottthehoople.mv.com
-



0
Justin
10/2/1998 5:49:57 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

2 Replies
1957 Views

Similar Articles

[PageSpeed] 24
Get it on Google Play
Get it on Apple App Store

Use this API function

GetVolumnInformationA( )
This function returns information about the harddrive.

Global External Function:
FUNCTION boolean GetVolumeInformation(ref string lpRootPathName,ref
string
lpVolumeNameBuffer,ulong nVolumeNameSize,ref ulong
lpVolumeSerialNumber,ref ulong
lpMaximumComponentLength,ref ulong lpFileSystemFlags,ref string
lpFileSystemNameBuffer,ulong nFileSystemNameSize) Library "kernel32.dll"

Script:
boolean rtn
string lprootpathname = "c:"
string lpVolumeNameBuffer = space(256)
ulong nVolumeNameSize = 256
ulong lpVolumeSerialNumber
ulong lpMaximumComponentLength
setnull(lpVolumeSerialNumber)
lpMaximumComponentLength = 256
ulong lpFileSystemFlags
setnull(lpFileSystemFlags)
string lpFileSystemNameBuffer = space(256)
ulong nFileSystemNameSize = 256

rtn = GetVolumeInformationA(lpRootPathName, lpVolumeNameBuffer,
nVolumeNameSize,&
lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags,&
lpFileSystemNameBuffer, nFileSystemNameSize)
sle_1.text = lprootpathname
sle_2.text = lpVolumeNameBuffer
sle_3.text = string(nVolumeNameSize)
sle_4.text = string(lpVolumeSerialNumber)
sle_5.text = string(lpMaximumComponentLength)
sle_6.text = string(lpFileSystemFlags)
sle_7.text = string(lpFileSystemNameBuffer)
sle_8.text = string(nFileSystemNameSize)

--
Mahendra Dhamdhere
Unicef, New York
Email:mahendrad@hotmail.com



Justin Purington wrote:

> Does anyone have a working piece of PowerScript code to read the hard
> disk
> volume serial number under Win95? This is the eight character string
> (such
> as '3733-1ED8') that you see when you run the ChkDsk command.
>
> Thanks in advance,
>
> Justin
>
> -
> Remove the X from my reply to address!
> -
> Justin Purington
> jnp@mottthehoople.mv.com
> -





0
Mahendra
10/2/1998 9:21:42 PM
In article <8gWOs1j79GA.270@forums.powersoft.com>, 
jnp@mottthehoople.Xmv.com says...
> Does anyone have a working piece of PowerScript code to read the hard disk
> volume serial number under Win95? This is the eight character string (such
> as '3733-1ED8') that you see when you run the ChkDsk command.
> 
> Thanks in advance,
> 
> Justin
> 
> -
> Remove the X from my reply to address!
> -
> Justin Purington
> jnp@mottthehoople.mv.com
> -
> 
> 
> 
> 
Also...if you have FUNCKYPB, it contains the functions to get this 
info...
-- 

Andy Turiansky
Team Powersoft
AndyT@DelaNET.Com
http://www.delanet.com/~aturians/pbh
0
NOSPAM
10/5/1998 12:27:53 AM
Reply:

Similar Artilces:

How to get hard disk serial number for NT
For windows 95 and 98, I can use an API call 'GetVolumeInformationA' to get the hard disk number of a local hard-disk. However it does not work for NT 4.0 workstation and servers. The serial number returned is '0000-0000' which is incorrect. Please advice if there is another specific API call for getting serial number from a NT 4.0 workstation. Tilden That function is supposed to work on NT as well. However, the function itself has a bug with regard to reporting the serial number for remote drives. You might want to look at: http://support.microsoft.com...

Get Hard Disk Serial Number Delphi XE3
I have been using this great component from Devlib for many years in D7, D2010 and XE2 http://www.devlib.net/tgetdiskserial.htm The Delphi XE3 VCL installs without problem, but in an application the GetDiskSerial registrations are not recognised and Delphi... crashes (Close down)! They claim it works but not on my computer. Please install this and report if it works on your Delphi XE3 system? > {quote:title=Pieter van Wyk wrote:}{quote} > Please install this and report if it works on your Delphi XE3 system? I looked as far as the 'buy' button and just started laughing You can get all that information and more from WMI Magenta systems do it for free http://www.magsys.co.uk/delphi/magwmi.asp Try the included demo exe and query Win32_DiskDrive Hi my friend, this provides the unchangeable manufacturer's serial number. You are referring to the soft hard disk serial number that can be changed with an editor. > {quote:title=Pieter van Wyk wrote:}{quote} > Hi my friend, > this provides the unchangeable manufacturer's serial number. > You are referring to the soft hard disk serial number that can be changed with an editor. No, it's the physical number eg http://imageshack.us/photo/my-images/826/examplehl.png/ And the image, with the display scrolled to the left so you can actually see what each line of information refers to http://imageshack.us/photo/my-images/32/examplell.png/ Thank you Karl, I am checking thi...

How to get the hard disk serial number of a network drive?
I know that there is a function called 'GetVolumeInformationA' and with this funcion, I can get the serial number of a local drive. However when I change the local drive to network drive (say Z:) as below: lb_ret = GetVolumeInformationA("Z:\", VolName, Len(VolName), VolSerial, MCompLen, VolFlgs, VolFileSys, Len(VolFileSys)) 0 instead of a proper serial number is returned as the VolSerial. Please advise! Tilden Lau Doesn't the solution given for the local harddrive on wednesday work on the network? -Charles Tin wrote: > I know tha...

Getting MAC address or Serial number of Hard disk
Hi, I would like to track whether my client come back my site or not. Is it possible to get MAC address or Serial Number of hard disk of client PC accessing our site?ThanksTran Hong Quang There is no direct way of doing this in ASP.NET. However, you could use WMI in ASP.NET, and I beleive WMI can tell you that information.Cheers,       Kevin JonesMy Blog...

Get Hard disk serial no.
Hi, I have a requirement, where I need help. We are developing a VB application, where I need to avoid users from misusing the application. So we track the serial no of the hard disk on which he has installed the program. But the issue here is that we are not able to get the actual Harddisk number of the system from where we are running the application. We are making use of an OCX file and try to get the Serial No. This OCX returns the serial no of the hard disk on which the application is developed on. But if the same app is run from a differnt system as an exe, then it returns the sl...

Hard Disk Serial Number
Hi All, I there any one who can tell me how to get a Hard Disk Serial number(Volum Number). Thanks PS: I am really appreciate if you could give me the code. GetVolumeInformationA. Here's the declaration for it: FUNCTION boolean GetVolumeInformationA( string lpRootPathName, // address of root directory of the file system REF string lpVolumeNameBuffer, // address of name of the volume ulong nVolumeNameSize, // length of lpVolumeNameBuffer REF ulong lpVolumeSerialNumber, // address of volume serial number REF ulong lpMaximumCompon...

Getting the hard drive serial number
Is there an easy way to obtain the hard drive serial number (the factory ID, not the one created by windows). Thanks Michael Michael Gurnett <> wrote: >Is there an easy way to obtain the hard drive serial number (the factory ID, not the one created by windows). Google is your friend. http://www.google.com/search?hl=en&q=hard+drive+serial+number The only "easy" way would be to download a library that does it for you. http://www.diskserialnumber.com/ DiskID32: Code and interesting links near bottom of page http://www.winsim.com/diskid32/diskid32.html ...

Get real serial no. for hard disk
Hi all how can I get the real serial no for hard disk, I know there is API function called GetVolumeInformation but I want the real serial no. how can I get it I am using PB11.5 and ASA11 thanks finestraco http://www.rgagnon.com/pbdetails/pb-0214.html You will need to change the definition to GetVolumeInformationW instead of GetVolumeInformationA because PB 10+ is Unicode. -- Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do Product Enhancement Requests: http://my.isug.com/cgi-bin/1/c/submit_enhancement <finestraco> wrote in message news:4c0a...

Get Hard Drive Serial Number
Hi,Is it possible for me to get the hard drive serial number of the client's machine in my web application?Thanks I wouldn't think so, since ASP.Net is a server side language - and I would shudder with fear if this were actually possible.....David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(Please 'Mark as Answer' when it applies) Yes, I am now realizing ...

Getting the FLoppy Disk Serial Number ?
Hi! How can I Get the floppy Serial Number ? I'm using the GetVolumeInfoA WIndows Api but even all drivers (A:,c:,cd-rom) always return 0 Declaring local external function FUNCTION boolean GetVolumeInformationA(ref string lpRootPathName,ref string lpVolumeNameBuffer,ulong nVolumeNameSize,ref ulong lpVolumeSerialNumber,ref ulong lpMaximumComponentLength,ref ulong lpFileSystemFlags,ref string lpFileSystemNameBuffer,ulong nFileSystemNameSize) Library "kernel32.dll" boolean rtn string lprootpathname = "a:" string lpVolumeNameBuffer = space(256)...

How to getting the Hard Disk Serial no? not the Volume Drive no!
Hi all, Any ideas to getting the physical Hard Disk Serial no? not the calling function GetVolumeInformation! Thanks~! > {quote:title=Kent Foong wrote:}{quote} > Hi all, Any ideas to getting the physical Hard Disk Serial no? > not the calling function GetVolumeInformation! A two-second Google search on "Delphi hard disk serial number" (without the quotes) found dozens of hits. Here's the first one: http://delphi.about.com/od/windowsshellapi/a/volumeserial.htm Kent Foong wrote: > Hi all, Any ideas to getting the physical Hard Disk Serial no? > not ...

Real serial number of IDE hard disk?
Hi, I want to get manufacturer's harddisk serial number (note: not" volume serial number"), because with formating it doesn't change. I have searched the newsgroup archives at: codenewsfast.com and groups.google.com; but to no avail. I am not looking for the use of GetVolumeInformation for getting the "hard disk serial number", because what this function actually gets is the volume serial number, not the manufacturer's hard disk serial number. The volume serial no. is assigned and changed during the formatting of the partition. A proper/working code...

I would like to read the hard disk serial number of a visitor
Hi, I would like to read the hard disk serial number of the people logging in to my web site. I have a web site where it gives info (market update) for a subscription fee. And I offer free demo for 15 days, however some people do not pay the fee and keep on signing in as demo user. I have tried cookies and sending small identification files but people are smart and they find these files and erase them. I need to get a unique number from their PCs where they can not change it easily like the serial number of the hard disk or another hardware device. Any suggestions or alternat...

The trick to get the real serial number of hard drive
I have just published a blog post about a solution that works both in XP and Vista under user account privilage without using P/Invoke. Everyone knows how to get serial number of hard drives but it took me over 50 hours to figure out how to do it in .Net without any user privilage problem. Here is the direct link to the blog entry. Happy Coding! Very cool stuff, you are to be commended for your hard work digging up these details and how to leverage them.Chris LoveASP.NET 2.0 Your Visual Blueprint for developing Web Applications Not bad at all. Now, if you really want to take it to &q...

hard disk serial number with pb 10.0 Build 4510
I tried the code below, but I got back two squares into lpVolumeSerialNumber. Someone can help me? Thanks External function definition: Function ulong GetVolumeInformation( & Ref string lpRootPathName, & Ref string lpVolumeNameBuffer, & long nVolumeNameSize, & Ref string lpVolumeSerialNumber, & long lpMaximumComponentLength, & long lpFileSystemFlags, & Ref string lpFileSystemNameBuffer, & long nFileSystemNameSize & ) Library "kernel32.dll" Alias For "GetVolumeInformationW" Function w...

Can't access hard disk serial number from an asp.net page
Hi, I am not sure if this is the right forum for this question but i could not see one more relevant. I have some code for accessing a hard disk serial number in a vb.net application and this will not run in an asp.net application. I did not get any error messages;  the query that retrieves the hard disks was returning an empty collection  ("SELECT * FROM Win32_PhysicalMedia") The only way i could get the code to run was to add IUSR to the administrators group and adding impersonate=true to the web config file. I could also get the code to run if i added the following to web.con...

Securing ASP.NET Codes (Getting Installation Drive's Serial Number)
I'm preparing my ASP.NET application to start selling it.  Currently, I'm trying to create a licensing scheme.  I need to get the serial number of the hard drive on which the web application is installed.  I've found several codes that get various serial numbers, and I don't know which one to use.  Following is the code.  If someone could recommend which of these to use, I'd greatly appreciate it.  Thanks. 1 Imports System.Management 2 Imports System 3 Imports System.Text 4 Imports System.Runtime.InteropService...

disk serial number
Hi all. I nedd to get informations about local hard disk, i need mainly to get the disk serial number. using PB 10.5 Windows Xp and/or Vista I already try to use the 'kernel32.dll' function GetVolumeInformationA but I it gives me no informations. this is my code: --------------------------- FUNCTION boolean GetVolumeInformationA( ref string lpRootPathName,ref string lpVolumeNameBuffer,long nVolumeNameSize,ref uint lpVolumeSerialNumber[2], ref long lpMaximumComponentLength, ref long lpFileSystemFlags,ref string lpFileSystemNameBuffer,long nFileSystemNameSize ) ...

Serial No. of Hard Disk.
Dear all, I'm using PB 6.5.1 with Access 97. The deployment platforms are Win95/98 and Workstation. I would like to know is that any API calls that I can get the Serial No. of the Hard Disk??? It is because I want to use it as the product key in order to prevent duplication. Any suggestions are appreciated! Best Regards, Andy Cheung GetVolumeInformationA. Here's the declaration for it: FUNCTION boolean GetVolumeInformationA( string lpRootPathName, // address of root directory of the file system REF string lpVolumeNameBuffer, // address of name of...

hard disk serial no
Is anyone have the idea to get hard disk serial no by using pb7? Use Win32 API call: Function long GetVolumeInformationA(string lpRootPathName, ref string lpVolumeNameBuffer, ulong nVolumeNameSize, ref ulong lpVolumeSerialNumber, ref ulong lpMaximumComponentLength, ref ulong lpFileSystemFlags, ref string lpFileSystemNameBuffer, ulong nFileSystemNameSize) Library "KERNEL32.DLL" Renato Di Pauli "Teo" <dkteo@tm.net.my> ha scritto nel messaggio news:43d75c17@forums-2-dub... > Is anyone have the idea to get hard disk serial no by using pb7? >...

IDE Serial Number does not match Licence Serial Number
I just ordered a boundle key. This is because I have reinstalled all my Delphi versions on a new computer. I installed RAD Studio XE4, RAD Studio XE2 and RAD Studio XE In RAD Studio XE I want to install Intraweb XI. I followed the instructions and first uninstalled Intraweb and then did a install but the install does not not accept the key. The install is called IW11.0.60.exe Please help me. This is very important. /Mikael ...

get volume serial number
can anyone help me get this working for asp.net server control using vb ? doesn't compile, error on "disk.Properties" and "response.write" ============== command line ================ vbc /t:library /out:volume.dll /r:System.web.dll /r:System.dll /r:System.Management.dll /r:System.Web.dll *.vb pause ============== code ================ Imports System Imports System.Management Imports System.web Class Disk Public Shared Sub Main() Dim drive As String = "C" Dim disk As ManagementObject = New Manageme...

How do I get a vaild serial number?
I took advantage of the RAD Studio 2009 deal for those that had just bought D2009. Has anyone else done this and managed to register the upgrade? The supplied serial number (from a CG online purchase) returns a message that it has expired when I try to register it. I've logged the problem with CG Support (ref 00D57Mdw.50055bNLL), but they don't seem to have read the original message. They just explain how to run the license manager to generate the error message I had already sent them. I've tried the web method as well - and I get a similar expired message for my new ser...

Getting the serial number of a printer
Hi All, Wondering if anyone knows how to get the serial number of a printer? Thanks Shane Shane Foreman wrote: > Hi All, > > Wondering if anyone knows how to get the serial number of a printer? > > Thanks > Shane I doubt that you can get that through software, such things tend to be very hardware-specific. -- Peter Below (TeamB) Hi Peter, Windows is able to determine two printers are different even if they are the same printer model. If they aren't detecting a serial number, any idea how this is done? Shane > Shane For...

Web resources about - Need code to get hard disk serial number - sybase.powerbuilder.general

Serial - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Serial Innovation
This is a very interesting site done by Brendan Steidle. He doesn’t just point out problems with a company or industries, he tries to offer solutions ...


Serial protesters Katherine Woskett and Hannah Patchett climb Melbourne's Arts Centre spire to protest ...
A week after they dangled from a freeway bridge, two protesters have scaled Melbourne's 162-metre Arts Centre spire to protest the deportation ...

Grateful 'Dead': AMC's Zombie Serial Remains Unstoppable
After a 10-week hiatus, "The Walking Dead" on Sunday night returned to the primetime lineup, where, in its inimitable fashion, it did the usual ...

'Serial' case: Adnan Syed hearing wraps up
Baltimore Sun 'Serial' case: Adnan Syed hearing wraps up Baltimore Sun C. Justin Brown, attorney for Adnan Syed, talks about what the defense ...

Adnan Syed from 'Serial' promises to 'keep fighting' to prove his innocence while judge considers retrial ...
... hearing, Adnan Syed said he will "keep fighting to prove my innocence." Syed, the season one subject of the popular podcast "Serial," was convicted ...

Serial stowaway arrested again at Chicago airport
Marilyn Hartman, 64, has tried numerous times in recent years to board planes without a ticket, succeeding at least once by flying from San Jose, ...

SERIAL KILLER CASE Baden: Prostitute found on NY beach likely strangled
SERIAL KILLER CASE Baden: Prostitute found on NY beach likely strangled

Serial Stowaway Arrested Again at Chicago's O'Hare Airport
A woman with a history of sneaking aboard airplanes has been arrested again at Chicago's O'Hare International Airport

Resources last updated: 2/21/2016 10:05:47 AM