Odd CONCATENATION behavior on a Macintosh Client

My co-working and I have been tasked with locating any computers that have Dropbox installed, and identifying which users are using it on each computer.

Frustratingly, Dropbox installs itself under the user profile, not in the normal installation location for each OS. Even the UNINSTALL key in windows is under the HKEY_USERS hive!

With a little creative Relevance clause work, we can detect the installations on Windows and Mac (Mac was easy).

IF (Windows of Operating System) THEN (IF (exists values “InstallLocation” of keys “Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox” of keys of key “HKEY_USERS” of registry) THEN (TRUE) ELSE FALSE) ELSE (IF ( Mac of Operating System) THEN (if exists application “Dropbox.app” then (TRUE) else FALSE) ELSE FALSE)

The next attempt was to locate the folder pathnames for the Dropbox folders that the software puts the files in. On both Macintosh and Windows systems, this is {profile}\Dropbox. The idea here is to identify the User who was using it so that they can be contacted to switch to something more secure.

if (Windows of Operating System) then (concatenation “||” of (values “InstallLocation” of keys “Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox” of keys of key “HKEY_USERS” of registry as String)) else (IF (Mac of Operating System) THEN (IF (exists folder “Dropbox” of folders of folder “/Users”) THEN (concatenation “||” of ((folders of folder “/Users”) whose (exists folder “Dropbox” of it) as string)) ELSE (“No Folders”)) ELSE (nothing))

It’s all well and good, EXCEPT if there are two instances of the “Dropbox” folder on the Mac. It works fine on the Windows side of things.

For example …

We are getting the following back as the result of the relevance …


I get the same results if I use the Mac QnA tool or allow the Analysis to return the results.

  • Did I butcher the Relevance?
  • Is this a bug in the Macintosh client?
  • Other suggestions?

I would guess that Mac reads the “||” as string rather than a return like Windows did.

Not sure why its doing this but you could make it simpler by doing a regapp

Q: regapp "Firefox.app"
A: "Firefox.app" "31.4" "Firefox" "31.4" "Firefox 31.4.0"

And the slightly different

q: regapp "Firefox.exe"
A: "firefox.exe" "" "Firefox" "33.1.1" "Mozilla Corporation"

I’m not sure what the || is doing in the ouput above on Windows to be honest

We tried a number of different characters as the concatenation character with the same result. So it does not appear to be related to the vertical bar character being special.

The reason for looking for /Users/userID/Dropbox is to indicate that Dropbox has been set up for that particular user account. We actually use regapp in the relevance of another property to tell if the Dropbox application had been installed on the computer.

Part of the problem is that the DropBox developers wanted EVERYONE to be able to install their app. So they wrote it to bypass most corporate restrictions. All the files and settings are kept under the User Profile. Both files and Registry keys. It doesn’t even use the C:\Program Files folder.

Well on the Mac we do look in the Applications directories under each user for an Application through “applications” or “regapp” so at least there you should be able to find it. We probably should have the “regapp” be able to look through users installs on Windows too

DropBox is the only app I’ve ever seen do this under Windows.

Under Windows, it’s my understanding that RegApp depends on an application placing a correct entry in the Registry to “register” it’s EXE. I forget the path, but I found it once. It surprising how many apps don’t bother to make the entry.


Does that return Strings, or Folder Objects? Maybe try “pathnames of folders of folder”?