locked
App-V 5 and scripts RRS feed

  • Question

  • Hi,

    Anyone who has tried to use scripts in App-V 5?

    I have a strange issue. I have tried a simple bat/vbs file and applied this to a package. I have inserted a <UserScripts><Startprocess> or <UserScripts><StartVirtualEnvironment>  between the <UserConfiguration></UserConfiguration> part.

    BUT,

    Example 1:

    appData = sh.ExpandEnvironmentStrings("%AppData%")
    WScript.Echo appData

    Will return "C:\Windows\system32\config\systemprofile\AppData\Roaming"

    Example 2:

    UserName = ObjShell.ExpandEnvironmentStrings("%username%")
    wscript.echo UserName

    Will return my Computers name.

    So it seems like the scripts aren't runned as the user. But if I look in the taskmanager, the script seems to run as the user...

    Any input?

    /Daniel

    Thursday, November 29, 2012 11:21 AM

Answers

All replies

  • Hello,

    Yes, I can repeat the behavior. I suggest you open a call with Microsoft.

    Nicke Källén | The Knack| Twitter: @Znackattack

    Thursday, November 29, 2012 12:10 PM
  • Where are you putting this? In the Deployment Config? Or in the Dynamic user Config?
    Deployment configuration also has a UserConfiguration element in addition to MachineConfiguration. Yet  we need this to be under the user's context. If this is Dynamic User config and it is still happening, I would definitely open a call.

    Steve Thomas, Senior Consultant, Microsoft

    App-V/MED-V/SCVMM/Server App-V/MDOP/AppCompat

    http://blogs.technet.com/gladiatormsft/
    The App-V Team blog: http://blogs.technet.com/appv/
    The MED-V Team Blog: http://blogs.technet.com/medv
    The SCVMM Team blog: http://blogs.technet.com/scvmm/

    “This posting is provided "AS IS" with no warranties, and confers no rights. User assumes all risks.”

    Friday, November 30, 2012 4:29 PM
  • I choosed to export the current configuration from the package I had uploaded to the Publishing server so I get one XML-file with both the Machine and User parts.

    Then I added the script part between the <UserConfiguration> and </UserConfiguration>. Then uploaded the XML file to the package.

    Right or wrong?

    /Daniel

    Friday, November 30, 2012 4:35 PM
  • Refer to this article for a discussion on scripting in App-V 5: Scripting and Embedded Scripting for AppV 5.0 (Dynamic Deployment and User Configuration Scripting)


    Please remember to click "Mark as Answer" or "Vote as Helpful" on the post that answers your question (or click "Unmark as Answer" if a marked post does not actually answer your question). This can be beneficial to other community members reading the thread.


    This forum post is my own opinion and does not necessarily reflect the opinion or view of my employer, Microsoft, its employees, or other MVPs.

    Twitter: @stealthpuppy | Blog: stealthpuppy.com | The Definitive Guide to Delivering Microsoft Office with App-V

    Tuesday, December 11, 2012 8:40 AM
    Moderator
  • Hello,

    Startup script for a process? No


    Nicke Källén | The Knack| Twitter: @Znackattack

    Sunday, February 24, 2013 11:28 AM
  • Hello,

    I suggest you create a seperate thread - as its not relating to the original question in anyway


    Nicke Källén | The Knack| Twitter: @Znackattack

    Sunday, February 24, 2013 6:34 PM