OK I am really stuck trying to get my head around this,

I have a login script that maps drives depending on service, so if user is part of that security group and the client software is installed locally then the drive is mapped.

Say that drive for the application uses drive O:, so my function will add "16384" to the "NoDrives" REG_DWORD within the registry and the drive is now hidden.

But say I have another service that also uses drive O:, and I use my function again, it will add "16384" to the "NoDrives" REG_DWORD and I will end up with a total of 32768.

I have no error checking within my function, to check if drive O: is aready hidden.

Is there a way to convert the "NoDrives" REG_DWORD value into binary.

Say drive O: was hidden the binary would be: 00000000000100000000000000.

From this I could split the binary into array, and check each drive to see if it was hidden or not.

I hope this makes more sence.

The binary layout will allways be a 26 bit.
Thanks