gethdinfo for usb ?

User discussion and information resource forum for the TeraByte OS Deployment Tool Suite.

gethdinfo for usb ?

Postby tas3086 » Fri Apr 29, 2016 3:09 pm

Is there a function or utility in tbos like GETHDINFO and GETDRVLTRINFO, that would allow the detection of information for USB connected drives?
Thanks in advance.
tas3086
 
Posts: 210
Joined: Mon Mar 19, 2012 11:15 am

Re: gethdinfo for usb ?

Postby TeraByte Support » Fri Apr 29, 2016 3:46 pm

the .bus member ?


"tas3086" wrote in message news:11461@public.tbosdt...

Is there a function or utility in tbos like GETHDINFO and GETDRVLTRINFO,
that would allow the detection of information for USB connected drives?
Thanks in advance.

TeraByte Support
 
Posts: 2311
Joined: Thu May 05, 2011 3:37 pm

Re: gethdinfo for usb ?

Postby tas3086 » Mon May 02, 2016 7:53 am

TeraByte Support wrote:
> the .bus member ?
>
>
> "tas3086" wrote in message news:11461@public.tbosdt...
>
> Is there a function or utility in tbos like GETHDINFO and GETDRVLTRINFO,
> that would allow the detection of information for USB connected drives?
> Thanks in advance.

Having started TBOSDT on Windows 10 (64 bit), I can cd to J:, and runtbs a script that includes the gethdinfo function. All sata drives are listed, but not the CD/DVD and USB drives, including J:, a drive that has 4 partitions.

It should be noted that running (exec imagew) under tbosdt will see the J: drive as an available backup drive.

Any ideas?
tas3086
 
Posts: 210
Joined: Mon Mar 19, 2012 11:15 am

Re: gethdinfo for usb ?

Postby TeraByte Support » Mon May 02, 2016 11:40 pm

are you running it elevated?

cd/dvd drives are not HD so the command won't show them.

What are the drive numbers as shown in drive management (is there a large
gap) ?


"tas3086" wrote in message news:11465@public.tbosdt...

TeraByte Support wrote:
> the .bus member ?
>
>
> "tas3086" wrote in message news:11461@public.tbosdt...
>
> Is there a function or utility in tbos like GETHDINFO and GETDRVLTRINFO,
> that would allow the detection of information for USB connected drives?
> Thanks in advance.

Having started TBOSDT on Windows 10 (64 bit), I can cd to J:, and runtbs a
script that includes the gethdinfo function. All sata drives are listed, but
not the CD/DVD and USB drives, including J:, a drive that has 4
partitions.

It should be noted that running (exec imagew) under tbosdt will see the J:
drive as an available backup drive.

Any ideas?

TeraByte Support
 
Posts: 2311
Joined: Thu May 05, 2011 3:37 pm

Re: gethdinfo for usb ?

Postby tas3086 » Tue May 03, 2016 9:45 am

Windows diskpart shows the following drives:
DISKPART> list disk

Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 1863 GB 1060 GB
Disk 1 Online 2794 GB 0 B *
Disk 2 Online 931 GB 1024 KB
Disk 3 Online 223 GB 47 GB
Disk 4 No Media 0 B 0 B
Disk 5 No Media 0 B 0 B
Disk 6 Online 7650 MB 0 B
Disk 7 Online 7650 MB 0 B
Disk 8 Online 931 GB 0 B
Disk 9 Online 232 GB 0 B

Disks 0-3 are sata
4-5 cd/dvd
6-7 are USB
8-9 are sata on a second controller

It should be noted that tbexplo.tbs finds/sees the usb's.

Additional information.:
It seams that if the system is booted with all drives connected, then gethdinfo will work. If USB drives , or hot swap sata drives are connected after boot, then gethdinfo will not see the devices. Not 100% sure, but did see a change with one test.
tas3086
 
Posts: 210
Joined: Mon Mar 19, 2012 11:15 am

Re: gethdinfo for usb ?

Postby Eric » Tue May 03, 2016 9:54 pm

Why do you say that gethdinfo() don't see them?
How do you do the loop to browse all disk? Are you doing like below or with a "while"?
for hd=0 to 64
h=gethdinfo(hd)
if h then
...
end if
next
Eric
 
Posts: 95
Joined: Mon Sep 05, 2011 11:53 am

Re: gethdinfo for usb ?

Postby tas3086 » Wed May 04, 2016 8:51 am

n=0
h=gethdinfo(n,1)
while h
printl("")
printl("--------------DISK: ", h.num," -----------------------------------")
printl("Disk HDNum :", h.num)
printl("BIOSHDNUM :", h.BIOSHDNUM)
printl("NT Disk Sig :", hex(h.sig))
printl("GPT GUID :", hex(h.GUID))
printl("NAME :", h.NAME)
printl("Secsize :", h.secsize)
printl("Sectors :", h.size)
printl("Embr :", hex(h.embr))
printl("OutOfSync :", hex(h.OutOfSync))
printl("GPT :", h.gpt)
printl("GPT guid :", h.guid)
printl("Bus :", h.bus)
printl("c :", h.c)
printl("h :", h.h)
printl("s :", h.s)

pn=1
while h.partition[pn]
printl("--------------DISK: ", h.num," --- PARTITION: ", h.partition[pn].name)

.....


Changed while h to while h<=15 and things are working fine now. Thanks for the hint.
tas3086
 
Posts: 210
Joined: Mon Mar 19, 2012 11:15 am

Re: gethdinfo for usb ?

Postby Eric » Thu May 05, 2016 12:01 am

You mean to "while n<=15", not h?
Eric
 
Posts: 95
Joined: Mon Sep 05, 2011 11:53 am

Re: gethdinfo for usb ?

Postby tas3086 » Fri May 06, 2016 8:47 pm

Eric wrote:
> You mean to "while n<=15", not h?

Absolutely correct. I used the example that was in the manual, unfortunately that example stops when a CD/DVD device is detected. You need to continue checking if you want to get all devices. Too bad that there isn't some other easy way to determine when you get to the end of the device chain. A value of 64 took perceptibly longer to complete, but is probably more accurate that my value of 15 !!

Thank you again for suggesting the solution.
tas3086
 
Posts: 210
Joined: Mon Mar 19, 2012 11:15 am


Return to OSD Tool Suite