Jump to content
Ketarin forum

Pipe system variable value into Ketarin variable?


Tomorrow
 Share

Recommended Posts

Like the title says.Let's assume i have commandline that gets value from a text file (let's assume the text file only contains "1.0") and then sets temporary variable based on that:

set /p myvar= < %temp%\myvar.txt

So i have %myvar% and when i enter it it translates into 1.0 but now i need to insert it into {version} variable in Ketarin.

 

Is it possible?

I tried

{version} < %temp%\myvar.txt

and

{version} < %myvar%

But no luck.

I assume the {version} variable itself has to be textual.

Link to comment
Share on other sites

Basicly i have a script that gets the app version number from the installer and then renames that file with this version number.

This is very useful for apps that do not supply up-to-date version numbers anywhere exept the executable itself.

 

For example µTorrent with correct Build number.When a new version comes good luck finding a website that lists the build number correctly (FileHippo alternates between stable/beta buildnumbers so it does now count).

 

It does require a small app from sysinternals: http://technet.microsoft.com/en-us/sysinternals/bb897441.aspx

Although i also have a .vbs script that does this without any 3rd party plugins but the sigcheck method is faster and easier to manage.

 

This is the current command:

sigcheck -n -q "{Apps x86}\uTorrent *.exe" > %temp%\Version.txt
set /p FileVersion= < %temp%\Version.txt
cd /D "{Apps x86}"
ren "uTorrent *.exe" "uTorrent v.%FileVersion%.exe"

 

As you can see i can succesfully rename the executable but due to this limitation, there is no way to let Ketarin know the new file path and so Ketarin "loses" the file.Next download will be again downloaded alongside while keeping the old and all setup commands brake and setra-yada :rolleyes:

 

Basicly the idea was to insert a new value into Ketarin's textual variable so it would always see the exe despite any namechanges.

Link to comment
Share on other sites

  • 2 weeks later...

How about going about it another way? Instead of renaming them inline, use the "after updating an app" option to export the current path to a list file which, when you're done, simply lists all files that require updating their names. Then, "after updating all apps" you run a batch or other script that then performs all of the actions for each file within the list and deletes the list file. Should be pretty simple, and the batch script will have access to pipes and what-not.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.