nedsociety / pysandboxie

A python binding to Sandboxie
MIT License
12 stars 2 forks source link

object error #9

Closed ABetterCat closed 2 years ago

ABetterCat commented 2 years ago

When i run code followed, the object excutes exe is not sandboxie named "testpy".It is the defaultbox.

` import sandboxie

sbie = sandboxie.Sandboxie()

settings = sbie.make_sandbox_setting('default') sbie.create_sandbox('testpy', settings=settings)

proc = sbie.execute(['notepad.exe'], 'testpy') print(proc.wait())

sbie.execute(['notepad.exe'], 'testpy') sbie.terminate_sandbox_processes('testpy') sbie.delete_content('testpy')
sbie.remove_sandbox('testpy' `

nedsociety commented 2 years ago

image

Can't reproduce. What's your Sbie version and pysandboxie commitid?

ABetterCat commented 2 years ago

image image

ABetterCat commented 2 years ago

image

nedsociety commented 2 years ago

Should be working for that version.

If you manually create a box called testpy and then run following (adjust path to your Sandboxie installation), does it spawn in testpy?

"C:\Program Files\Sandboxie-Plus\Start.exe" /box:testpy /wait notepad.exe

ABetterCat commented 2 years ago

image It is ok

ABetterCat commented 2 years ago

My installed path is "E:\install\Sandboxie".Should I change it?

nedsociety commented 2 years ago

The script should work without changing the installation path.

Could you debug into sbie.execute() call, break at this line and then dump what invocation_sandboxie and cmd has?

ABetterCat commented 2 years ago

sorry.I have run it successfuly.I didn't put param name into it.