# Get HostPlatform

**URL:** <https://the.fmsoup.org/t/get-hostplatform/2311>\
**Category:** Questions\
**Tags:** filemaker-server\
**Created:** [July 7, 2021, 8:37pm UTC](https://the.fmsoup.org/t/get-hostplatform/2311 "2021-07-07T20:37:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtslights](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/mtslights/32/1545_2.png) [@mtslights](https://the.fmsoup.org/u/mtslights)\
**Post date:** [July 7, 2021, 8:37pm UTC](https://the.fmsoup.org/t/get-hostplatform/2311/1 "2021-07-07T20:37:00Z")

</div>

How can you find out if Filemaker Server is running on a Mac or on a Windows machine?  
Because a container will only show a pdf when optimized for images on a Mac, and when optimized for interactive content in Windows, I was using Get ( SystemPlatform ) to hide the container that doesn't work.  
However, if I log in to Filemaker Server running on a Mac from a Windows machine, I would need the version optimized for Mac (for images). I was hoping there was something like Get ( HostSystemPlatform ) to return that information, but I'm coming up blank.

---

<div class="post-metadata">

**Author:** ![FileKraft](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/filekraft/32/1183_2.png) [@FileKraft](https://the.fmsoup.org/u/FileKraft)\
**Post date:** [July 7, 2021, 10:13pm UTC](https://the.fmsoup.org/t/get-hostplatform/2311/2 "2021-07-07T22:13:56Z")

</div>

write script and call a sub script executed server sided via PSoS as follows:

If [  
PatternCount ( Get ( ApplicationVersion ) ; "Server" ) ]

Exit Script [Result: List ( Get ( SystemPlatform ) ; Get ( SystemVersion ))]

Else

Perform Script on Server [By name; Get ( ScriptName )] [Wait for completion]

Show Custom Dialog [Title: "Host Info"; Message: Get ( ScriptResult ); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No”]

End If

---

<div class="post-metadata">

**Author:** ![FileKraft](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/filekraft/32/1183_2.png) [@FileKraft](https://the.fmsoup.org/u/FileKraft)\
**Post date:** [July 8, 2021, 12:26pm UTC](https://the.fmsoup.org/t/get-hostplatform/2311/3 "2021-07-08T12:26:06Z")

</div>

so Get ( HostSystemPlatfromFictional' ) could not be written with functions so you need to script it and keep test if file hosted by Windows in a global.

Does your file access from different servers at the same time or is it just one file hosted generically?

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [July 8, 2021, 9:55pm UTC](https://the.fmsoup.org/t/get-hostplatform/2311/4 "2021-07-08T21:55:04Z")

</div>

@mtslights Are you saying that the FMS host OS is causing differences in the way that the FMP client handles content?

---

<div class="post-metadata">

**Author:** ![mtslights](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/mtslights/32/1545_2.png) [@mtslights](https://the.fmsoup.org/u/mtslights)\
**Post date:** [July 8, 2021, 11:44pm UTC](https://the.fmsoup.org/t/get-hostplatform/2311/5 "2021-07-08T23:44:57Z")

</div>

Two business are using it, one is hosting on a Mac with both Mac and Windows clients, one is hosting on a Windows machine with windows clients. I’d like to script it to work on any system rather than customize each one.

---

<div class="post-metadata">

**Author:** ![mtslights](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/mtslights/32/1545_2.png) [@mtslights](https://the.fmsoup.org/u/mtslights)\
**Post date:** [July 8, 2021, 11:50pm UTC](https://the.fmsoup.org/t/get-hostplatform/2311/6 "2021-07-08T23:50:06Z")

</div>

Yes, a pdf in a container will not show in Windows if optimized for images, and will not show in Mac OS if optimized for interactive content.  
Depends on the server OS, not the client OS.  
Pain in the butt, have put a lot of hours into scripting around something that should just work…

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [July 9, 2021, 2:43am UTC](https://the.fmsoup.org/t/get-hostplatform/2311/7 "2021-07-09T02:43:56Z")

</div>

I understand that there are different behaviours between MacOS and WinOs that are annoying. I'm still not clear how the server OS is involved.

---

<div class="post-metadata">

**Author:** ![mtslights](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/mtslights/32/1545_2.png) [@mtslights](https://the.fmsoup.org/u/mtslights)\
**Post date:** [July 9, 2021, 11:42am UTC](https://the.fmsoup.org/t/get-hostplatform/2311/8 "2021-07-09T11:42:50Z")

</div>

I don’t know WHY, but here’s HOW the server is involved. On FileMaker Server running on a Mac, it is the server that processes the contents of the container (a PDF file in this case). So even though the client is Windows, the field behaves as if it is on a Mac and the container settings have to be optimized for images in order to view or print the PDF in the container. So in order to hide the incorrectly optimized container (I have 2 copies, one optimized for Windows and the other for Mac), I need to know if the host is Windows or Mac (or Linux).
