/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


I have my question regarding App-v 5.0 SpX script execution (Powershell).

10/29/2015 2235 views
I have created .ps1(powershell) script to copy the files to %userprofile%. that is tested and working fine in os. when we are publishing the app-v package included with ps1 script.the script is running fine. but i didn't able to see the file any where. more over could you please help me to ans the below queries. 1) Diff b\w (PublishPackage) and (AddPackage). when the scripts will execute if we add the two locations? 2)Where can we see the userprofile date which was copied with the help of any scripts(vbs,ps1,cmd,bat..etc) Much thanks in advance..
0 Comments   [ + ] Show comments

Comments



Community Chosen Answer

1

1. AddPackage - When the script is placed in Addpackage script type, it gets executed when the App-V package is added or registered to the machine. It gets executed when running the below command.

Add-AppvClientPackage "name" -DynamicDeploymentConfiguration "path to the deploymentconfig.xml"

PublishPackage - The script gets executed when the package is being published to the machine during Publish-AppvClientPackage event.

deploymentconfig.xml file can be used along with the Add-AppvClientPackage only. Userconfig.xml can be used along with Publish-AppvClientPackage only.If package is being published global using -global, Userconfig.xml cannot be used only deploymentconfig.xml can be used.

2.And coming to  script to copy the files to %userprofile%, I guess you would have kept the script to run in systemcontext(machineconfiguration in DeploymentConfig.xml) that's what it has failed. Keep it in the Userconfiguration (Sourcesection)- Publishpackage (script type) section inside the DeploymentConfig.xml. This would run the script in user context so that %userprofile% entries are populated.

NOTE: If you keep script in UserConfiguration section, then it should be tested only in domain joined machines. It will not work in local account.


Answered 10/29/2015 by: apptopack
Red Belt

All Answers

0
You can use powershell to check for the updated userprofile files. Sample scripts are available in Technet gallery.
Answered 11/02/2015 by: apptopack
Red Belt

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ