Advertisement
perazacad

VirtualDetect

Nov 16th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. display dialog "Am I running inside a virtual machine?" buttons {"Verify", "Cancel"} with title "VirtualDetect"
  2. if the button returned of the result is "Verify" then
  3.     try
  4.         do shell script "cp ~/Library/Preferences/com.parallels.iagent.plist ~/"
  5.         do shell script "rm -rf ~/com.parallels.iagent.plist"
  6.         display dialog "Running inside Parallels Desktop!" buttons {"OK"} with title "VirtualDetect" default button 1
  7.     on error errMsg number errNum
  8.         display dialog "No virtualization detected!" buttons {"OK"} with title "VirtualDetect" default button 1
  9.     end try
  10. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement