FMPro- Setting a Host url at installation

pbenware1
Release Candidate Programs Tester

We are deploying FMPro 19 to various groups within our org.  I am using the script provided by Claris to build a custom built package, which is working fine, however one ask we have from the program manager is to try to set a Host URL in the client so that they do not have to assist every user in doing so. Its not that its terribly difficult to instruct users how to do this, but there is only 1 person to support nearly 1k users for this project.

 

I found one document, referencing FM Pro 15, that suggests adding the following attribute to the Assisted Install.txt file:

AI_PREFERREDSERVERFORCONNECTION=<host URL>

Unfortunately this is not working, at least not in FMPro 19. I've tried the usual format of fmnet:/<hostdnsname> and just entering the dns name without the leading fmnet:/

Neither worked.

Has anyone had any success in setting the Host URL via Jamf?

FWIW, when set manually the host URL is listed in a Pref file within ~/Library/Preferences.

1 ACCEPTED SOLUTION

sdagley
Esteemed Contributor II

@pbenware1 You could write the Host URL to the FMPro settings file in ~/Library/Preferences using the following script as a template:

 

 

#!/bin/sh

# This variable should be set to the preferences domain of the FMPro prefs file in ~/Library/Preferences
# (i.e. the file name without the .plist extension)
PrefsDomainForApp="com.vendorname.appname"

runAsUser() {  
	currentUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )
	currentUserID=$(id -u "$currentUser")

  if [ "$currentUser" != "loginwindow" ]; then
    /bin/launchctl asuser "$currentUserID" sudo -u "$currentUser" "$@"
  fi
}

runAsUser /usr/bin/defaults write $PrefsDomainForApp HostURLKeyName "HostURLSetting"

 

 

View solution in original post

3 REPLIES 3

sdagley
Esteemed Contributor II

@pbenware1 You could write the Host URL to the FMPro settings file in ~/Library/Preferences using the following script as a template:

 

 

#!/bin/sh

# This variable should be set to the preferences domain of the FMPro prefs file in ~/Library/Preferences
# (i.e. the file name without the .plist extension)
PrefsDomainForApp="com.vendorname.appname"

runAsUser() {  
	currentUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )
	currentUserID=$(id -u "$currentUser")

  if [ "$currentUser" != "loginwindow" ]; then
    /bin/launchctl asuser "$currentUserID" sudo -u "$currentUser" "$@"
  fi
}

runAsUser /usr/bin/defaults write $PrefsDomainForApp HostURLKeyName "HostURLSetting"

 

 

pbenware1
Release Candidate Programs Tester

Thanks @sdagley I'll give that a spin.

pbenware1
Release Candidate Programs Tester

@sdagley This worked, after adding a couple of additional lines to write.

I needed to include

FavHostInfo:Entry0:DisplayName "<server display name>"

LaunchCenterStates:LastSelectedHost "<serverURL>"

 

Once I added those, everything is working great in my test vm. Moving to deploy to a few test machines next.

Thanks for the assist.