Windows volumes

Phil Davis revdev at pdslabs.net
Wed Feb 7 16:52:37 EST 2007


Hi Richard,

Richard Miller wrote:
> Thanks, Phil. This would seem to be what I want. However, I can't get 
> the function to produce a value. I'm trying
> 
>         put 
> queryRegistry("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum\") 
> 
> 
> in the message box, but nothing comes back. What am I doing wrong?


You're asking queryRegistry() to give you the names of all the items in the 
'\Enum' folder (not the correct term, but the metaphor fits). However, 
queryRegistry() isn't smart enough to do that. It only knows how to return the 
value of a specific registry item.

So here's what you can do: Open RegEdit on your Windows machine and *very 
carefully* navigate to the above node/folder/endpoint. See what items are in 
there, write them down and close RegEdit. Then ask queryRegistry() for one of 
those values. It'll do it!

For example, if you put "0" (zero) after "Enum\" in the above reg path, you'll 
see the value stored in the item named "0". (Assuming there is an item by that 
name - should be)

Caveats:
Some registry values are stored as double-word binary data, so (typically) you 
have to convert them to chars before they are of much use.

Have fun!
Phil


> 
> Thanks.
> Richard Miller
> 
> 
> On Feb 7, 2007, at 1:50 PM, Phil Davis wrote:
> 
>> Hi Richard,
>>
>> Richard Miller wrote:
>>> How can I get a list of the full names of all currently running 
>>> volumes under Windows? I know there is a volumes function, but that 
>>> only returns the drive letters. I need to see the full names of these 
>>> drives. Does this require a shell command, and if so, what would that 
>>> be?
>>
>>
>> On Windows, all the info you want is in the registry. That means you 
>> can get it very quickly with Rev's 'queryRegistry' function.
>>
>> Check out these registry locations (or whatever they're called), and 
>> see how their values change as you mount, unmount, disconnect various 
>> storage devices:
>>
>> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\
>>
>> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum\
>>
>> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Enum\
>>
>>
>> There may be other registry values you need as well, but I'm guessing 
>> the second one in the above list will help.
>>
>> HTH -
>> Phil Davis
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 



More information about the use-livecode mailing list