Error Running Scripts (5.0 SP2)

Configurating App-V Client components

Moderators: kirk, jur, kkaminsk

Error Running Scripts (5.0 SP2)

Postby rileyz » Thu Feb 27, 2014 12:25 pm

Just wanted to throw this out there as I can't find any information on the error below. And if someone else could test it on a App-V SP2 client, that would be grand - a sanity test more than anything.

If you have any thoughts/ideas, throw them out there, willing to give anything a go at this stage.

Im sure the scripts must work, MS wouldn't release a product in this state. So Im thinking its a configuration issue of the client, or there has been a change in the support syntax of the xml file.

I get the error below when I attempt to run a script embedded in the DeploymentConfig.

<snap>
The application failed to launch.
This may be due to a network failure.
Error code: 0x0DF01625-00000534
<snap>

I'm using the <StartVirtualEnvironment> element to launch the script in the user context. The original plan was to use Dan Gough's VFScacls to allow users write access to the VFS, but upon more testing with a simple app I was unable to even launch notepad.exe or cmd.exe. This leads me to believe there is an issue with SP2 or I need to change a config somewhere. I've had a decent look at the logs and there is mention of the script engine having issues, but the documentation for App-V is lacking so its very hard to look into it.


App-V Error Logs
Client Orchestration
Activity VirtualEnvironmentCreatedFinalize #20 failed on component ScriptManager (error: 0xDF01625-0x534).
VirtualEnvironmentCreated activity #20 failed with error code 0x55900C02-0x501.


Client VEmgr
VE created notification failed. Package moniker 55E36055-8F10-4E82-B4BA-1BE556575DF1_D09F9B05-95B6-420D-A571-D16D3C33466F. User SID S-1-5-21-2288482384-1807274781-3213859804-1000. Error {Operation Failed}
The requested operation was unsuccessful..
Failed to create the virtual process. Error: {Operation Failed}
The requested operation was unsuccessful.


ClientVirtualizationManager
ScriptManager component failed to handle VirtualEnvironmentCreated activity. Error 1004327065073222964.
VirtualizationManager component failed to handle 45 activity. Error 6165441092599678209.
VE Created notification failed with error 6165441092599678209. Package {55e36055-8f10-4e82-b4ba-1be556575df1}, version {d09f9b05-95b6-420d-a571-d16d3c33466f}, pid 2372, ve id 2.



Test Setup
Client
Windows 7 x64
App-v 5 SP2 Client (Build 5.0.3361) - Standalone mode for testing, ExecutionPolicy $true, EnablePackageScripts $true
App-V install media from MSDN, verified MD5 hash (en_microsoft_desktop_optimization_pack_2013_r2_x86_x64_dvd_3198562.iso SH1: BA778028D83E12D25D244743C6B299088DE3717A)
*I might of had App-V SP1 client on the computer, remove to install SP2, I cant recall, but will retested on clean PC

Sequencer
Windows 7 x86
App-v 5 SP2 Sequencer (Build 5.0.3361) (appv_client_setup.exe SHA1: 20C533D8DB7F3EFD907103999FDF9A38CA49D5FC)
App-V install media from MSDN, verified MD5 hash

Package Details.
Just a simple program from portableapps.com, so fully self contained and runs OK when importing the .appv package alone.
Added VFScacls.vbs amd hello.cmd to VFS Scripts folder for testing.
This was package was created to test the scripts function, so the functionality of the program is of no concern (it should load tho!)
A link to the simple app-v package on drop box - 1MB. https://dl.dropboxusercontent.com/u/13973308/Test%20Package.zip

Defect Replication
Clean Windows 7 x86 with SP1 Installed
Installed .Net 4 and KB2533623, reboot.
Installed KB2506143 (Powershell 3), reboot.
Installed App-V 5 SP2 client (SHA1:20C533D8DB7F3EFD907103999FDF9A38CA49D5FC) and appv_client_ui_setup.msi (SHA1:297F7500B546849861099BC8CF94514FCB7715E5)
Reboot, fire up powershell.
set-executionpolicy -executionpolicy 1
set-appvclientconfiguration -enablepackagescripts 1
*checked enablepackagescripts via get-appvclientconfiguration, confirmed set OK.
Add-AppvClientPackage TestApp.appv -DynamicDeploymentConfiguration TestApp_DeploymentConfig.xml | Publish-AppvClientPackage -global
Test as normal user = defect replicated.


Summary of Findings
1) App-V 5 SP2 scripting appears not function correctly while the machine is not joint to a domain. Once joined to a simple domain, the scripting appears to function as expected.
[Discovery thanks to Dan G.] http://packageology.com/2014/03/user-sc ... -accounts/

2)App-V 5 SP2 Hotfix 2 (KB2934349) does not resolve the issue.
http://support.microsoft.com/kb/2934349/EN-US

3)App-V 5 SP2 Hotfix 4 not tested yet.
http://support.microsoft.com/kb/2956985

4)App-V 5 SP2 Hotfix 5 not tested yet.
http://support.microsoft.com/kb/2963211

5)This issue is still current in App-V 5.1 HF2 & HF4 (Arrrugh!!! :evil: )



Edits
05/03/14 Added detailed defect replication details. Added source media details. Currently on back burner as I dont have access to any other media to test ):
11/03/14 Added summary of findings to summarise the thread.
27/03/14 Added link to Dan G's for Summary of Findings point 1. Added info in regards to hotfix KB2934349.
08/05/14 Added summary information for Summary of Findings point 3.
05/12/14 Added info for HF5.
23/12/16 Added info for 5.1 HF2
06/09/16 Added info for 5.1 HF4
Last edited by rileyz on Tue Sep 06, 2016 1:56 pm, edited 9 times in total.
rileyz
Accomplished Virtualizer
 
Posts: 62
Joined: Wed Mar 20, 2013 12:37 pm
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby kirk » Thu Feb 27, 2014 1:02 pm

DB blocked on my network - could you post the section of the DeploymentConfig where you call the script?
Falko
kirk
Guru
 
Posts: 810
Joined: Fri Aug 27, 2004 3:32 pm
Location: Germany

Re: Error Running Scripts (5.0 SP2)

Postby rileyz » Thu Feb 27, 2014 1:21 pm

I was thinking Databases when you said DB :lol: Had me a bit confused.
Try the links below
https://drive.google.com/file/******
https://www.wetransfer.com/downloads/*****

Code: Select all
[b]<snip>[/b]
<Applications>
      <Application Id="[{AppVPackageRoot}]\FrhedPortable.exe" Enabled="true">
        <VisualElements>
          <Name>FrhedPortable</Name>
          <Icon />
          <Description />
        </VisualElements>
      </Application>
    </Applications>
      
[i]   <UserScripts>
      <StartVirtualEnvironment RunInVirtualEnvironment="false">
      <Path>cmd.exe</Path>
      <Arguments>/K hello.cmd</Arguments>
      <Wait RollbackOnError="false"/>
      </StartVirtualEnvironment>
   </UserScripts>[/i]
   
   <!-- User Scripts Example - customize and uncomment to use user scripts -->
    <!--
     
    <UserScripts>
      <StartProcess RunInVirtualEnvironment="true">
        <Path>VFS\ProgramFilesX86\App\dosomething.exe</Path>
[b]<Snap>[/b]


Thanks for having a look, testing, and possibly saving my sanity.

Edit:
27/02/14added more detail with the code snip
05/03/14: removed links, file only aval via dropbox now.
Last edited by rileyz on Wed Mar 05, 2014 7:48 pm, edited 3 times in total.
rileyz
Accomplished Virtualizer
 
Posts: 62
Joined: Wed Mar 20, 2013 12:37 pm
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby packageologist » Thu Feb 27, 2014 1:22 pm

I can have a look at the package, but (only asking because you didn't mention it) have you double checked that App-V scripting is enable on the client?
packageologist
Guru
 
Posts: 243
Joined: Mon Jan 30, 2012 2:58 am
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby packageologist » Thu Feb 27, 2014 1:29 pm

Works for me! I get the Hello World popup. I had scripts disabled at first, but this just launched the app, ignoring the script and showed no error message.

Must be something going on with your client...
packageologist
Guru
 
Posts: 243
Joined: Mon Jan 30, 2012 2:58 am
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby rileyz » Thu Feb 27, 2014 1:41 pm

Oh thank god, I'm not going mad!
I was starting to suspect the client/test rig, guess I will be rebuilding my test rig - sounds really strange but I'm quite happy about that!
Just out of curiosity what build is your App-V client?

To answer your Q, App-V scripting is enabled on my client via set-appvclientconfiguration -enablepackagescripts 1

Thanks for the assist Dan, much appreciated!
Cheers, Riley.

ps. small world running into you again! :lol:
rileyz
Accomplished Virtualizer
 
Posts: 62
Joined: Wed Mar 20, 2013 12:37 pm
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby kirk » Thu Feb 27, 2014 4:35 pm

No doubt that you did it right, but _setting_ and _having_ a configuration might be two different things.
Just top be precise: the EnablePackageScript value might be override by GPO (ADMX or direct reg manipulation) or changed via regedit, too. So, 'get-appvclientconfiguration enablepackagescripts'
(If it a GPO would be active, set-appvclientconfiguration would throw an error)


PS: Now sitting and waiting for the Security Officers to pick me up. A pop-up told me to do so after I tried to contact three prohibited web sites during one day ;-) :wink:
Falko
kirk
Guru
 
Posts: 810
Joined: Fri Aug 27, 2004 3:32 pm
Location: Germany

Re: Error Running Scripts (5.0 SP2)

Postby packageologist » Wed Mar 05, 2014 5:10 pm

Did you figure this one out Riley?

Just came across the same issue on a client's App-V 5.0 SP2 machine, tried your test package on there and I get the same result. It works on my VM at home, which I think was installed with 5.0, followed by SP1 then SP2 updates, whereas the problem machine was set up with just the complete SP2 installer. Just going to try reinstalling the client in stages to see if it has an effect...

I am putting the script in the userscripts section of deploymentconfig.xml, publishing globally, and have scripting enabled, pretty much the same scenario as you.
packageologist
Guru
 
Posts: 243
Joined: Mon Jan 30, 2012 2:58 am
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby packageologist » Wed Mar 05, 2014 7:10 pm

Ok, installed from scratch 5.0 RTM client on a reverted clean snapshot, scripting OK. Install SP1, still OK. Install SP2... scripting is broken. Same result if I install SP2 on the clean machine in the first instance.

So, not sure what the difference is between this machine and my working one at home, will carry on digging...
packageologist
Guru
 
Posts: 243
Joined: Mon Jan 30, 2012 2:58 am
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby rileyz » Wed Mar 05, 2014 7:41 pm

Hey Dan,

Naye, still in progress, kinda got me stumped. I have no access to any other media so I can't do any more testing. The media is the only other thing I can think of at the moment (grasping at straws I know!) but would like to rule that out as an issue. I know there is MSDN and Partner Network MDOP iso media, since I don't have access to the Partner Network media I am unable to get the hash to cross check. I suspect it will be the same, will be super surprised if it was different.

I totally rebuilt the VM on Monday, super clean Windows 7x86 with SP1 blah blah blah (in notes above :) and I still had the same issue - lame.

I was just thinking of getting a App-V 5 SP1 (known working) and building it up to SP2 to see if that works. Looks like it didnt work for you though, I will replicated your App-V SP1 to SP2 using the full installer to confirm your defect scenario.

Will let you know when I get the testing done, and if I find discover anything.
Edit: Tested App-V SP1 upgrade to SP2 with with full client installer, defect is still present.

Have to admit, its a really odd one!

ps. @kirk, thanks for your thoughts - I did check via get-appvclientconfiguration, was all ok, wish it was something like that though.
rileyz
Accomplished Virtualizer
 
Posts: 62
Joined: Wed Mar 20, 2013 12:37 pm
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby packageologist » Thu Mar 06, 2014 12:19 am

In my home lab I had a 5.0 sequencer that has been upgraded with each new version, that is working fine. On another VM made from an identical image of the clean Win7 before anything was installed, if I install App-V 5.0 SP2, either directly, or via RTM->SP1->SP2, scripting does not work.

I'm using Beyond Compare to check the machines, the only main difference was the working machine had a slightly older VCRedist 2010 x64 10.0.40219, whereas the broken one had the MFC security update version 10.0.40219.325. I'm not sure how they ended up with different versions, I'm fairly sure they were both installed from the latest MDOP ISO release. Anyway, updating/downgrading this component had no effect on either machine.

The registry scan showing no major differences under HKLM/HKCU Software\Microsoft\Appv either.

If I uninstall the App-V client from the working machine and reinstall, it is still working.

The only difference I can now think of is that the working one is attached to a basic domain, where the only thing being configured via GPO is the App-V publishing server. The server and DC are both offline and both App-V client VMs connected to the same virtual network.

I'll come back here if I find a fix, but for now I am stumped!
packageologist
Guru
 
Posts: 243
Joined: Mon Jan 30, 2012 2:58 am
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby packageologist » Thu Mar 06, 2014 12:59 am

Ok, I've made a small breakthrough:

On the working machine, I was logged in as a domain account. App-V scripting works.

If I log off and log on as local admin, I get the error message when launching the virtual application - but only in SP2.

It appears to be the same issue Tim Magan reported here: http://www.tmurgent.com/TMBlog/?p=1857

However my results are slightly different to Tim's. For me, a scripting fails with a local user, whether or not they are an admin. It works under the domain accounts, both user and test.
Last edited by packageologist on Thu Mar 06, 2014 1:45 pm, edited 2 times in total.
packageologist
Guru
 
Posts: 243
Joined: Mon Jan 30, 2012 2:58 am
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby rileyz » Thu Mar 06, 2014 1:01 pm

Will try and test that scenario out on my end. Might take a bit of time, I have to fire up my old Hyper-V test lab I haven't used in ages.

Nice detective work! :)

Results From Testing
I say: What the... *sigh
Right, I just joined my Win7 machine to my test domain, nothing fancy, stock domain with the schema updates required for SCCM 2012 R2 and I think some changes required clustering(?) Anyway, I can confirm once my machine was joined to a domain, the scripting started working for a standard domain user. If you log in as a local standard user, the script error/defect is presented.

This test replicates the results (above) seen by Dan.

Testing was a bit scruffy, I used the SP2 created package (link at the start of the thread), the "hello world" in a command window popped up as expected (as a standard domain user).
Then I loaded a SP1 created package with the vbs script, that popped up and run ok as expected (as a standard domain user).


Edit:
6/3/14 Updated with testing results from Dan's Test scenario. Issues/outcome replicated.
Last edited by rileyz on Thu Mar 06, 2014 8:13 pm, edited 2 times in total.
rileyz
Accomplished Virtualizer
 
Posts: 62
Joined: Wed Mar 20, 2013 12:37 pm
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby packageologist » Thu Mar 06, 2014 2:31 pm

The other strange thing that happens with this test package, is when I use a local account and App-V scripts are enabled, the app itself fails to load because it cannot find C:\Windows\SysWow64\msvcrt100.dll.

I only have the 64-bit version of the VC++ 2010 redist that was installed by the client, assuming we no longer need to deploy them all locally since App-V 5.0 SP2 should take care of this automatically.

If I load the package as the domain user, the app loads the default C:\Windows\Syswow64\msvcrt.dll that comes with Windows. The same thing happens for the local user when App-V scripting is disabled. But as soon as I enable scripting, it's trying to look for this non-existent dll.

Installing the 32-bit version of VC++ 2010 redist stops the error. But it's as if the App-V client is stepping in to tell the app which dll to load, being a 64-bit service, it finds the x64 redist and tells the app to use C:\Windows\System32\msvcrt100.dll. Since the app is 32-bit, it gets redirected to Syswow64 where it fails to find the file.

This makes me wonder if the two issues are related, and if the whole scripting issue might perhaps only occur on a 64-bit machine... I will check for this when time allows.
packageologist
Guru
 
Posts: 243
Joined: Mon Jan 30, 2012 2:58 am
Location: London

Re: Error Running Scripts (5.0 SP2)

Postby rileyz » Thu Mar 06, 2014 8:50 pm

Just to save you some time (:
This scripting issue occurs on x86 machines as well.

Re: the msvcrt100.dll thing, I did noticed that it popped a message on x64 systems, installing the x86 VC++ 2010 x64 machine does resolve the issue - I did think it was werid when it was prompting, as the app itself is a portableapps.com app, so it "should be" all self contained. Bear in mind it could be me doing a dirty sequence too. I haven't been taking notice of the msvcrt100.dll issue as I wasn't really worried about the app itself, more getting the scripting stuff working. I was just using the app as a "test subject".

I'm thinking the msvcrt100.dll is a separate issue to the scripting functions, but it is weird that it manifests itself when EnablePackageScripts is $true.

Just thinking about it now, VC++ 2010 is part of the App-V 5 install/pre-req, so this issue won't come up in x86 systems.
But VC++ 2010 x86 is not required for App-V 5 x64, only the 64bit version of VC++ 2010 is installed.
*Not sure if msvcrt100.dll is part of the Win7 OS install.

Will ponder the issues above some more over the weekend.
rileyz
Accomplished Virtualizer
 
Posts: 62
Joined: Wed Mar 20, 2013 12:37 pm
Location: London

Next

Return to Configuring App-V Client

Who is online

Users browsing this forum: No registered users and 1 guest