VirtualDetect

display dialog "Am I running inside a virtual machine?" buttons {"Verify", "Cancel"} with title "VirtualDetect" if the button returned of the result is "Verify" then try try #DETECTING PARALLELS DESKTOP do shell script "ls ~/Library/Preferences/com.parallels.sharedfolders.plist" display dialog "Running inside Parallels Desktop!" buttons {"OK"} with title "VirtualDetect" default button 1 on error #errMsg number errNum #SECOND TRY RESULT ON ERROR #DETECTING VMWARE FUSION do shell script "ls /Library/LaunchDaemons/com.vmware.launchd.tools.plist" display dialog "Running inside VMware Fusion!" buttons {"OK"} with title "VirtualDetect" default button 1 end try on error display dialog "No virtualization detected!" buttons {"OK"} with title "VirtualDetect" default button 1 end try end if
Extremely simple proof of concept for detecting Parallels Desktop & VMware Fusion virtualization.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.