Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

drax-him-sklounst
Posts: 7
Joined: Sun Sep 03, 2023 7:07 pm

Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by drax-him-sklounst »

I would find it useful for my use case to be able to launch SandMan.exe from the portable version of Sandboxie-Plus, but to hide the GUI automatically, or start in minimized to tray mode.

Is there a parameter I can pass to make this happen, or would I have to submit a feature request?

User avatar
bastik-1001
Posts: 401
Joined: Sat Apr 22, 2023 8:30 am
Contact:

Re: Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by bastik-1001 »

@DavidXanatos are there command line arguments that make the new GUI reside in the tray?

drax-him-sklounst
Posts: 7
Joined: Sun Sep 03, 2023 7:07 pm

Re: Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by drax-him-sklounst »

I can't find anything in any documentation about this, so I'm going to assume it isn't possible.

User avatar
bastik-1001
Posts: 401
Joined: Sat Apr 22, 2023 8:30 am
Contact:

Re: Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by bastik-1001 »

I guessed that the documentation could be lacking that function, since I did not see it in there and Sandman did not react differently with my attempts, but I could have been mistaken as the command could have a different argument.

Sandboxie-Plus 1.11.2 got options inside the GUI to control what happens when the main window is closed, but this is not exactly what you are looking for.

drax-him-sklounst
Posts: 7
Joined: Sun Sep 03, 2023 7:07 pm

Re: Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by drax-him-sklounst »

Ah no worries, I appreciate your help. I guess I would have to make a feature request to get a '/quiet' option - not sure if I will do that but glad to know I have the option.

Zigul
Posts: 7
Joined: Thu Sep 14, 2023 9:51 pm

Re: Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by Zigul »

If I understood correctly the desired result, it should be possible to launch a program minimized by clicking a link set to "minimized" (in Property / Shortcut tab, "Run" settings). I tried it with a Sandboxie-Plus portable version and it worked. If you want it to happen every time Windows starts up, it should be enough to put that link in "startup" folder.
Here an example: https://www.heyvaldemar.com/minimize-pr ... 0-startup/

drax-him-sklounst
Posts: 7
Joined: Sun Sep 03, 2023 7:07 pm

Re: Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by drax-him-sklounst »

Zigul wrote:
Sun Sep 17, 2023 10:52 pm
If I understood correctly the desired result, it should be possible to launch a program minimized by clicking a link set to "minimized" (in Property / Shortcut tab, "Run" settings). I tried it with a Sandboxie-Plus portable version and it worked. If you want it to happen every time Windows starts up, it should be enough to put that link in "startup" folder.
Here an example: https://www.heyvaldemar.com/minimize-pr ... 0-startup/
Ah, thank you for that suggestion, but I don't think that will work. I'm hoping to minimize to system tray automatically, not just minimize to taskbar. The same behavior that when you click the 'x' in the gui, it will still be running but not visible on screen unless you open it from the systray icon.

A lot of apps have a parameter allowing them to start silently, but sandboxie doesn't seem to.

Zigul
Posts: 7
Joined: Thu Sep 14, 2023 9:51 pm

Re: Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by Zigul »

It seems I managed to obtain what you want using this .vbs script (I just wrote it in a notepad and changed the file extension)

set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run("""C:\Program Files\Sandboxie-Plus\SandMan.exe""")
WshShell.appactivate ("Sandboxie-Plus")
WScript.Sleep(3000)
WshShell.SendKeys "%{F4}"

This should work, assuming that the Sandboxie directory is correct (line 2) and 3 seconds is enough to launch it (line 4), otherwise you can adjust the script accordingly. The "appactivate" (line 3) should help avoid that alt+F4 is sent to any other already opened app; in case it's sent to Windows, it means you have to increase the waiting time in milliseconds in line 4.
As said above, you can put this script in Startup folder, if you need to. Now I think Sandboxie shouldn't "try to get froggy" anymore (assuming I guessed correctly the reference in your alias).

drax-him-sklounst
Posts: 7
Joined: Sun Sep 03, 2023 7:07 pm

Re: Is there a way to launch SandMan.exe in portable mode, and automatically hide the GUI?

Post by drax-him-sklounst »

Zigul wrote:
Tue Sep 26, 2023 1:17 pm
It seems I managed to obtain what you want using this .vbs script (I just wrote it in a notepad and changed the file extension)

set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run("""C:\Program Files\Sandboxie-Plus\SandMan.exe""")
WshShell.appactivate ("Sandboxie-Plus")
WScript.Sleep(3000)
WshShell.SendKeys "%{F4}"

This should work, assuming that the Sandboxie directory is correct (line 2) and 3 seconds is enough to launch it (line 4), otherwise you can adjust the script accordingly. The "appactivate" (line 3) should help avoid that alt+F4 is sent to any other already opened app; in case it's sent to Windows, it means you have to increase the waiting time in milliseconds in line 4.
As said above, you can put this script in Startup folder, if you need to. Now I think Sandboxie shouldn't "try to get froggy" anymore (assuming I guessed correctly the reference in your alias).
I appreciate your help here! I'm already calling it from powershell scripts, and didn't want to overly complicate things. I might take your idea though and reimplement it in powershell, thank you :)

And you absolutely guessed the reference from my alias correctly! I hate it when any program tries to get froggy lol!


Post Reply