jusseppe Posted June 26, 2016 Report Share Posted June 26, 2016 Hello everybody, I don't find anyone saying anything about the possibility to have a custom column that shows you right away a comparison between the version of the applications you have on your HDD and the new one that has been verified by Ketarin. Something like the screenshot in the attachment. Am I missinf something or is it seen as a non-relevant feature? Link to comment Share on other sites More sharing options...
MAPJe71 Posted June 26, 2016 Report Share Posted June 26, 2016 I was more thinking of having three version columns: "installed" "stored/archived" i.e. downloaded and stored on disk "latest" available for download Link to comment Share on other sites More sharing options...
shawn Posted June 28, 2016 Report Share Posted June 28, 2016 There's a demonstration of this here. And there's now a post that demonstrates other nifty stuff you can do with PowerShell here and details for powershell access to custom variables here. These two things together can accomplish just about anything you might want for current or previous downloads. Link to comment Share on other sites More sharing options...
jusseppe Posted July 3, 2016 Author Report Share Posted July 3, 2016 wouldn't it be possible to simply store the "version" variable which is the last version you downloaded in the "oldversion" variable? eg. string oldversion = version; /* This stores the "old" version (based on last download) into the Website field */ app.WebsiteUrl = oldversion; where version would be the variable (and default column) you use to define the latest version available by parsing the download sites? I tried it like that but for some reason it seems not to be working... Link to comment Share on other sites More sharing options...
Ambimind Posted July 5, 2016 Report Share Posted July 5, 2016 Hi jusseppe, I attempted a solution you can find below. It works, however there are various corner-cases that can confuse it. I made attempts to anticipate and avoid those confusions(I excluded them from what follows), however I could not do it to my satisfaction. The life-cycle of Ketarin url-variables makes this difficult, specifically : 1. Url-variables are updated first, and provided as such to both pre and post download commands(without access to the previous) 2. Regular-expression-url-variables, will not update at all, unless explicitly used within a job or column. 3. Url-variables will update their values, even if no file is download. There are work-arounds, but they are limiting. The Powershell script : #PARAMETERS# $pv : Name of Ketarin variable that will display previous version.# $cv: Name of the Ketarin variable that will display current version.##ASSUMPTIONS# 1.That the job has a urlVariable dedicated to displaying the previous version number.# 1.That the job has a urlVariable dedicated to displaying the current version number.# 2.Script will be run AFTER the download is complete.# 3.That $pv is a Textual Content variable.##NOTES# 1.The script uses the "postData" property of $pv.# 2.Job will begin showing previous version on the second update.# 3.There are a series of corner cases not accounted for.# 3.1.For example, when an update occurs, without file download# 4. The script is independant of file names, # VARIABLES## Parameters$pv = "previous"$cv = "version"## Previous Variable Property Values$pvPostData = $app.variables.$pv.postData$pvContent = $app.variables.$pv.TextualContent# # Get the type of url-variable used for the current version$cvType = $app.variables.$cv.VariableType# Based on type(3 possible), determine the property name that holds the value $pnm = if($cvType -eq "Textual"){"TextualContent"}Else{"CachedContent"}# Use it to get the current value(from this cycle)$cvContent = $app.variables.$cv.$pnm # MAIN## 1. Copy postData(stored last cycle) to content of previous version variable$app.variables.$pv.TextualContent = $pvPostData# 2. Copy content of current version variable(stored this cycle) to postData property of $pv$app.variables.$pv.postData = $cvContent Link to comment Share on other sites More sharing options...
jusseppe Posted July 6, 2016 Author Report Share Posted July 6, 2016 thanks for trying, I tried to paste your code in the Commands box of the 7-Zip profile and setting it to "Powershell script" but I must be missing something (maybe in your assumptions). I thought it would've been much easier to implemenet such a functionality in Ketarin. I guess we'll have to wait for an official inclusion of such a function. thanks for your effort though! Link to comment Share on other sites More sharing options...
Ambimind Posted July 7, 2016 Report Share Posted July 7, 2016 thanks for trying, I tried to paste your code in the Commands box of the 7-Zip profile and setting it to "Powershell script" but I must be missing something (maybe in your assumptions). I thought it would've been much easier to implemenet such a functionality in Ketarin. I guess we'll have to wait for an official inclusion of such a function. thanks for your effort though! Installing the script : 1. Paste into "[...] after downloading" command input and set to "Powershell script" 2. Within the job create two url variables: A. One which will automatically get the current version(eg. A regular expression variable) B. And another, a "Textual content" variable, which will be managed by the script. 3. Within the script set the parameters : $cv to the name you used for (A) and $pv to (B). Set the variables under the "Paramters" comment, only. Not every where you see $cv/$pv. 4. Create custom columns which reference the names of (A) and (B) 5. Make those columns visible in the job list(usually this is automatic). Note : After installation, the previous($pv) variable and column will not be filled until the second update of the job/app. Thus it may seem like it is not working. Every update, after the second, will be visible. Link to comment Share on other sites More sharing options...
jusseppe Posted July 8, 2016 Author Report Share Posted July 8, 2016 I tried to run the script but I'm getting a System.Management.Automation not found error. I installed the Windows Management Framework 3.0 (Windows6.1-KB2506143-x64.msu) as suggested here: http://blogs.msmvps.com/vstsblog/2014/02/14/build-fails-with-missing-file-system-management-automation-dll/ but I still get this error once the download is complete (see attachment). Are there any prerequisites to use your Powershell code? Link to comment Share on other sites More sharing options...
floele Posted August 6, 2016 Report Share Posted August 6, 2016 Try using the current beta (https://ketarin.org/forum/topic/3922-ketarin-186-b2/) or download the most recent version of PowerShell. Link to comment Share on other sites More sharing options...
Ambimind Posted August 11, 2016 Report Share Posted August 11, 2016 I tried to run the script but I'm getting a System.Management.Automation not found error. I installed the Windows Management Framework 3.0 (Windows6.1-KB2506143-x64.msu) as suggested here: http://blogs.msmvps.com/vstsblog/2014/02/14/build-fails-with-missing-file-system-management-automation-dll/ but I still get this error once the download is complete (see attachment). Are there any prerequisites to use your Powershell code? Install Powershell 5 : https://www.microsoft.com/en-us/download/details.aspx?id=50395 Using (1.8.6 b2/1.8.6.600) At least that's how I managed to resolve it after recently re-installing windows 8.1 on my dev computer. Link to comment Share on other sites More sharing options...
jusseppe Posted August 20, 2016 Author Report Share Posted August 20, 2016 now it's working thanks! the only problem now is the coexistence with other post-download commands such as extraction, eg. "C:\Program Files\WinRAR\winrar.exe" x -ac -ibck -o+ "{file}" "D:\Soft\Audio & Video\Audio Editing\TagScanner\" since there is space for only one command, either I have one or I have the other right? Link to comment Share on other sites More sharing options...
jusseppe Posted August 28, 2016 Author Report Share Posted August 28, 2016 I've solved this by pasting your script in the global command after updating an application. Once and for all! So now I can manage individual scripts for downloaded applications (like extraction!) thank you for your precious help! Link to comment Share on other sites More sharing options...
jusseppe Posted September 21, 2016 Author Report Share Posted September 21, 2016 the only downside is that you have to update your programs twice, this means you have to download them two times everytime... Link to comment Share on other sites More sharing options...
jusseppe Posted September 21, 2018 Author Report Share Posted September 21, 2018 Hello everybody, do you think it is possible to optimize the script so that you don't have to update (which means force redownload) each item 2 or 3 times in a row? or it's a technical limitation that cannot be solved at the moment? Also: is it possible to download files from links protected with authentication (login and password)? thank you Link to comment Share on other sites More sharing options...
shawn Posted October 9, 2018 Report Share Posted October 9, 2018 There are several examples on the forum of downloading with post authentication or via authentication proxy. I'm not seeing the behavior you describe where, after the first cycle of collecting the old version, it would require 2 or more cycles to correctly assign values. Link to comment Share on other sites More sharing options...
jusseppe Posted October 16, 2018 Author Report Share Posted October 16, 2018 hmm.. it happens everytime to me, just like Ambimind said in his topic. Before I get to see the updated value, I have to force redownload the updated version two times for evey item that has a new update before the updated values are correctly shown. On 7/8/2016 at 12:34 AM, Ambimind said: Installing the script : 1. Paste into "[...] after downloading" command input and set to "Powershell script" 2. Within the job create two url variables: A. One which will automatically get the current version(eg. A regular expression variable) B. And another, a "Textual content" variable, which will be managed by the script. 3. Within the script set the parameters : $cv to the name you used for (A) and $pv to (B). Set the variables under the "Paramters" comment, only. Not every where you see $cv/$pv. 4. Create custom columns which reference the names of (A) and (B) 5. Make those columns visible in the job list(usually this is automatic). Note : After installation, the previous($pv) variable and column will not be filled until the second update of the job/app. Thus it may seem like it is not working. Every update, after the second, will be visible. Link to comment Share on other sites More sharing options...
jusseppe Posted October 20, 2018 Author Report Share Posted October 20, 2018 On 10/9/2018 at 7:01 AM, shawn said: There are several examples on the forum of downloading with post authentication or via authentication proxy. Sorry, I couldn't find examples of server authentication in the forum... Link to comment Share on other sites More sharing options...
shawn Posted October 20, 2018 Report Share Posted October 20, 2018 Try this one: 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