Trust No Program
This topic is locked: you cannot edit posts or make replies.
Questions about Photoshop CS5 and the WindowAccess function
Kurt
Guest

Reply with quote
Hi everybody,

I have been trying to run Photoshop CS5 sandboxed for hours (because Adobe spams your system with too much registry entries, etc.). But when starting the program there is always this error: Not enough memory (there are some threads about this problem)...... in combination with the sandboxie errorcode SBIE 2219.
Then I found this thread ( http://www.sandboxie.com/phpbb/viewtopic.php?t=3744&sid=c104ca36998f985c9dc9fedddd285019 ) with the tip to add this entry to the config of the sandbox: OpenWinClass=*. Now Photoshop works sandboxed Wink.

Now I have some (more or less general) questions about the Window Access function:

1. Is Photoshop able to write something out of the sandbox (like registry, etc.) after this modification, or is the Window Access only (sometimes) necessary for communication between programs?

2. Leads a modification of the Windows Access to a decreades security level of the sandbox?

3. How can I identify the exact class names needed for Photoshop (to avoid the * entry in the Window Access Setting). I made a log with the Resource Access Monitor but until now I can't start Photoshop without the * entry.


Here is the log:

snipped. --tzuk

ciao
[/code]
OpenWinClass=# instead of OpenWinClass=*
Kurt
Guest

Reply with quote
When I cange the entry OpenWinClass=* in OpenWinClass=# I'm also able to start Photoshop. Don't know if this is necessary.


Ciao
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
Here, this might help you understand the OpenWinClass setting better. Wink
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15024
Reply with quote
Kurt are you saying that you get out of memory errors, but when you do OpenWinClass=* (or OpenWinClass=#) then it works? Some people have been trying to run Photoshop sandboxed so this might be a useful tip.

I suspect the problem is this,

Code:
WinCls X  Progman


This Progman is a component of Windows Explorer that some programs use, but isn't available in the sandbox. I'm aware of this and have a to-do item for myself to address this. Anyway -- try setting just OpenWinClass=Progman and see if that is enough for Photoshop.

If that alone doesn't work, try both:

OpenWinClass=#
OpenWinClass=Progman

_________________
tzuk
View user's profileSend private message
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
Don't forget, he is running Photoshop CS5 Portable (cough not legal cough), as per this line:
Quote:
WinCls O $:PhotoshopCS5Portable.exe


It may be different with an installed version of Photoshop. As a matter of fact, I have PS CS5 installed on my computer, so I'll try seeing if I can get it to run sandboxed too.

*EDIT*
Adding Progman alone doesn't work.
Adding Progman and # does work, but so does simply adding # alone... Razz
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15024
Reply with quote
I wasn't aware that Photoshop CS5 Portable was not legal.

Anyway -- as for Progman -- some programs don't actually look for this window class, instead they use a Windows API (GetShellWindow). Try taking out the OpenWinClass settings and instead run Windows Explorer sandboxed, I think that should create a usable Progman component in the sandbox.
View user's profileSend private message
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
tzuk wrote:
I wasn't aware that Photoshop CS5 Portable was not legal.

Well its because of the fact that there is no official version of PortablePS, therefore you can only find portable builds on.. certain sites... Rolling Eyes
Either way, moving on...

tzuk wrote:
Anyway -- as for Progman -- some programs don't actually look for this window class, instead they use a Windows API (GetShellWindow). Try taking out the OpenWinClass settings and instead run Windows Explorer sandboxed, I think that should create a usable Progman component in the sandbox.

Hmm, I created a new sandbox, left the settings alone and ran explorer sandboxed. While it was still running I ran PS5 sandboxed and got that error message again. Confused
View user's profileSend private message
Kurt
Guest

Reply with quote
First of all I want to say thanks for all your replies Very Happy . Then I feel i must say that I have an original version of Photoshop CS5 (the student version). But I'm a fan of portable software (no installation required; system is in most cases free from tons of registry entries, ....), so I try to convert nearly every of my (bigger) programs into a portable version (it's rather easy with system snapshot programs or in hard cases with a virtual machine). I know that on "certain sites" you can find some portable versions of this program, but I think for good software you have to pay (especially when you can buy the student versions with a rather good cost-performance ratio). But now back to topic:


Quote:

Here, this might help you understand the OpenWinClass setting better.


Of course I had read the faq before I asked my questions, but it was not really helpfull for me (maybe because my English isn't that good...).



Quote:

Kurt are you saying that you get out of memory errors, but when you do OpenWinClass=* (or OpenWinClass=#) then it works?


Yes, with OpenWinClass=* or OpenWinClass=# it works perfect. (# is more secure isn't it?)


Quote:


I suspect the problem is this,

Code:
WinCls X Progman


This Progman is a component of Windows Explorer that some programs use, but isn't available in the sandbox. I'm aware of this and have a to-do item for myself to address this. Anyway -- try setting just OpenWinClass=Progman and see if that is enough for Photoshop.

If that alone doesn't work, try both:

OpenWinClass=#
OpenWinClass=Progman



As SnDphoenix wrote in the post above mine, adding OpenWinClass=Progman does not work. Adding both terms seems rather useless for me, because it works already with OpenWinClass=#.



Quote:

Adding Progman alone doesn't work.
Adding Progman and # does work, but so does simply adding # alone...


Of course I can add # alone, but I want to learn more about the functions of sandboxie (at the moment about the Window Access function and especially the Resource Access Monitor). Moreover in the future I don't want to give programs always access to functions which aren't needed to start the program. So it would be nice when someone can help me with my three questions (especially the third but also with the others).

I would be grateful if someone can answer my questions Wink.


Ciao, Kurt
Addition
Kurt
Guest

Reply with quote
I have something to add to the problem:

When I add WindowClass=* or WindowClass=# to all programs, Photoshop starts. But when I add WindowClass=# to the Photoshop.exe it doesn't start, but adding WindowClass=* here works perfect.

Can sombody explain this? Im confused now Confused
Re: Addition
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
Kurt wrote:
I'm a fan of portable software (no installation required; system is in most cases free from tons of registry entries, ....), so I try to convert nearly every of my (bigger) programs into a portable version (it's rather easy with system snapshot programs or in hard cases with a virtual machine). I know that on "certain sites" you can find some portable versions of this program, but I think for good software you have to pay (especially when you can buy the student versions with a rather good cost-performance ratio).

Agreed. All software should be payed for, but especially the really good programs, the ones that make your life easier or get your work done, etc..
However I wouldn't tell Adobe you portablize their software, because regardless of whether you pay for it or not, part of your EULA is that you won't modify their software. Portablizing it counts as modification, though I doubt Adobe really cares... Razz

Kurt wrote:
I have something to add to the problem:

When I add WindowClass=* or WindowClass=# to all programs, Photoshop starts. But when I add WindowClass=# to the Photoshop.exe it doesn't start, but adding WindowClass=* here works perfect.

Can sombody explain this? Im confused now Confused

Ha, Photoshop itself is confusing, well except for me, I can use it fine. Laughing

Anyways, I have tried using R.A.M. to see what resources are blocked, I tried adding each resource one-by-one (atleast those resources that looked relevant...) and PS just wont start-up correctly unless you use WindowClass * or #. Confused

So now what I have been doing, is trying to decide what KIND of resource would need to be opened. I took a look at the error message PS throws up and I remembered that Photoshop uses something called a "scratch disk". A scratch disk is basically a part of your HDD that Photoshop temporarily uses as "RAM". The reason for it dates back to the 90's when most people had less than or around 32mb of ram. So to combat the low amount of memory people had, Adobe decided to add the "scratch disk" feature.
Unfortunately though, it is now 2010, most people have atleast 1gb of ram and the scratch disk feature is no longer needed, but Adobe won't remove it from their program... Sad

Anyways, in my opinion THAT is what the error message corresponds to. Not the users RAM, but instead the scratch disk. Maybe it can't initialize the scratch disk, create it, modify it, delete it, read it, etc..
But either way, I think thats what we have to focus on. Therefore, I am trying to find out possibly what resource would correspond to the scratch disk, but I am not having any luck. Confused
View user's profileSend private message
Kurt
Guest

Reply with quote
Quote:

However I wouldn't tell Adobe you portablize their software, because regardless of whether you pay for it or not, part of your EULA is that you won't modify their software. Portablizing it counts as modification, though I doubt Adobe really cares... Razz


Yeah, I think when you bought their software, Adobe does not really care what you do with their product (e.g. to make their products portable), especially when you do not use their product for commercial things.
And what you don't know won't hurt you Wink .


As long as we do not find the right resource, I use WindowClass #. It works fine with this setting.
As described in the Faq I think the WindowClass # setting can used without hesitation in the future (with other far less trustable software as Photoshop Wink ), because (if I have understood correctly) the programs can only communicate with other window classes within the sandbox when using the # setting.
tonecool


Joined: 24 Feb 2009
Posts: 48
Reply with quote
Confirmed, OpenWinClass=* works just fine with PhotoshopCS5 portable (WinXP sp3) . Thanks for a tip Kurt Wink
Installation of the official trial with this settings included still can't be done.
View user's profileSend private message
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
Kurt wrote:
As long as we do not find the right resource, I use WindowClass #. It works fine with this setting.
As described in the Faq I think the WindowClass # setting can used without hesitation in the future (with other far less trustable software as Photoshop Wink ), because (if I have understood correctly) the programs can only communicate with other window classes within the sandbox when using the # setting.

True, adding # isn't going to hurt, but I would still feel more comfortable adding only THE necessary resource(s) to the sandbox, if only we ever figure out what resource(s) they are... Confused
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15024
Reply with quote
I've looked into it and first thing is I'm sorry I sent you guys looking into the Progman thing which has absolutely nothing to do with this.

As you may know, Sandboxie is renaming window class names like Whatever to Sandbox:DefaultBox:Whatever, and for a few very specific window classes, this was confusing the Photoshop program. Having OpenWinClass=# disables this window renaming and that is why it worked.

Version 3.49.09 adds special exclusions for a few specific Photoshop window classes (without exposing any vulnerabilities) to work around this problem without having to specify any special settings.
View user's profileSend private message
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
Awesome tzuk!
I just created a new sandbox, and ran Photoshop CS5 from the Sandboxie Start menu, and it started up just fine, no changes to the sandbox settings required! Very Happy

Now unfortunately, I had already installed PS5 outside my sandbox a while ago, so its too late now cause all the junk is already on my system, but in the future, next time I reformat my computer, I am going to just install PS5 sandboxed instead to keep all the excess junk off my system since I know it runs correctly now!
View user's profileSend private message
Questions about Photoshop CS5 and the WindowAccess function
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 1  

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,781,686 times since June 2004