Analysis returns "Incompatible types."

(imported topic written by Luke.Foelske)

I am trying to create an analysis to check versions to Microsoft Communicator and Microsoft Lync.

This is my analysis:

if(x64 ofoperating system) then(If(existsfile “C:\Program Files (x86)\Microsoft Lync\communicator.exe”) then("Microsoft Lync: " &version offile “C:\Program Files (x86)\Microsoft Lync\communicator.exe” asstring) else(If existsfile “C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe” then("Microsoft Office Communicator: " &version offile “C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe” asstring) else “Not Installed”)) else(If(existsfile “C:\Program Files (x86)\Microsoft Lync\communicator.exe”) then("Microsoft Lync: " &version offile “C:\Program Files\Microsoft Lync\communicator.exe” asstring) else(If existsfile “C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe” then("Microsoft Office Communicator: " &version offile “C:\Program Files\Microsoft Office Communicator\communicator.exe” asstring) else “Not Installed”))

I’ll pulling the information I need in many cases, but I’m also getting the following error on quite a few:

Incompatible types.

Any ideas on how to correct this?

(imported comment written by IanR2974)

Hi Luke,

If what you pasted is the exact relevance you are using it will be failing as there is missing space for example on the first line you have existsfile and another example is asstring, Although it doesn’t explain the error.

As this error is usually seen when the “then” and “else” output is different for example a string and a integer, but you have got it all as string so you shouldn’t see this. Can you try the below (your updated relevance fixing space issue) and see how you get on as this works for me:

if(x64 of operating system) then(If(exists file “C:\Program Files (x86)\Microsoft Lync\communicator.exe”) then("Microsoft Lync: " & version of file “C:\Program Files (x86)\Microsoft Lync\communicator.exe” as string) else(If exists file “C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe” then("Microsoft Office Communicator: " & version of file “C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe” as string) else “Not Installed”)) else(If(exists file “C:\Program Files (x86)\Microsoft Lync\communicator.exe”) then("Microsoft Lync: " &version offile “C:\Program Files\Microsoft Lync\communicator.exe” as string) else(If exists file “C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe” then("Microsoft Office Communicator: " & version of file “C:\Program Files\Microsoft Office Communicator\communicator.exe” as string) else “Not Installed”))

1 Like