from System import Environment
isWebPlayer = Environment.CommandLine.Contains("w3wp.exe")
from System import Environment
isWebPlayer = Environment.CommandLine.Contains("SpotFire.Dxp.Worker.Host.exe")
#isWebPlayer = Environment.CommandLine.Contains("WEB_PLAYER")
#Optionally run this on webplayer to see what the actual command line was use to launch webplayer:
from System import Environment
Document.Properties["whatInstance"] = Environment.CommandLine
2 comments:
Code is no longer valid in Spotfire 7.6
Arthur, you are right. The architecture on 7+ is different as it pushes the instance via node manager so the process name is different.
Did you try looking what the actual process is before checking if it contains w2wp.exe?
from System import Environment
whatInstance = Environment.CommandLine#.Contains("w3wp.exe")
Document.Properties["isWebPlayer"] = whatInstance
Post a Comment