How to investigate why a program exits immediately

Please post your problem description here

Moderator: Barb@Invincea

Post Reply
RedBonnet
Posts: 13
Joined: Tue Dec 08, 2015 2:56 pm

How to investigate why a program exits immediately

Post by RedBonnet » Fri Mar 18, 2016 12:11 am

Windows 7 x64
Sandboxie 5.10 - Drop Rights unchecked.
Using Windows as a Standard User (not Administrator)

When I start the PhpStorm installer within the sandbox, it exits immediately without any error message. What can I do to figure out why this happens and whether there is anything I can do to make it work in Sandboxie?

If Sandboxie force-closes a program, will it inform me?

Craig@Invincea
Sandboxie Support
Sandboxie Support
Posts: 3523
Joined: Thu Jun 18, 2015 3:00 pm
Location: DC Metro Area
Contact:

Re: How to investigate why a program exits immediately

Post by Craig@Invincea » Fri Mar 18, 2016 12:21 am

No, It may not inform you, especially of the program cannot be installed.

Have you tried it w/ Drop Rights checked?
Maybe this php install requires admin access?
Antivirus software installed/Antimalware?

PhpStorm includes Java installation, that can be problematic as well.

Whatever you create in the SB isn't permanent

RedBonnet
Posts: 13
Joined: Tue Dec 08, 2015 2:56 pm

Re: How to investigate why a program exits immediately

Post by RedBonnet » Fri Mar 18, 2016 12:43 pm

> Have you tried it w/ Drop Rights checked?
A: This was a really helpful hint. See results below

> Maybe this php install requires admin access?
A: I don't know. Because I have a Standard User account, every installation asks for admin privileges. In this case, I granted privileges, but PhpStorm installer exited immediately thereafter. Further interesting discoveries below.

> Antivirus software installed/Antimalware?
A: I don't use either

::: Round 1 ::::
I enabled DropRights and the installer was able to start (did not immediately exit as it had previously done).

I received 3 messages from Sandboxie:
  • SBIE2217 Request to run as Administrator was denied due to dropped rights
  • SBIE2219 Request was issued by program PhpStorm-2016.1.exe [DefaultBox]
  • SBIE2220 To permit use of Administrator privileges, please double-click on this message line
I ignored the messages and proceeded to successfully install and run the program. Another difference to note: without Drop Rights, Windows would prompt me to give admin privileges to Sandboxie when I tried to open the installer but the program would exit as soon as I granted privileges (Sandboxie itself is running as me, so without admin privileges). This time around, I received no such prompt and the installer worked.

This raises an interesting question: the Drop Rights settings pane states "if you are using an administrative or power user account, Sandboxie can disable more security rights". I assumed that because I am only a Standard User, this would not apply to me (my rights are already reduced). Why would enabling Drop Rights make a difference in my case?

::: Round 2 :::
To test things further, I disabled Drop Rights and changed my Windows account type to Administrator, cleared the sandbox and started the installer again. This time Windows prompted me to grant Sandboxie admin privileges, but unlike in the Opening Post, the installer was able to run without trouble after I agreed. So I wondered whether the initial problem was that Sandboxie could not manage a situation in which the program asks for admin privileges when the user is not an Administrator; perhaps Sandboxie was unable to transfer these privileges to the program?

::: Round 3 :::
I cleared everything, exited Sandboxie, and changed my Windows account type back to Standard User. This time though, I used "Run as Administrator" to start Sandboxie Control and made sure Drop Rights was disabled. I than attempted to run the installer sandboxed, and it ran without a hitch. Windows didn't even ask me for admin privileges. The only problem was that Sandboxie seemed to go through its first-run routine, and the installer could not see the settings that had been left by the previous version of the PhpStorm program (old settings had been saved to C:\Users\$USERNAME\.WebIde100). Maybe Sandboxie prevented the program from seeing into that $USERNAME's folder because sandboxie was running under a different account (Administrator)? In a seemingly related problem, if I open Explorer sandboxed and try to navigate to that folder, I am denied access even though SB is running as admin, and the Admin account has full access to that folder (and remember, Drop Rights is disabled)

::: Other notes :::
You mentioned that Sandboxie may not inform when it force-closes a program. If it could be done relieably, it would probably be really helpful for Sandboxie to notify the user of the reason it closed a program, if it knows.

bo.elam
Sandboxie Guru
Sandboxie Guru
Posts: 2809
Joined: Wed Apr 22, 2009 9:17 pm

Re: How to investigate why a program exits immediately

Post by bo.elam » Sat Mar 19, 2016 12:34 pm

RedBonnet wrote:Windows 7 x64
Sandboxie 5.10 - Drop Rights unchecked.
Using Windows as a Standard User (not Administrator)

When I start the PhpStorm installer within the sandbox, it exits immediately without any error message. What can I do to figure out why this happens and whether there is anything I can do to make it work in Sandboxie?

If Sandboxie force-closes a program, will it inform me?
RedBonnet, let me try, but lets go back to point Zero. Your best chance to install a program in the sandbox is to leeave Drop rights unchecked. If you check DR, the program is not going to install and you should get Sandboxie messages 2217, 2219 and 2220 when you run the installer in the sandbox. So, dont check Drop rights.
http://www.sandboxie.com/index.php?SBIE2217
http://www.sandboxie.com/index.php?SBIE2219
http://www.sandboxie.com/index.php?SBIE2220

Some programs, no matter what, are not going to install in the sandbox but most programs that can be installed in the sandbox do install in a default settings sandbox. So, I suggest, to go ahead and create a new sandbox, dont copy settings from any existing sandbox, leave settings on default and then run the installer.

Bo

RedBonnet
Posts: 13
Joined: Tue Dec 08, 2015 2:56 pm

Re: How to investigate why a program exits immediately

Post by RedBonnet » Mon Mar 21, 2016 12:54 am

Hey Bo. Thanks for your message. After Craig's suggestion, I was able to get the installer to run, but in testing a few questions came up leading me to write the previous post.

Basically I use a Standard User (not Administrator) account and I discovered that with Drop Rights disabled, the installer would ask for admin privileges, and after a agreed would immediately exit. With Drop Rights enabled, the installer would not ask for admin privileges and would work.

On the other hand I also found that if I started Sandboxie Control as an Administrator, the installer would work even with Drop Rights disabled. Of the questions I raised, the most pertinent is:

Why would enabling Drop Rights make a difference when Sandboxie is running as a Standard (not Admin) user?

bo.elam
Sandboxie Guru
Sandboxie Guru
Posts: 2809
Joined: Wed Apr 22, 2009 9:17 pm

Re: How to investigate why a program exits immediately

Post by bo.elam » Mon Mar 21, 2016 12:26 pm

RedBonnet wrote: Why would enabling Drop Rights make a difference when Sandboxie is running as a Standard (not Admin) user?
Hi RedBonnet. If the program installs in the sandbox with Drop rights enabled, it should be easier for the installation to go through with Drop rights disabled. Thats how its supposed to be. What you found (the reverse) doesnt make sense to me and I cant explain it. :)

I run as an Administrator and don't have any experience using an Standard user account. A few days ago someone at Wilders using an Standard use account posted a question (Post 2591) about Drop rights and the Standard User Account, I answered it the best I could and based on what I know how its supposed to be. Read the conversation, my friend, and see what you get out of it. Based on what I know, what he found is exactly how things should work when you run Sandboxie in an Standard user account and you try to install a program in a sandbox with and without enabling Drop rights.
http://www.wilderssecurity.com/threads/ ... st-2573567

Bo

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest