6 Replies Latest reply on Oct 12, 2011 12:05 PM by allenj22

    Script Alert (error)

    AlexEJerome Level 1

      1. When attempting to save the before and after images: "Failed saving document: ReferenceError: General Photoshop error occured. This functionality might not be availible in this version of Photoshop.

          -Could not save a copy as "C:\Program Files\...\before.png" because the file is locked or you do not have the necessary access priviledges. use the 'Properties' command in windows explorer to unlock the file."

      2. I'm the Administrator on my laptop.

      3. Im using Photoshop CS5.1 Photoshop 64bit Extended...

      any idea how i can fix this?

        • 1. Re: Script Alert (error)
          AlexEJerome Level 1

          Nvm... found a work around when i right clicked photoshop and clicked "run as administrator"... since im the andministrator of the laptop, i didn't think it would make a difference...

          • 2. Re: Script Alert (error)
            allenj22 Adobe Employee

            Yeah, it's part of  Windows UAC to protect users from harmful programs.  Note that this applies to Vista and Windows 7.  The following folders are protected:


            C:\Program Files\

            C:\Program Files (x86)\  (32 bit app folder for 64 bit OS)

            C:\   (you cannot write files directly to c:\ - you can create folders but not files)

            C:\Windows (of course)


            The only way to write to them is with "admin" privileges.  If you want to create/update files in any of those folders, you need to launch the app with "run as administrator", which fully elevate rights and privileges.

            • 3. Re: Script Alert (error)
              john beardsworth Adobe Community Professional & MVP

              Sorry, Allen, but the correct answer is not to require us to run Photoshop with admin privileges but to change the extension so it saves to a folder of the user's choice. I don't want to have to remember admin privileges every time I run this thing.

              • 4. Re: Script Alert (error)
                john beardsworth Adobe Community Professional & MVP

                Also don't truncate "C:\Program Files\...\before.png"



                • 5. Re: Script Alert (error)
                  john beardsworth Adobe Community Professional & MVP

                  And build in an error message that tells the user "you've not installed ScriptListener, would you like me to do it?"


                  I have played with SL before and so I understood what wasn't working when the log files were empty, but (a) creative people don't follow step by step instructions (b) many creatives are creatives because they are allergic / incapable of anything that looks like scripting. So shrink wrap this requirement.


                  It might also be useful for the extension to disable ScriptListener when Photoshop starts. Unless you're doing tutorials every time you run Photoshop, you don't want ScriptListener running permanently.



                  • 6. Re: Script Alert (error)
                    allenj22 Adobe Employee

                    Hi John,


                    My comments wasn't trying to give the correct answer but to comment on the initial post that ask why "running as admin" is any different than the original user account, which is also an admin of the machine.


                    Not sure who flagged it as "right answer" -- but I agree with you that the answer above is a workaround.  The better answer is to have scripts save any outcome to a folder of the user's choice.


                    As for ScriptListener, that's a good idea for those doing scripting.  For users that don't know/don't care about scripting, this would probably freak them out