Trust No Program
This topic is locked: you cannot edit posts or make replies.
XxxFilePath for unavailable subst drive prevents prgm run
Mike


Joined: 16 Nov 2009
Posts: 592
Reply with quote
Let's say I have a subst virtual drive, X. When X: becomes unavailable (after I dismount the corresponding hard drive), programs can no longer run in any sandbox with a ReadFilePath=X:\, OpenFilePath=X:\, or ClosedFilePath=X:\ setting.

Basically, the errors come in threes:
Code:
SBIE1406 Missing or invalid expansion for (DOS path):  [C000003A]
SBIE1412 In text: [Sandbox05] ReadFilePath=X:\
SBIE1203 Cannot build path list (error in ReadFilePath)

Can Sandboxie simply ignore unavailable drives, like Windows Explorer does? I'm using Sandboxie 3.51.11 on Windows 7 x64.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
Interesting. Sandboxie already ignores settings with drive names that it can't find, but is only prepared to handle the case where the error is "object name not found". ("Object" being the "X:" in this case.) But here you got error "object path not found" and this is why the problem occurs. I will revise Sandboxie for this but I'd rather not mess around with version 3.51 anymore, if I can help it ... So this will have to wait for version 3.53.

_________________
tzuk
View user's profileSend private message
Mike


Joined: 16 Nov 2009
Posts: 592
Reply with quote
tzuk wrote:
But here you got error "object path not found" and this is why the problem occurs.

Oh, I see, because we're mapping a subfolder.

tzuk wrote:
So this will have to wait for version 3.53.

Great, thanks. Not an urgent issue.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
Should be fixed in version 3.53.01.
View user's profileSend private message
Mike


Joined: 16 Nov 2009
Posts: 592
Reply with quote
Hmm, I actually see no change in behavior with 3.53.01. The errors are triggered as soon as the "real" volume is dismounted.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
So to test this, I am thinking --

1. SUBST X: C:\TEST

2. Add some Sandboxie setting that includes drive X.

3. Run something sandboxed, should work.

4. SUBST X: /D

5. Run something sandboxed, should fail.

Yes?
View user's profileSend private message
Mike


Joined: 16 Nov 2009
Posts: 592
Reply with quote
Ah, tzuk, I should have been more explicit. The case you presented above should work fine, I think. The problem occurs when dismounting the actual hard disk volume without first removing the subst virtual drive. For example:

1. subst X: D:\Test
2. XxxFilePath=X:\
3. Sandboxie works fine.
4. Dismount D: without removing X:.
5. Sandboxie gives errors.
6. subst X: /d
7. Sandboxie is happy, works fine.

In Step 5, the errors occur as soon as the drive letter is removed using Disk Management or a third-party util.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
This should be fixed in version 3.53.04.
View user's profileSend private message
Mike


Joined: 16 Nov 2009
Posts: 592
Reply with quote
Things seem to be working, although there may be a minor niggle.

For the test below, D:\Test is mounted as subst drive X:\. I ran Notepad in two different sandboxes with a ReadFilePath=X:\.

1. Run Notepad in the first sandbox.
2. Dismount D:.
3. Run another instance of Notepad in the second sandbox.
4. Re-mount D:.
5. Issue: For me, X: is inaccessible to the second instance of Notepad, although it's accessible to the first instance. Error message: "X:\ is not accessible. The specified path is invalid."
6. If I exit the second instance of Notepad and run it again, then it can access X:.

In Step 2, if D: is actually powered off instead of simply dismounted in Disk Management, then in Step 5 neither instance of Notepad can access X:. The first instance gives a different error though, saying that "X:\ refers to a location that is unavailable. ..."
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
OK. I'm not sure this is easily fixable. I think I looked into a similar issue a few days ago with Explorer because I noticed it was not refreshing its list of available drives, as I was mounting/remounting some drives. It may have to do with Explorer relying on the Shell Hardware Notification service to refresh the list, and this service not notifying sandboxed programs. But I'm not sure. In any case it may be a more complicated issue that I might not be able to address immediately.
View user's profileSend private message
Mike


Joined: 16 Nov 2009
Posts: 592
Reply with quote
No worries, I'm pretty happy with the current behavior. Thanks for the fix!
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
Version 3.53.06 should fix the problem you reported Mike.

Also this version should fix the problem where Windows Explorer did not detect drives being added or removed.
View user's profileSend private message
Mike


Joined: 16 Nov 2009
Posts: 592
Reply with quote
Thanks for the improvement, tzuk, and sorry for the delayed reply. Everything works as expected, except when the drive is powered off in Step 2 of my Feb. 25 post. In that case, the first instance of Notepad can't access X: when D: is re-mounted, but the second instance can.

Again though, I'm pretty happy with the current behavior.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15003
Reply with quote
I'm not sure if I saw that -- I believe for me stuff worked as expected while testing numerous unmount/remounts without restarting programs in the sandbox. But I will take another look.
View user's profileSend private message
Mike


Joined: 16 Nov 2009
Posts: 592
Reply with quote
If I only removed the drive letter in Disk Management, everything was perfect. Perhaps the problem is with the way I powered off the drive using revoSleep 0.2.4:

http://revosleep.realspooky.de/ wrote:
Here is the proceeding of revoSleep:

- lock all partitions on the specified hard disk
- dismount all partitions on the specified hard disk
- sleep the specified hard disk
- put all volumes on the specified hard disk in offline state (vista)
- deactivate the driver for the specified hard disk
- the locked drives won't wake up
- u can unlock/lock different drives
View user's profileSend private message
XxxFilePath for unavailable subst drive prevents prgm run
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 2  

Use the RSS feed to watch this topic for replies
  
  
 This topic is locked: you cannot edit posts or make replies.  

Sandboxie is Copyright © 2004-2012 by Sandboxie Holdings LLC.  All rights reserved.
Sandboxie.com | Contact Author
This site has been viewed 208,045,174 times since June 2004