Was messing around with Sandboxie and noticed that when you sandbox a file it adds [#] to the beginning and end of the window caption. This is a very easy way to detect if Sandboxie is present or not.
Copy code
'DetectSandboxie
'Link: [url]http://sandboxie.com/[/url]
'Coded by xC
'12/24/07
Private Sub Form_Load()
If DetectSandboxie = True Then
MsgBox "Sandboxie detected!"
Else
MsgBox "Sandboxie not detected!"
End If
End Sub
Private Function DetectSandboxie() As Boolean
On Error GoTo Error
If Left(Form1.Caption, 3) = "[#]" And Right(Form1.Caption, 3) = "[#]" Then
DetectSandboxie = True
Else
DetectSandboxie = False
End If
Exit Function
Error:
DetectSandboxie =