How to determine where users "My Documents" are being targeted to

(imported topic written by WVUTech0591)

Im trying to determine the locations of my customers My Documents target. The registry key and value im am working with is below. Because Im working in the HKCU hive need this to be run when a user is present and it looks like you cannot set an “analysis” only target workstations with a user present. Any ideas on my other options? Im basically trying to determine if “My Docs” are being stored locally or on the customers network share. Thanks for your help!

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

Value

Name: Personal

Type: REG_SZ

Data:

(imported comment written by jessewk)

If you are at 7.0, try this:

value “Personal” of keys “Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders” of current user key (logged on users) of registry

If you are before 7.0 try something like this:

if (exists current user) then (value “Personal” of key “Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders” of (key whose ((it = name of current user as lowercase OR it starts with name of current user as lowercase & “@” ) of (it as string as lowercase) of value “Logon User Name” of key “Software\Microsoft\Windows\CurrentVersion\Explorer” of it) of key “HKEY_USERS” of registry)) else “No Current User”

The 7.0 version will return nothing if there is no logged on user. The 6.0 version will return “No Current User”. You can wrap the 7.0 version in the same if clause as the 6.0 if you’d like it to also return “No Current User” … except I’d use (if not exists logged on user then … else …)

See here for more on dealing with the HKCU branch in both relevance and actions: http://forum.bigfix.com/viewtopic.php?id=11

See here for more info on the differences between ‘current user’ and ‘logged on user’: http://forum.bigfix.com/viewtopic.php?id=1187

(imported comment written by WVUTech0591)

Looks like its gonna work. I appreciate your quick response!

Pete