views:

426

answers:

1

How can I check if the current user is using roaming profile?

Is there any .net framework library that can help?

+1  A: 

I believe the only way to do this is to call the Win32 shell function GetProfileType. You would need to use P/Invoke to make the call and then check the out value of the pdwFlags parameter for PT_ROAMING (which has the value of 2).

I don't see a sample signature for this function on pinvoke.net but with such a simple signature:

BOOL WINAPI GetProfileType(      
    DWORD *pdwFlags
);

Creating one would not be hard.

Bubbafat
@Bubbafat: Is it true that user with roaming profile doesn't have installation rights by default? How to set those permissions then?
gneash