Catching return value form .exe
-
Hi! I've a .exe program writen in ANSI C that returns the real hard drive serial member. From VB i'm calling it doing like: MyApp = Shell("Diskid32.exe", 0), but Shell function returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero, but not the programs output! Can anyone help me with this? Thank you for your time
-
Hi! I've a .exe program writen in ANSI C that returns the real hard drive serial member. From VB i'm calling it doing like: MyApp = Shell("Diskid32.exe", 0), but Shell function returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero, but not the programs output! Can anyone help me with this? Thank you for your time
Why not just go here: http://www.mvps.org/vbnet/index.html?code/disk/volumelabel.htm[^]
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."
-
Why not just go here: http://www.mvps.org/vbnet/index.html?code/disk/volumelabel.htm[^]
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."
-
Thank you for answering but what i need is the manufacturer serial number not the volume's! If i know a way of doing it with VB please tell me!
Take a look at this URL for your solution: http://www.blackbeltvb.com/index.htm?free.htm
-
Hi! I've a .exe program writen in ANSI C that returns the real hard drive serial member. From VB i'm calling it doing like: MyApp = Shell("Diskid32.exe", 0), but Shell function returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero, but not the programs output! Can anyone help me with this? Thank you for your time
Well, I found the source for the utility your using. It's at http://www.codeguru.com/system/DiskId32.shtml. The only problem is, your going to have to recode it to be directly usable in VB, possibly as a DLL. The easier way to do it is to pipe the output from the program to a text file with something like: MyApp = Shell("Diskid32.exe > log.txt", 0) You might have to use another method to get this to launch properly. But, in any case, what your going to have to do is open the log.txt file and parse it up to pull the information out of it. It's better than writing a custom DLL to do the job...
-
Well, I found the source for the utility your using. It's at http://www.codeguru.com/system/DiskId32.shtml. The only problem is, your going to have to recode it to be directly usable in VB, possibly as a DLL. The easier way to do it is to pipe the output from the program to a text file with something like: MyApp = Shell("Diskid32.exe > log.txt", 0) You might have to use another method to get this to launch properly. But, in any case, what your going to have to do is open the log.txt file and parse it up to pull the information out of it. It's better than writing a custom DLL to do the job...