RegEdit question for advanced Photoshop users

MS
Posted By
Mark_Sim
Dec 28, 2003
Views
2514
Replies
23
Status
Closed
For security reasons I use a hard disk eraser program to delete files and settings from my computer. One of the features of this software is the ability to make plugins that delete information such as recent file list of a specific program from the registry.

I don’t know how the registry works so I have tried using an included plugin. This is supposed to delete the most recently used file list from Photoshop. This works, but after running it, it seems to delete other preferences as well. Every time I run the eraser program, and then restart Photoshop, I get the prompt to set my color settings, then have to reset my scratch disks, then close and restart Photoshop.

The eraser software plugin is as follows:

—–PLUG-IN VERSION—–
EE v5.504
—–PLUG-IN DESCRIPTION—–
Eliminates Most Recently Used (MRU) file list in Adobe Photoshop v7.0 —–BEGIN PLUG-IN TASKS—–
—–REGEMPTYKEY—–
HKCU
Software\Adobe\Photoshop\7.0\VisitedDirs
# —–FILE—–
# %EE_CONSTANT_APPDATA%Adobe\Photoshop\7.0\Adobe Photoshop 7.0 Settings\Adobe Photoshop 7.0 Prefs.psp
—–END PLUG-IN TASKS—–

This seems to just delete all the preferences, but this of course is quite iritating because I don’t want to set them all each time. Does anyone know if there is a way to edit this so that just the most recently used files are deleted, but not the other preferences. Can anyone with a bit more skill than me post me an edited version, please? – It would be much appreciated.

Thanks!

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

JW
John_Woram
Dec 28, 2003
Mark, I don’t think this is a Registry issue. PS seems to store its list of recent files in the "Adobe Photoshop 7.0 Prefs.psp" file, which is here:

C:\WINDOWS\Application Data\Adobe\Photoshop\7.0\Adobe Photoshop 7.0 Settings.

From the plugin details you posted, it looks like the eraser goes to that folder and deletes the entire Preferences file. So, you lose the recent file list, and everything else too. That’s why you get the color-settings prompt.

The eraser plugin also looks at the Registry’s HKCU\Software\Adobe\Photoshop\7.0\VisitedDirs subkey, which contains the STARTUPIMAGEDIRECTORY path. I don’t know why it does this, because this location has nothing to do with the recent file list.

Anyway, unless there’s a way to get the eraser to selectively delete the recent file list from within the Preferences file, you might have to find some other means (if there is any) to do what you want.
MS
Mark_Sim
Dec 28, 2003
Thanks John,

From what you write, this leaves me in a dilema. I do need the most recently used file to be deleted after each session and I think the only way I can do this is by deleting the entire preferences file. I have opened the preferences file in a text editor and it looks as though it would be somehow possible to find the part relating to the MRU file, but the eraser program cannot securely delete a specific portion of the preferences file.

I found the the Photoshop preferences file and it does get deleted after I have run the eraser plugin. To prevent myself from having to manually reset the other preferences every time, would it make sense to set them up once, then copy the file to another part of the hard drive, then copy the file back to the PS7 settings folder before using Photoshop?

Even then, it is still a bit of a hassle to manually copy and paste the preference file every time I want to use Photoshop. I wonder whether John or someone else who is more computer literate than me could devise a simple script or some other way that I could click on an icon on the desktop that then copies a master preference file from one directory to the correct settings directory? Again, a big thanks in advance.
MS
Mark_Sim
Dec 28, 2003
Btw, if anyone wants to send me a file my email address is
JW
John_Woram
Dec 28, 2003
What about a little batch file that would

1. Copy the master prefs file,
2. Launch Photoshop,
3. Erase the prefs file on exiting Photoshop

That way every new PS session would be begin with a fresh file containing no recent file list.
DM
dave_milbut
Dec 28, 2003
what about just setting the recent file list to 0 in photoshop? Edit> Prefences> File Handling> Recent file list shows X files.
PH
Photo_Help
Dec 29, 2003
dave,

The recent file count is for display only. In other words Photoshop still tracks the files even if they are not shown. It sounds like mark wants to cover his tracks for whatever reason so all someone would need to do is set the count back to a higher number to view the file history.
DM
dave_milbut
Dec 29, 2003
In other words Photoshop still tracks the files even if they are not shown

Are you sure? I’ve never heard that.
DM
dave_milbut
Dec 29, 2003
write protecting the prefs file after setting it up would work too.
PH
Photo_Help
Dec 29, 2003
Mark,

What John said will work, but it isn’t necessary. Setting your "Adobe Photoshop 7.0 Prefs.psp" file to read only will work just fine if you can set your app to not include Photoshop in the purge.

Photoshop doesn’t use the OpenSaveMRU keys so registry modifications have no effect.

Dave,

Are you sure? I’ve never heard that.

Try it yourself if you don’t believe me 🙂
PH
Photo_Help
Dec 29, 2003
Dave,

Sorry didn’t see your #8 post.
MS
Mark_Sim
Dec 29, 2003
Yep, I think that even if the recent file list is set to 0, the information is still in the preferences file, even if it is not available from the photoshop menu.

I like John’s idea of having a batch file that does everything. Step 3 would not be necessary because this happens automatically and more efficiently when I shut down the computer and the eraser software kicks in, but I especially like the idea of step two – incorporating a Photoshop launch. Could I still adopt the PS7 icon on the batch file, so it would be just like clicking on the Photoshop icon on the desktop.

Problem is I have no idea where to start when it comes to creating files that do this stuff. I would love it if someone could show me how to do step 1 and 2.
PH
Photo_Help
Dec 29, 2003
Could I still adopt the PS7 icon on the batch file, so it would be just like clicking on the Photoshop icon on the desktop.

Yes. Just make your photoshop shortcut point to the batch file instead and keep using the photoshop icon for the shortcut.

For steps 1 & 2.

Create a new bat file somewhere (Photoshop folder would be good). Edit the file in notepad

Type these three lines…
COPY "[From (path and file name)]" "[To (path and file name)]" "C:\Program Files\Photoshop 7.0\Photoshop.exe" (Assuming default location) EXIT

Change the first line to match your system. Here is a basic example…

COPY "D:\Photoshop 7.0 Prefs.psp" "C:\Photoshop 7.0 Prefs.psp" "C:\Program Files\Photoshop 7.0\Photoshop.exe" EXIT

You don’t need to delete the prefs if you are still running the eraser app. If you no longer want to run the app just set the prefs file to read only and you don’t need the batch file.
MS
Mark_Sim
Dec 29, 2003
Thanks to everyone who replied. I tried to make the pref file read only. I noticed that when opening new files, they DO go into the MRU files. But they are not saved when exiting out of Photoshop. Whenever one goes back into Photoshop the MRU files are whatever they were when the pref file was made read only.

The question is, where is the information stored during the Photoshop session when the MRU is updated until exiting? Presumedly the preferences file. There remains a small chance then that although the MRU is not properly saved on a read-only pref file when exiting, small fragments of evidence remain. This is a risk I cannot take in my profession.

I have therefore gone for the bat file option that effectively restores a master preference file after previous ones have been destroyed. Thanks Photohelp for the code.
RP
Russell_Proulx
Dec 29, 2003
It’s pretty easy copy a default "Adobe Photoshop 7.0 Prefs.psp" file from a holding location into the ‘Application Data\Adobe\Photoshop\8.0\Adobe Photoshop CS Settings’ folder, overwriting whatever’s in there that needs getting rid of.

1) Setup your preferences to taste.

2) Copy the "Adobe Photoshop CS Prefs.psp" to some easy to find location (the desktop?)

3) Make a folder shortcut on your desktop to the ‘Application Data\Adobe\Photoshop\8.0\Adobe Photoshop CS Settings’ folder

4) Drag the default "Adobe Photoshop CS Prefs.psp" file into the folder shortcut and that’s it.

This can also be used to restore lost preferences. You could also include a command to automatically do this every time the computer starts by including a copy command in the autoexec.bat file (WindowsXP does have one too)

Hope this helps arrive at a practical solution for you.

Russell
RP
Russell_Proulx
Dec 29, 2003
Never mind… I see that Photo Help came up with a better solution 🙂

Russell
PH
Photo_Help
Dec 29, 2003
Mark,

No problem.

I was also talking about the windows file that tracks all MRU files regardless of application. You may want to double check the registry key below. Although I would think that any program that goes to the trouble of deleting a Photoshop preference file should delete the OpenSaveMRU’s with no problem.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\ComDlg32\OpenSaveMRU

The question is, where is the information stored during the Photoshop session when the MRU is updated until exiting?

My guess would be memory or possibly scratch. Either way temporary and it is doubtful that your application is doing anything about it anyway. If the file is read only Photoshop will not write to it.
PH
Photo_Help
Dec 29, 2003
Russell,

It wasn’t my solution, I just posted the instructions on the implementation. I would have just made the file read only. 🙂

I still feel the file should be read only either way and this is why… As long as that file is not write protected the Recent Documents list will still be written to the current Photoshop preference file. On Exit Mark will run the program that clears the preferences. The only thing that program is doing is deleting the file meaning that the file can be recovered.

Mark,

If you are going to use the batch file you should probably add one additional line after the COPY and before launching Photoshop…

ATTRIB +R [Path and file name you are copying to]
MS
Mark_Sim
Dec 29, 2003
Everything is hunkidory now. I am using the bat file AND read-only preferences. One last thing, and it is the tiniest of things. When I run the bat file, the DOS-like screen stays open until I either exit out of Photoshop or close it manually. Is there a command I can type at the end of the bat file to close this automitically? Probably not. I shouldn’t be so blooming lazy!
DM
dave_milbut
Dec 29, 2003
the EXIT command will do that, but will also terminate the bat file. if you want it to clean up after ps closes, you need to leave it up until you exit ps so it can return control to the bat file to finish processing.
MS
Mark_Sim
Dec 29, 2003
Hi, opening photoshop is the last thing I want to do with the bat file.

I have done some research over the last couple of hours and discovered that when an application is started by the bat file, the bat file does not continue with any other bat commands until the application is closed.

Other people on the net have found that this means that only the first application opens even if they asked for several to be opened in their bat file. So inclusing CLS or EXIT won’t work.

Some have found that adding the word start before the path and file name works for them, but I haven’t managed to get this to work yet (my app doesn’t open at all). Can someone give me an example of the exact syntax?

The other thing I wondered was setting the bat file to open a file (that would open the PS app) instead of asking it to open the app itself. Eg. Double clicking the pref file opens the PS7 app but doesn’t do much else. Any1 know how to open a file (not an app) through the bat file?
MS
Mark_Sim
Dec 29, 2003

P.S. Re. After re-reading the first line of previous msg.

Opening Photoshop is LITERALLY the last (final) thing I want to do with the bat file!!
DM
dave_milbut
Dec 29, 2003
start photoshop.exe
exit

should work…
MS
Mark_Sim
Dec 29, 2003
Yep thanks dave and every1 else.

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections