locked
Sequence an appliation which update once a week RRS feed

  • Question

  • Greeting,

    what is the best way (sequencing) an application which update once a week (not only data, application itself as well)

    Thanks

    userausera

    Friday, July 3, 2015 4:55 PM

Answers

  • Do a scripted package.  I have an application that is updated twice a week and I've setup a script that will auto-create a new package for me:

    import-module appvsequencer
    
    $Date = Get-Date
    $Year = $Date.Year
    $Month = $Date.Month
    $Day = $Date.Day
    
    $packageName = "MediSolutions_Phantim_7_Test_$Year`_$Month`_$Day`_x86"
    $path =  "$env:USERPROFILE\Desktop\$packageName"
    mkdir $path
    
    New-AppvSequencerPackage -Name $packageName  -TemplateFilePath "D:\Template.appvt" -path $path -Installer "D:\Phantim\install-PhantimTest.cmd" -FullLoad
    

    the install is actually just a file copy but they can update their files on a file share and whenever I need a new package I just logon to my sequencer and run this script.

    Monday, July 6, 2015 4:35 PM
  •   "Create a batch file with the requirement and make it as a shortcut instead of pointing the special.exe. Use this batch file shortcut while sequencing. Or else place the script to run in Start Process in the config.xml."

    Just that... package your application with a shortcut to special.exe (and ofc default content of special.ini in the package), do not save the package but continue working... add changespecialini.exe in the ./Scripts folder, and save your package.
    If you're done, copy your user-config.xml (as backup). And add a "StartVE" script to it like:
    <UserScript>
     <StartVirtualEnvironment RunInVirtualEnvironment="true">
      <Path>changespecialini.exe</Path>
      <Arguments></Arguments>
      <Wait RollbackOnError="true" Timeout="60" />
     </StartVirtualEnvironment>
    </UserScript>
    
    
    Deploy the package, together with the customized user-config.xml.
    The next time the user starts special.exe (through the published shortcut), changespecialini.exe will start first, will perform it's thing, and if successful, will start special.exe

    • Marked as answer by userausera Monday, August 3, 2015 11:53 PM
    Monday, August 3, 2015 10:40 PM
  • I had a similar issue at a previous company. We had an in house app that was updated weekly if not more. What I ended up doing in order to better manage the users with rollback and such was build a new application each time with a date stamp for version. This way I could migrate users back and forth with simple instructions as to use the shortcut with todays date or rollback to the previous date. I also scripted the build and deployment so my life was much easier with a custom script I wrote I could build the application from 1 of our four environments and deploy it. It took me a some time to build the delivery mechanism, but it was worth it to me for the time savings it provided. In that situation I found it worked better that way. I'm sure that method is not right for everyone. There are many ways to handle. It is just about finding the right method for your situation.
    Monday, July 6, 2015 4:26 PM
  • Do you really want your users to be up to the date with the updates? If not, Disable the Updates Feature & upgrade your AppV Package only if a major change/ functionality has been added with the update.

    The idea of sequencing an application which updates once a week itself is a bad idea as you have to re-sequence/Upgrade the application once a week.

    If you have any idea on what files or if there is only a particular folder which gets updated then see if you can use Folder Redirection or kind of.


    Friday, July 3, 2015 6:08 PM

All replies

  • Do you really want your users to be up to the date with the updates? If not, Disable the Updates Feature & upgrade your AppV Package only if a major change/ functionality has been added with the update.

    The idea of sequencing an application which updates once a week itself is a bad idea as you have to re-sequence/Upgrade the application once a week.

    If you have any idea on what files or if there is only a particular folder which gets updated then see if you can use Folder Redirection or kind of.


    Friday, July 3, 2015 6:08 PM
  • I had a similar issue at a previous company. We had an in house app that was updated weekly if not more. What I ended up doing in order to better manage the users with rollback and such was build a new application each time with a date stamp for version. This way I could migrate users back and forth with simple instructions as to use the shortcut with todays date or rollback to the previous date. I also scripted the build and deployment so my life was much easier with a custom script I wrote I could build the application from 1 of our four environments and deploy it. It took me a some time to build the delivery mechanism, but it was worth it to me for the time savings it provided. In that situation I found it worked better that way. I'm sure that method is not right for everyone. There are many ways to handle. It is just about finding the right method for your situation.
    Monday, July 6, 2015 4:26 PM
  • Do a scripted package.  I have an application that is updated twice a week and I've setup a script that will auto-create a new package for me:

    import-module appvsequencer
    
    $Date = Get-Date
    $Year = $Date.Year
    $Month = $Date.Month
    $Day = $Date.Day
    
    $packageName = "MediSolutions_Phantim_7_Test_$Year`_$Month`_$Day`_x86"
    $path =  "$env:USERPROFILE\Desktop\$packageName"
    mkdir $path
    
    New-AppvSequencerPackage -Name $packageName  -TemplateFilePath "D:\Template.appvt" -path $path -Installer "D:\Phantim\install-PhantimTest.cmd" -FullLoad
    

    the install is actually just a file copy but they can update their files on a file share and whenever I need a new package I just logon to my sequencer and run this script.

    Monday, July 6, 2015 4:35 PM
  • Greeting,


    I have a "SPECIAL": it installed to c:\program files\"SPECIAL", only special is, there is a "SPECIAL.ini" file there, information in it is today's date. when the  "SPECIAL.exe" Startup, it change the content to today's date. then the application startup.

    My question is how can I sequence it that allow users to change it in the Remote Desktop environment.

    Thanks

    userausera

    Monday, July 6, 2015 9:24 PM
  • Do you mean you want the users to edit the SPECIAL.ini file which will be inside the virtual bubble?

    What version of APP-V you are using?


    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Tuesday, July 7, 2015 8:57 AM
  • thanks for reply

    app-v V5.0 sp3

    Tuesday, July 7, 2015 12:56 PM
  • As you are on SP3, you can create a default sequence, at "Customization" choose for "Customize", next, continue, next and on the tab "Advanced" check "Allow virtual applications full write permissions to the virtual file system" and save your package.
    Friday, July 10, 2015 2:03 PM
  • thanks very much!, I little bit more, as my question:

    I have a "SPECIAL": it installed to c:\program files\"SPECIAL", only special is, there is a "SPECIAL.ini" file there, information in it is today's date. when the  "SPECIAL.exe" Startup, it change the content to today's date. then the application startup.

    how can I change change the "SPECIAL.ini" file befroe "SPECIAL.exe" Startup?

    thanks

    newbie in app-v

    Friday, July 10, 2015 9:09 PM
  • What to you want to accomplish? Do you want to manipulate the content of the ini-file eacht time the app starts?

    If you want to when that exe starts, create a StartProcess scipt (in the user-config), set it to run inside the virtual environment, use a vbs or powershell-script.

    Check out this article for instance about scripting.

    Sunday, July 12, 2015 10:47 PM
  • You mean , you like to change the contents inside the SPECIAL.ini file rather than SPECIAL.exe??

    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Monday, July 13, 2015 3:37 AM
  • Yes, I like to change the contents inside the SPECIAL.ini FIRST, then launch SPECIAL.exe

    usera

    Tuesday, July 14, 2015 1:46 PM
  • Thanks for reply,

    will try that

    Usera

    newbie in app-v

    Tuesday, July 14, 2015 1:52 PM
  • Could you please have a link for the step by step about this? sorry and thanks, Just a newbie in appv
    Tuesday, July 14, 2015 1:58 PM
  • Write a vbs or PS for changing the contents inside the SPECIAL.ini and add it to the config.xml file

    The following link might help you.

    http://blogs.technet.com/b/appv/archive/2012/12/10/scripting-and-embedded-scripting-for-appv-5-0-dynamic-deployment-and-user-configuration-scripting.aspx


    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Tuesday, July 14, 2015 2:21 PM
  • Thanks Vigneshwaran,

    what happen if I need to use another to change the file "SPECIAL.ini". let me explain that:

    On Normal workstation. Once SPECIAL installed. user will launch c:\program files\SPECIAL\SPECIAL.exe to use it.

    Right now, I created a utility "changespecialini.exe" ( for change Special.ini). and put it to "c:\program files\SPECIAL"

    User instead of directly to launch the "c:\program files\SPECIAL\SPECIAL.EXE". it will launch a Batch file, content like below:

    c:\program files\SPECIAL\changespecialini.exe

    c:\program files\SPECIAL\SPECIAL.exe

    how can I do that. the point is an EXE file not vbs or PS.

    thanks

    usera

    Wednesday, July 15, 2015 3:19 PM
  • Create a batch file with the requirement and make it as a shortcut instead of pointing the special.exe. Use this batch file shortcut while sequencing. Or else place the script to run in Start Process in the config.xml.

    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Thursday, July 16, 2015 5:30 AM
  • It's not a best practice to sequence apps that require auto-updates.

    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Thursday, July 16, 2015 5:36 AM
  • Thanks for the information., Could you please little bit detail for this step.

    thanks

    usera

    newbie in appv

    Monday, July 20, 2015 5:08 PM
  • any links for how to do this? step by step?

    Thanks

    usera

    Newbie in appv

    Thursday, July 30, 2015 7:30 PM
  • To which question, you need link? 

    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Friday, July 31, 2015 4:15 AM
  • thanks for help, just how (where) to put the script.

      "I like to change the contents inside the SPECIAL.ini FIRST, then launch SPECIAL.exe"


      "Create a batch file with the requirement and make it as a shortcut instead of pointing the special.exe. Use this batch file shortcut while sequencing. Or else place the script to run in Start Process in the config.xml."

    Thanks

    usera

    newbie in app-v

    Monday, August 3, 2015 9:53 PM
  •   "Create a batch file with the requirement and make it as a shortcut instead of pointing the special.exe. Use this batch file shortcut while sequencing. Or else place the script to run in Start Process in the config.xml."

    Just that... package your application with a shortcut to special.exe (and ofc default content of special.ini in the package), do not save the package but continue working... add changespecialini.exe in the ./Scripts folder, and save your package.
    If you're done, copy your user-config.xml (as backup). And add a "StartVE" script to it like:
    <UserScript>
     <StartVirtualEnvironment RunInVirtualEnvironment="true">
      <Path>changespecialini.exe</Path>
      <Arguments></Arguments>
      <Wait RollbackOnError="true" Timeout="60" />
     </StartVirtualEnvironment>
    </UserScript>
    
    
    Deploy the package, together with the customized user-config.xml.
    The next time the user starts special.exe (through the published shortcut), changespecialini.exe will start first, will perform it's thing, and if successful, will start special.exe

    • Marked as answer by userausera Monday, August 3, 2015 11:53 PM
    Monday, August 3, 2015 10:40 PM
  • thanks for the help. I am use V5.0 SP3, may I have a screen shot for ./Scripts folder?

    thanks

    usera

    Monday, August 3, 2015 11:55 PM

  • (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Tuesday, August 4, 2015 4:49 AM
  • Thanks

    Tuesday, August 4, 2015 5:34 AM
  • I opened user-config.xml, there are already some information there

    <!-- User Scripts Example - customize and uncomment to use user scripts -->
    <!-- <UserScripts> <StartProcess RunInVirtualEnvironment="true"> <Path>VFS\ProgramFilesX86\App\dosomething.exe</Path> <Arguments>-WithArgs</Arguments> <Wait RollbackOnError="true"/> <ApplicationId>[{AppVPackageRoot}]\Contoso\ContosoApp.EXE</ApplicationId> </StartProcess> <ExitProcess> <Path>VFS\ProgramFilesX86\App\UnDoSomething.exe</Path> <Arguments>-WithArgs</Arguments> <Wait RollbackOnError="false"/> <ApplicationId>[{AppVPackageRoot}]\Contoso\ContosoApp.EXE</ApplicationId> </ExitProcess> <StartVirtualEnvironment RunInVirtualEnvironment="true"> <Path>[{AppVPackageRoot}]\VFS\ProgramFilesX86\App\DoSomething.exe</Path> <Arguments>-WithArgs</Arguments> <Wait RollbackOnError="true"/> </StartVirtualEnvironment> <TerminateVirtualEnvironment> <Path>[{AppVPackageRoot}]\VFS\ProgramFilesX86\App\UnDoSomething.exe</Path> <Arguments>-WithArgs</Arguments> <Wait RollbackOnError="false"/> </TerminateVirtualEnvironment> <PublishPackage> <Path>\\server\share\foobar.exe</Path> <Arguments>-WithArgs</Arguments> <Wait RollbackOnError="true" Timeout="30"/> </PublishPackage> <UnpublishPackage> <Path>\\server\share\barfoo.exe</Path> <Arguments>-WithArgs</Arguments> <Wait RollbackOnError="false" Timeout="30"/> </UnpublishPackage> </UserScripts> -->

    should I just replace this part as your script?

    usera

    Tuesday, August 4, 2015 2:05 PM
  • No, Use ACE tool available HERE.

    Download & Install it in your Machine.

    Launch ACE Program

    Choose Open available on the top right corner & Browser your XML.

    Then you can choose options such as When, Path, Arguments & save your Package .

    While Adding use -DynamicDeploymentConfiguration <Path of XML>.

    Tuesday, August 4, 2015 2:18 PM
  • hi Vinodreddy597,

    downloaded and installed

    may I have a little bit details? " top right corner & Browser your XML."

    thanks

    usera


    • Edited by userausera Tuesday, August 4, 2015 4:04 PM
    Tuesday, August 4, 2015 4:04 PM
  • I can make sure that the .ini file did not change. "c:\program file\special\special.ini"

    will be possible in the normal environment, that need "run as administrator" ? if yes, then How can I dealing with it?


    by the way, I am using process monitor on appvClient machine, I can see special.exe is running but never see "changespecialini.exe" is running there
    • Edited by userausera Tuesday, August 4, 2015 5:26 PM
    Tuesday, August 4, 2015 5:03 PM
  • Check your appv eventlog, and confirm the script has executed.
    Also keep in mind, running scripts is disabled by default, so you have to enable it.
    This can be done through GPO, but also with the following PoSh command (as admin):

    Set-AppvClientConfiguration -EnablePackageScripts $true

    Tuesday, August 4, 2015 6:29 PM
  • thanks,

    But I don't think this is the issue, bekow is the result from the app-v client machine

    on the app-v Client machine, which log I can check? for " confirm the script has executed"

    thanks


    • Edited by userausera Tuesday, August 4, 2015 6:51 PM
    Tuesday, August 4, 2015 6:36 PM
  • The windows evenlog... have a look here:

    In the Operation log you should find some log about running the script. Also have a look ad the Admin log for errors.
    Have a look here about howto troubleshoot.

    Tuesday, August 4, 2015 7:15 PM
  • Thanks, I guess all in the app-v Client right?
    Tuesday, August 4, 2015 7:41 PM
  • The windows eventlog (eventvwr) on the client running the appv packages you are facing the issue on.
    Tuesday, August 4, 2015 7:44 PM
  • Operation log no log for script

    admin log clean


    • Edited by userausera Tuesday, August 4, 2015 9:25 PM
    Tuesday, August 4, 2015 8:47 PM
  • is this way works?

    <UserScript>
     <StartVirtualEnvironment RunInVirtualEnvironment="true">
      <Path>changespecialini.exe</Path>
      <Arguments></Arguments>
      <Wait RollbackOnError="true" Timeout="60" />
     </StartVirtualEnvironment>
    </UserScript>
    

    should I change to cmd /c .... instead of?

    Tuesday, August 4, 2015 9:12 PM
  • If your log does not show anything, there's something wrong.
    Did you apply the userconfig.xml?
    Though powershell:

    Add-AppVClientPackage "path\to\appvpackage.appv" | Publish-AppVClientPackage –DynamicUserConfigurationPath "path\to\userconfig.xml"

    If you use appv infra, you can also configure this though the console. Next to the AD-group, chose "custom", and omport the xml-file there.

    Tuesday, August 4, 2015 9:58 PM
  • direct change the "user-config.xml" is not enough?
    Tuesday, August 4, 2015 10:35 PM
  • No, it must be applied to the client.
    Tuesday, August 4, 2015 11:03 PM
  • thanks, will try and let you know

    userausera

    newbie in app-v

    Tuesday, August 4, 2015 11:32 PM
  • Hi Tiberivs,

    I used console, the select the application, select edit the default configuration (App-V V5.0 SP3), then select "Import and Overwrite this configuration", select the NEW userconfig.xml file, select "overwrite" after asked for confirm owerwrite, then I got error, "the configuration file did not contain well formed app v configuration xml"

    in eventlog got "An error was encountered parsing dynamic configuration file '0'."

    why?

    add:

    I went to the appvclient machine used command as below,

    Publish-AppvClientPackage -Name Special -DynamicUserConfigurationPath \\aio\Appv5-Store\Special\Special_userconfig_1.xml -Verbose

      (Special is the app name, \\aio\Appv5-Store\ is the app-v(ed) app store, and Special_userconfig_1.xml is the file I made changes, same I try to import to the console)

    guess what? it works.

    BUT I do not want to do that on the Appv client part.

    Please help


    • Edited by userausera Thursday, August 6, 2015 8:19 PM
    Thursday, August 6, 2015 7:02 PM
  • In the header of the config.xml file add encoding and IgnorableNamespaces check.

    eg:

    Before: <?xml version=”1.0″?><DeploymentConfiguration PackageId=”84exxxx-5ccc-x8b1-a81a-fd7xx786xx″ DisplayName=”test” xmlns=”http://schemas.microsoft.com/appv/2010/deploymentconfiguration>

    After:<?xml version=”1.0″ encoding=”utf-8″?><DeploymentConfiguration PackageId=”84exxxx-5ccc-x8b1-a81a-fd7xx786xx″ DisplayName=”test” xmlns=”http://schemas.microsoft.com/appv/2010/deploymentconfigurationIgnorableNamespaces=””>

    If these are already present then skip it.

    Also if there are any comments section in the xml, try removing them and then import.

    Sometimes App-V Server console considers comments as an invalid syntax.


    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )


    Friday, August 7, 2015 4:04 AM
  • Yes, its quite normal. The xml file will work normally with powershell, but not with App-V Server console sometimes as it treats the comments as syntax error. (As per my findings and other MVP suggestions)

    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Friday, August 7, 2015 5:56 PM
  • I am little bit confuse, the file I edited and imported is: "APPLICATION_userconfig.xml" it has content

    xmlns="http://schemas.microsoft.com/appv/2010/userconfiguration"

    but in your example, the content is

    xmlns=”http://schemas.microsoft.com/appv/2010/deploymentconfiguration"

    it is like the file is "APPLICATION_Deploymentconfig.xml"

    did I edit the wrong file?

    thanks

    if it should be "APPLICATION_userconfig.xm"

    then , I had  encoding=”utf-8″

              I had IgnorableNamespaces=””>

    I do not have any comments. On console, Try to import it, still the same error message.

    Friday, August 7, 2015 10:05 PM
  • Do not edit the xmlns. Leave as it is xmlns="http://schemas.microsoft.com/appv/2010/userconfiguration"

    could you post your edited config file.

    Also check this link. It gives you a clear picture about the root causes.

    http://www.ingmarverheij.com/microsoft-app-v-dynamic-configurations-res-workspace-manager/

    Hope this helps further!!


    (Please click on "Vote as Helpful" and/or "Mark as Answer", if it has helped you. )

    Saturday, August 8, 2015 9:43 AM
  • Sorry, I am not clear the question,

    the question is: I need to change file

    APPLICATION_Deploymentconfig.xml

               or

    APPLICATION_userconfig.xml

    userausera

    Saturday, August 8, 2015 6:00 PM