Tomorrow Posted August 9, 2011 Report Share Posted August 9, 2011 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 More sharing options...
floele Posted August 14, 2011 Report Share Posted August 14, 2011 No, of course that's not possible at the moment. Did not code that much magic into Ketarin Link to comment Share on other sites More sharing options...
Tomorrow Posted August 14, 2011 Author Report Share Posted August 14, 2011 Ah well nothing broken, but would be nice someday. Link to comment Share on other sites More sharing options...
Omniferum Posted August 14, 2011 Report Share Posted August 14, 2011 I have no idea why you'd want this in the first place really I mean what would be the usage for this? Link to comment Share on other sites More sharing options...
Tomorrow Posted August 14, 2011 Author Report Share Posted August 14, 2011 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 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 More sharing options...
shawn Posted August 25, 2011 Report Share Posted August 25, 2011 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 More sharing options...
shawn Posted August 25, 2011 Report Share Posted August 25, 2011 Oh, and for updating the filename in Ketarin, just manipulate the database directly using sqlite. That's probably a lot easier than lying to Ketarin about the name so it stores it correctly via the interface. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now