Wednesday, March 9, 2016

App-V 5.1 and App-V 5.0 SP3 generated MSI doesn't install without Administrator privileges Error code 0300000102- Solution

Question: When trying to run the App-V 5.1 or App-V 5.0 SP3 created MSI in the client machine, it fails with the error code 0300000102. How to resolve this.





Corresponding Event log:





Solution: Try running the CMD as Administrator and from here run the MSI file.This will resolve the issue. The MSI requires Admin privileges to run in the client machine.


Ok, now this works but what might be the reason? This comes into everyone's mind. Let me explain further.


Opened the App-V 5.1 sequenced MSI package and first checked in the Launch Condition table using ORCA. I see that there is a Privileged condition. I removed it by creating a Transforms file for the MSI. Tried Installing again and even this time it failed.





Analyzed further by opening the MSI template file for App-V 5.0 SP2. The msi will be located in C:\Program Files\Microsoft Application Virtualization\Sequencer\en-US


I see that the Custom Action PublishPackage32 and PublishPackage64 has Type to run in deferred execution in system context (3073)





Now opened the MSI template file for App-V 5.1 and see that those Custom Action PublishPackage32 and PublishPackage64 has Type to run in deferred execution (1025)





Ok now I have found a reason. It's time to test it. I created a Transforms file for the App-V 5.1 generated MSI package (Testpackage.msi) and changed the type for PublishPackage32 and PublishPackage64 to run in deferred execution in system context.


Tried installing the MSI with the created Transforms file (MST). Viola!! it works fine without the need for CMD as admin.


The same applies for RemovePackage32 and RemovePackage64 custom action also. This method works great for App-V 5.0 SP3 generated MSI also.


NOTE:


I heard from Dan Gough that he has created a Transforms file (MST) which would automate this case and resolves the need for Run as Admin. In addition to that he has also added support to include the deployment config.xml file too when installing. Hopefully he will be releasing it officially by this month. Once he releases it, I will be updating this blog with his Link to download the MST file.
 

Tuesday, March 8, 2016

App-V 5.1 sequencer fails to install with fatal error

Lat week I was asked by one of my friend to troubleshoot an issue which he was facing earlier.

Question: When Installing App-V 5.1 sequencer, it fails to install with the below error.

 

Solution: When Installing the sequencer, it places log files in %temp% location. We can analyze the possible reason by looking into it.


When opened the appv_sequencer_xxxxx_0_CoreX64 log file (which is the actual MSI install log), and Ctrl+F search and giving Return value 3 we see that there is a pending restart needed before installing the sequencer. The sequencer msi has a Launch condition to check for any pending restart.

We restarted the machine and again tried to install the App-V 5.1 sequencer setup. this time it got installed successfully.

Saturday, March 5, 2016

Sequence Oracle SQL Developer client - App-V 5.1

Since Java is a dependency to the Oracle SQL Developer application, install the jdk1.6.0_23(I currently have this source and so I Am using it. In case you have the latest JDK version install it)


Start the sequencing steps using App-V sequencer 5.1.


Select create a new virtual package.


Select create package.


Select standard package.


Select custom installation.






After providing the Virtual application package name click next.


Create a folder named SQLDEVELOPER in C:\ drive.


Copy the source files to C:\SQLDEVELOPER


Goto C:\SQLDEVELOPER\sqldeveloper\bin\ and edit the sqldeveloper.conf file and set the
Java homepath.


SetJavaHome C:\Program Files (x86)\Java\jdk1.6.0_23 (If you have the latest JDK, point it to that location)





Create a shortcut named SQL Developer and point it to C:\SQLDEVELOPER\sqldeveloper.exe.


Launch the shortcut and click on OK to configure the FTA's.





Uncheck the Show Tip at startup and close the prompt.





Goto Tools-Preferences and uncheck show splash screen at startup.





These changes get stored in %appdata%\SQL Developer\system x.x.x





Open the "%Appdata%\SQL Developer\system3.1.07.42\o.sqldeveloper.11.2.0.7.42\product-preferences.xml" file and click Ctrl+F and enter update and modify the value as shown below. This will suppress the updates available popup at startup.


 <hash n="oracle.ideimpl.webupdate.CheckForUpdatesPreferences">
      <value n="checkOnStartup" v="false"/>





Now Installation is done, click "I am finished installing" and click next. I didn't launch the shortcut as I wanted the package to fault stream in the client side (As I wanted the first launch to be faster).






Check the below options to allow COM object to interact and Allow full write access to VFS.





Save the package and test it in the client side.


Client Testing Using Powershell:


Install the  jdk1.6.0_23 locally in the client machine.


Open Powershell as admin. Set execution policy to bypass or unrestricted (testing purpose only)


Publish the SQL Developer App-V package using the below command in PS.

Add-AppvClientPackage "path to .appv file" | Publish-AppvClientPackage -Global | mount-AppvClientPackage

Issue with sequenced SAP GUI 7.40 "Unable to load GSS-API DLL named sncgss32.dll" - APPV 5.0

Hi folks, hope everything is going fine. First I would like to  thank all for your tremendous support. It's a sunny weekend here and I am sitting in home and blogging .


Previously, one of my distance friend who is an App-V engineer asked me to help him with an issue he was facing when launching virtualized SAP GUI 7.40. When launching the SAP logon shortcut, he was facing this issue.





When clicking yes, it prompts the below information.





First and more most tool that helps us is the great handy PROCMON tool. When analyzing the issue it showed that the shortcut is looking for sncgss32.dll and it couldn't find it.We manually searched in the App-V location and yes we couldn't find it anywhere.





We installed the source manually in a fresh machine and searched for the sncgss32.dll and we couldn't find it anywhere.


Then comes our friend Google. we searched what might be the reason for failure. We found that it needed an  environment variable SNC_LIB of the client host system set to <Install_Path_SAP_GUI>\FrontEnd\SapGui\Encryption\secgss.dll"

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b4/a040e5f0fe4ceeb7a4d6144f4d0f28/content.htm?frameset=/en/76/ea37bd31794c1da6f1ae9ba5a9df5d/frameset.htm


I checked with him whether the environment variable was set during monitoring phase. Indeed his reply was that the environment variable was set during sequencing.


We then opened up the virtual bubble of the sequenced SAP GUI package using the below command.


cmd.exe /appvve:ProductID_VersionID


We can see that the SNC_LIB environment variable inside the virtual environment using the SET command. Then why the application is failing to use it?





We manually created the environment variable locally in the machine. Now when launching the shortcut it works fine as expected. But we didn't want this to be the solution. Lets try some other method.


I often ask people to launch the shortcut inside the virtual bubble once whenever they face any error to eradicate issues in a simple way. The same we did here too.





We tried to launch the shortcut exe inside the virtual bubble (which was opened earlier using cmd.exe /appvve:ProductID_VersionID). Viola!!! the shortcut works as expected.

UPDATE:

You can also modify the main shortcut and add CMD to run as a middleman.

Example:

cmd.exe /c start "" "C:\Program Files\myapp.exe"

Thanks Dan Gough for pointing this out.