DDK
DDK

Reputation: 1038

Batch file for displaying version of Zend Gaurd

I am trying to write a batch file to display the license information of the Zend gaurd.

Below is what I came up with the below batch file

set _ver_cmd=zendenc_sign.bat --version
for /F "skip=1" %%G in '%_ver_cmd%' do echo %%G

But when I run it, I get the below error

C:\Program Files\Zend\Zend Guard - 5.5.0\bin>set _ver_cmd=zendenc_sign.bat --version
'zendenc_sign.bat was unexpected at this time.

Update:

Zend Gaurd is a product to prevent reverse engineering of code. zendenc_sign.bat --version command is used to display the full version details. I need to display only the licence information which is displayed in the second line.

Upvotes: 0

Views: 76

Answers (2)

David Candy
David Candy

Reputation: 743

There is nothing legal about anything you've written. You need to say what is a Zend gaurd and what steps are required to get it's version.

set _ver_cmd=zendenc_sign.bat --version Your line works fine on my computer as it should. If you are using notepad copy the text into wordpad then copy it back to notepad (notpad sticks extra CRs into text). But WHY are you doing this?

Now I see what you are trying to do. This gets second line of the vol command (as I don't have your program).

for /f "skip=1 tokens=1* delims=" %%A in ('vol') do echo %%A

So for you

for /f "skip=1 tokens=1* delims=" %%A in ('zendenc_sign.bat --version') do echo %%A

And I hope that this batch file we are writing is NOT called zendenc_sign.bat.

Upvotes: 0

David Candy
David Candy

Reputation: 743

There is nothing legal about anything you've written. You need to say what is a Zend gaurd and what steps are required to get it's version.

Upvotes: 0

Related Questions