dtgm Posted April 11, 2016 Report Share Posted April 11, 2016 I want the variables to update and be handed to an external downloader within a preupdate powershell command. {preupdate-url} seems to accomplish this in a batch script, but I want to trigger the same behavior within a powershell script. Anyone know how to do that? Link to comment Share on other sites More sharing options...
dtgm Posted April 12, 2016 Author Report Share Posted April 12, 2016 I think I may need to clarify: 1. Assume a new application with a set variable VAR that is scraping some string from a website with regex. 2. Until the application is updated $app.variables.item("VAR").cachedcontent is empty so I cannot use that in a "Before updating..." posh command. Obviously, this also fails between updates as it will return the previous version value and then update the DB after preupdate command has run so if I then force update then cachedcontent will be correct. 3. So how would I go about getting VAR evaluated for the current version in a "Before updating..." posh command? Link to comment Share on other sites More sharing options...
dtgm Posted April 12, 2016 Author Report Share Posted April 12, 2016 I think I was overthinking it. Solution would be $app.variables.ReplaceAllInString("{VAR}") Link to comment Share on other sites More sharing options...
floele Posted April 12, 2016 Report Share Posted April 12, 2016 Yep, that would be the right way of getting a variable value 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