shawn Posted September 29, 2011 Report Share Posted September 29, 2011 I've been logging my updates to a text file in the "after updating an application" command for something close to as long as I've been using Ketarin. One of my continued issues is that any command that included an ampersand (&) didn't actually take effect. And it's a security risk. I had no idea that the shell had an escape code for ampersands, but I discovered one just tonight and was able to use it in my commands to bypass this problem. YAY! The escape character is a caret (^), and can be used as so: echo {category:replace:&:^&} - {appname:replace:&:^&} {version:replace:&:^&}>updates.txt Link to comment Share on other sites More sharing options...
necrox Posted September 29, 2011 Report Share Posted September 29, 2011 Thanks a lot for this hint! *issuesolved* Link to comment Share on other sites More sharing options...
Tomorrow Posted November 8, 2011 Report Share Posted November 8, 2011 This is awesome.I made a customized version that appends all changelogs to the changelog: echo {f:dd}.{f:MM}.{f:yyyy} : {appname:replace:&:^&} updated to v.{prettyversion:replace:&:^&} - {changelog:replace:&:^&}>>CHANGELOG.txt And after updating all apps add a small separator and open the file on top at the last line: echo ---------------------------------------------->>CHANGELOG.txt "%ProgramFiles(x86)%\Notepad++\notepad++.exe" -alwaysOnTop -n99999 "{Apps x86p}\Ketarin\CHANGELOG.txt" Changelog output looks something like this: 15.02.2011 : [searchLoad Options] updated to v.0.6.3 - Added sv-SE translation.16.02.2011 : [Text Link] updated to v.4.0.2011021601 - Fixed: Migration of preferences was failed if user had custom values. 23.02.2009 : [search on Engine Change] updated to v.1.2 - compatible to Scroll Search Engines (the search is only executed if the active search engine isn't changed within 300ms) 18.11.2009 : [Organize Status Bar] updated to v.0.6.4 - Changed maxversion from 3.6a1pre to 3.6.* ---------------------------------------------- 16.09.2011 : [CheckPlaces] updated to v.2.6.1 - Fixed minor bug when reporting errors 23.08.2011 : [About-Telemetry] updated to v.0.6 - Now with Thunderbird support. Thanks protz! 14.04.2011 : [About-Startup] updated to v.0.1.5 - The about:startup page wasn't displaying any data right after installation until a restart. 11.06.2010 : [bBCodeXtra] updated to v.0.3.2 - Fixed "color " command, added back "he" locale. ---------------------------------------------- If i could only figure out how to open the file after all app updates ONLY if something was written there.If no updates then no separator added there and no opening it either.Any ideas on this? Link to comment Share on other sites More sharing options...
Omniferum Posted November 8, 2011 Report Share Posted November 8, 2011 If the log file is only generated after 'all updates are completed' then just add an extra line so that if something gets written an extra file gets created as well Then just if exist change.txt c:\program.exe del change.txt Should be the easiest solution As to detect for 'appending' couldn't you just dump two files into a variable then compare them? for /f "tokens=*" %a in ('type log.txt') do set log=%a for /f "tokens=*" %a in ('type {changelog}') do set change=%a if "%log%" EQU "%change%" exit 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