Topaz Studio Photoshop Utility batch file needs updating

I submitted a Help request to Topaz Studio Help Center a few days ago (#134605) and never heard a peep, so after 3 days I figured I’d try here.

I’ve been wanting Topaz Studio to be listed in my Photoshop menu (I still use CS6), but it simply won’t using the default install locations. I came across the Topaz Studio Photoshop Utility 1.0.4.zip though, but even that failed to accomplish the task. As it’s a batch file, I examined it & now know why.

One of the early lines sets an environmental variable:

SET studio=C:\Program Files\Topaz Labs\Topaz Studio\PS_Plugins_x64\

… which is NOT where I’ve installed Topaz Studio. I’ve long complained about software that arrogantly installs onto the system drive and I’m certainly not alone in that sentiment.

Continuing though, the bat file only goes up to Ver. 1.4 of Topaz Studio:

:Installer
	CLS
	::Parse components.xml file for version number - reads last <Version> value
    	::setlocal enableextensions disabledelayedexpansion
    	::set "version="
    	::for /f "tokens=3 delims=<>" %%a in (
       :: 'find /i "<Version>" ^< "C:\Program Files\Topaz Labs\Topaz Studio\components.xml"'
    	::) do set "version=%%a"
	
	::Allow user to set versionECHO CHOOSE YOUR PHOTOSHOP TYPE:
	ECHO Please choose the version of Studio you currently have installed:
	ECHO.
	ECHO 1. Topaz Studio 1.0
	ECHO 2. Topaz Studio 1.1
	ECHO 3. Topaz Studio 1.2
	ECHO 4. Topaz Studio 1.3
	ECHO 5. Topaz Studio 1.4

Just today, it updated to ver. 1.6.9.

So, even if I edited it to point to my install folder on D:, I’ve no way to know what else the script is supposed to do.

::Install
	SET SCRIPT="%TMP%\%RANDOM%-Studio-%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
	ECHO fso.GetFile(%psChosen%).Attributes = fso.GetFile(%psChosen%).Attributes - 1 >NUL
	ECHO Set fso = CreateObject("Scripting.FileSystemObject") > NUL
	ECHO Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
	ECHO sLinkFile = "%psChosen%tltopazstudiops_x64.lnk" >> %SCRIPT%
	ECHO Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
	ECHO oLink.TargetPath = "%studio%" >> %SCRIPT%
	ECHO oLink.Save >> %SCRIPT%
	CSCRIPT /nologo %SCRIPT%
	DEL %SCRIPT%
	ECHO Studio plugins installed!
	PAUSE
	CLS
	::Complete

So, what I’d like to request is that the script be corrected so that it requests where Topaz Studio is actually installed rather than assuming it’s on C:, and that it can adapt to newer versions if needed.

Short of that, what else do I need to modify with the the 1.04 bat file in order for it to succeed?

Thanks.

I’m working on updating it today =]

I’ll include the new Studio versions, an option to choose where you installed Topaz Studio, and support for the new “In Studio” updates (Simplify & Glow).

I’ll post here when I get it updated.

Thanks Joe. I really appreciate that.

It’s been many moons since I’ve worked with DOS & batch files. Those synapses are pretty rusty & corroded these days.:grin:

Yea… it’s the lowest friction method to script common file handling things that need to happen. It started out with a few simple commands, and it’s evolved… well… far enough haha.

Batch scripting can be powerful when used appropriately, but it looks like our software has outgrown the battle-tested BAT scripting language. Some of my batch files use temporary VBS script creation and execution, so it can be a bit fancy depending on which .bat you run, but alas, a better solution is needed and will be a goal of mine in 2018. Still working on the custom location piece in the Photoshop Util, but I should have things fixed and working by this evening. I’ll update this thread when it’s uploaded.

Alright, try this one, I just tested it and uploaded it to the page:

https://topazlabs1.zendesk.com/hc/article_attachments/115004193511/Topaz%20Studio%20Photoshop%20Utility%201.0.5.zip

Got further but still having an issue when entering the plug-ins folder locations:

YOU CHOSE: Photoshop Creative Suite 6 Custom Location

Please type your Photoshop CS 6 Plug-ins folder location below:
GOOD EXAMPLE: D:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Plug-ins
BAD EXAMPLE: D:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\

Press any key to continue . . .
Where is Photoshop CS6’s Plug-ins folder?:D:\Programs\AdobeCS6\Adobe Photoshop C
S6 (64 Bit)\Plug-ins
\Plug-ins) was unexpected at this time.

It’s adding another Line Feed and "\Plug-ins" at the end of my entry.

I’m going to try just pointing to the base folder and see if that tricks it, but wanted to let you know asap.

Nope, that didn’t do it. Got:

YOU CHOSE: Photoshop Creative Suite 6 Custom Location

Please type your Photoshop CS 6 Plug-ins folder location below:
GOOD EXAMPLE: D:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Plug-ins
BAD EXAMPLE: D:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\

Press any key to continue . . .
Where is Photoshop CS6’s Plug-ins folder?:D:\Programs\AdobeCS6\Adobe Photoshop C
S6 (64 Bit)
) was unexpected at this time.

======================
Had to try that but maybe this will give you a hint for what’s happening at this step.

Alright – sorry for the problems! I’ll look at it more later today.

That’s fine. No real hurry. Happy to test until it gets iron out.

M.

I’m attempting to get this working. Can you please provide a screenshot showing your Photoshop CS6 Plug-ins folder, in full, in Windows Explorer? That will help me understand what is causing the error. Thanks.

Certainly. Let me know if this gives you enough info.

Topaz Studio is also installed under the D:\Programs folder.

M.

Joe wrote:

Ok, Mark, thanks for providing this info. It looks like you left off the Plug-ins folder. Can you try running the script again, with this path, instead:

D:\Programs\AdobeCS6\Adobe Photoshop CS6 (64 Bit)\Plug-ins\

It looks like you made the “Bad Example” mistake =]

Ah. I will but that example was a 2nd test as it appeared that it was adding a second \Plug-ins\ to the path.

This is what I entered:

… and get this result:

Thought I’d sent you this earlier.

M.

Joe wrote:

Ok, that helped! I think the problem was being caused by my error handling – I stubbornly used ( ), when I should have been using [ ]. Try this one:

[redacted, invalid link]

This should work.

Hey Joe,

Don’t ya just hate syntax issues. Major reason I don’t even try to program or write scripts these days.

Unfortunately still a no go. Thought I’d spotted something so tried it several times.

I’m using a utility (PowerDesk9) to copy a paths to the clipboard as I step through the batch files progress. When I get to this stage I have to “manually” enter the last .

… which I have to do at this stage as well:

However, …

Getting the same result. I looked at the copy & paste of the path in Notepad++ to see if there was some pesky high ascii lurking but it was clean.

M.

Joe wrote:

Good gravy. I’ll take another look at my options and ping you with another version to try. lol sorry!

OK, but no need to be. I can’t go back to work until mid next week anyway so this is at least constructive.

I’ve considered just editing the batch file to remove the decision points & “hard code” the paths to fit my particular situation, but getting this to work for anyone else seems pretty worthwhile.

M.

Joe wrote:

It’s my use of () and [], simply to denote when a path isn’t found. It’s frustrating that it’s preventing the script from running, but that’s my fault.

I removed all the potentially offensive characters, which should fix it. Try this version please:

[redacted, no longer valid link]

I’d like to move away from batch scripts, because they look pretty dated and are difficult to maintain. However, in the meantime, this is what we have to work with until it can be improved in a GUI-wrapped utility.

Same error message as last time.
This zip has the same name as previous. I renamed with and add’l “b” when I d/led, & had it overwrite the previous when I extracted, but want to confirm that it was actually a new version.

M.

Joe wrote:

Yes, it is a newer version. I just don’t understand why it’s failing, now. I’ll take out the error handling for the custom locations, and test it more on my end, and see if I can fix it. I’ll ping you tomorrow!