Jump to content
Welcome to our new Citrix community!
  • 0

seamless Clickonce


RJ Riemensnider

Question

Hi, now that 2012R2 supports clickonce apps I have successfully deployed a seamless Clickonce app via remoteapp but am having trouble doing the same with XenDesktop 7.1 on the same 2012R2 session host server.  The only info I can find is an outdated article that states that Clickonce apps are not supported in terminal services which of course now they are on 2012R2.

 

I atemted to publich the .application file which worked for remoteapp but not in Citrix.  Has anyone had success publishing cliclonce apps in 2012R2 OS based Citrix?

Link to comment

19 answers to this question

Recommended Posts

  • 0

Thanks for the reply.  I have had no luck with that.  With remoteapp, I can publich the .application file that is downloaded from the browser and it works fine but with citrix, using the same 2012R2 session host, I cant even launch the .application file if I publish iexplore.exe.  I can run the .application file if I publish the full desktop though.

Link to comment
  • 0

Thanks Rog, that was the article I was referring to as outdated, it states that Clickonce apps are not supported in a terminal services environment however now with 2012R2, they are.  Thanks again for the info.

 

Here is what I have tried.....

 

 

Publish the .application file          app failed to start message

 

Publish a .bat file                         app failed to start message

 

Publish iexplore/click on link         Running security scan, then nothing

 

Publish iexplore/downloads/         Nothing

Click on download                       

 

Publish dir with explorer/click        Works

on .application file

Link to comment
  • 0

If you want to publish a non-standard File Type, run the following commands to determine the actual executable:

  • assoc .application - which returns Application.Manifest
  • ftype Appilcation.Manifest - which returns application.manifest="C:\Windows\System32\rundll32.exe" "C:\Windows\System32\dfshim.dll",ShOpenVerbApplication %1

     

Link to comment
  • 0

Sorry, I was lazy and cut and pasted.  I get exactly what you posted.  So in troubleshooting if I use the following, I can launch the app via cli:

 

C:\Users\administrator.CONTEC01>"C:\Windows\System32\rundll32.exe" "C:\Windows\S
ystem32\dfshim.dll",ShOpenVerbApplication C:\IFSInstall\IFS-App8-Prod\Ifs.Fnd.Ex
plorer.application

 

 

However if I use C:\Windows\System32\rundll32.exe as the exe and "C:\Windows\System32\dfshim.dll",ShOpenVerbApplication C:\IFSInstall\IFS-App8-Prod\Ifs.Fnd.Explorer.application as the command line argument, I get nothing.

 

Thanks again for the help.

Link to comment
  • 0

Ok, I found the culprit.  It's dfsvc.exe.  In a full session, when I click on the .application file, this exe starts and manages the version checking for the actual executable for the application manifest.  In a seamless window, this dfsvc does not start.  I published a cmd session and attempted to start the .application with no luck.  So then from the cmd prompt I started explorer and still couldn't start the .application by double clicking on it.  So I right clicked, did an open with, and selected keep using oncclick and then I could start it.  So not I am attempting to script starting dfsvc.exe before the .application file is run. 

  • Like 1
Link to comment
  • 0

Success!  Thank you!

 

I ended up having to issue the start command, then sleep 1, then the .application file otherwise the dfsvc.exe want available then the .application started. 

 

Thanks again for the help.  Any idea why the file association is different in a full desktop vs seamless?  I compared the ftype Application.Manifest in seamless and full and both were the same.

  • Like 1
Link to comment
  • 0

Success!  Thank you!

 

I ended up having to issue the start command, then sleep 1, then the .application file otherwise the dfsvc.exe want available then the .application started. 

 

Thanks again for the help.  Any idea why the file association is different in a full desktop vs seamless?  I compared the ftype Application.Manifest in seamless and full and both were the same.

 

 

 

Hi, 

can you please share the full command that you used? 

 

Link to comment
  • 0

I was able to successfully publish this in XenApp 6.5 referencing this article here:

 

http://jonspallone.com/2012/02/08/admins-click-once-twice-three-times-for-clickonce/

 

It also works with XenDesktop MCS or PVS with PvD enabled after testing.  Essentially you're just removing the .exe and manifest files from where the ClickOnce install is located in the profile and then hosting them in a shared location on a server or desktop.  The only wrench that's thrown into this configuration is that the files must be manually updated when they are released for the ClickOnce application.  May not work for all apps but this worked for me.

  • Like 1
Link to comment
  • 0

I was able to successfully publish this in XenApp 6.5 referencing this article here:

 

http://jonspallone.com/2012/02/08/admins-click-once-twice-three-times-for-clickonce/

 

It also works with XenDesktop MCS or PVS with PvD enabled after testing.  Essentially you're just removing the .exe and manifest files from where the ClickOnce install is located in the profile and then hosting them in a shared location on a server or desktop.  The only wrench that's thrown into this configuration is that the files must be manually updated when they are released for the ClickOnce application.  May not work for all apps but this worked for me.

 

 

Thank you for your time. It seem that this method works ok. Of course. as you said the negative is that the application is static and not automatically updated from a remote location.

Link to comment
  • 0

We are using mandatory profiles on our VDI deployment and needed a solution for clickonce applications. We deployed servers for hosting published applications with roaming profiles and configured the following script to accomplish running the applications and maintaining their installed state so they didn't need to be re-installed every time the user opened them. 

 

Both applications were started differently so modifications had to be made to each.. depending on how the developer built their app you will need to make modifications to this script. During testing I just published a powershell prompt and then once we had it where it worked correctly we wrapped it into an exe with PowerShell Studio. 

 

*The wait-forprocess function I found here - https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/waiting-for-process-launch

 

Brief Description:

    Exists: 
        1. Imports the registry file.
        2. Launches dfsvc.exe with short delay and saves process information to variable. 
        3. Launches ClickOnce.Application
            If there is an update it will prompt the user to install else it will just launch existing version. 
            Wait-ForProcess function continuously checks for the applications process name.
        4. Exports the updated registry information, if any, to _Config.reg
        5. Waits for user to exit application. 
        6. Upon exit terminates the dfsvc process from the variable information in step 2. 
    Does Not Exist:
        1. Created Application directory in users appdata\roaming folder. 
        2. Launches dfsvc.exe with short delay and saves process information to variable. 
        3. Launches ClickOnce.Application
            If there is an update it will prompt the user to install else it will just launch existing version. 
            Wait-ForProcess function continuously checks for the applications process name.
        4. Exports the updated registry information, if any, to _Config.reg
        5. Waits for user to exit application. 
        6. Upon exit terminates the dfsvc process from the variable information in step 2. 

 

Everything capitalized would need to be modified for your particular application. 

Example A - This application ran from a file that was stored on the local server. 

function Wait-ForProcess
{
	param (
		$Name,
		[Switch]$IgnoreAlreadyRunningProcesses
	)
	if ($IgnoreAlreadyRunningProcesses){
		$NumberOfProcesses = (Get-Process -Name $Name -ErrorAction SilentlyContinue).Count
	}
	else{
		$NumberOfProcesses = 0
	}
	while ((Get-Process -Name $Name -ErrorAction SilentlyContinue).Count -eq $NumberOfProcesses){
		Start-Sleep -Milliseconds 400
	}
}

	$reg_config_path = "C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg"
	if (Test-Path $reg_config_path) {
		reg import C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg
		$dfsvc_process = start-process C:\Windows\Microsoft.NET\Framework\v4.0.30319\dfsvc.exe -PassThru
		Start-Sleep -Seconds 2
		Start-Process .\APPLICATION_NAME.application
		Wait-ForProcess -name "APPLICATION_PROCESS_NAME" -IgnoreAlreadyRunningProcesses
		reg export HKCU\SOFTWARE\Classes\Software C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg /y
		Wait-Process -Name APPLICATION_PROCESS_NAME
		Stop-Process $dfsvc_process.id
	}
	else {
		mkdir c:\users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER -ErrorAction SilentlyContinue
		$dfsvc_process = start-process C:\Windows\Microsoft.NET\Framework\v4.0.30319\dfsvc.exe -PassThru
		Start-Sleep -Seconds 2
		Start-Process .\APPLICATION_NAME.application
		Wait-ForProcess -name "APPLICATION_PROCESS_NAME" -IgnoreAlreadyRunningProcesses
		reg export HKCU\SOFTWARE\Classes\Software C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg /y
		Wait-Process -Name APPLICATION_PROCESS_NAME
		Stop-Process $dfsvc_process.id
	}

Example B - This application would only work if initalized from IE. Vendor restricted running the application from direct access, Chrome, Firefox, etc. 

function Wait-ForProcess {
	param (
		$Name,
		[Switch]$IgnoreAlreadyRunningProcesses
	)
	if ($IgnoreAlreadyRunningProcesses) {
		$NumberOfProcesses = (Get-Process -Name $Name -ErrorAction SilentlyContinue).Count
	}
	else {
		$NumberOfProcesses = 0
	}
	while ((Get-Process -Name $Name -ErrorAction SilentlyContinue).Count -eq $NumberOfProcesses) {
		Start-Sleep -Milliseconds 400
	}

	$reg_config_path = "C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg"
	if (Test-Path $reg_config_path) {
		reg import C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg
		$dfsvc_process = start-process C:\Windows\Microsoft.NET\Framework\v4.0.30319\dfsvc.exe -PassThru
		Start-Sleep -Seconds 2
		Start-Process iexplore.exe URL_TO_CLICKONCE_APPLICATION
		Wait-ForProcess -Name APPLICATION_PROCESS_NAME -IgnoreAlreadyRunningProcesses
		Wait-Process APPLICATION_PROCESS_NAME
		reg export HKCU\SOFTWARE\Classes\Software C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg /y
		Stop-Process $dfsvc_process.id
	}
	else {
		mkdir c:\users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\
		Start-Process "C:\Windows\Microsoft.NET\Framework\v4.0.30319\dfsvc.exe"
		Start-Sleep -Seconds 2
		start-process iexplore.exe URL_TO_CLICKONCE_APPLICATION
		Wait-ForProcess -name APPLICATION_PROCESS_NAME -IgnoreAlreadyRunningProcesses
		reg export HKCU\SOFTWARE\Classes\Software C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg /y
		Wait-Process -Name APPLICATION_PROCESS_NAME
		reg export HKCU\SOFTWARE\Classes\Software C:\Users\$env:username\appdata\roaming\APPLICATION_ROAMING_FOLDER\APPLICATION_config.reg /y
		Stop-Process $dfsvc_process.id
	}

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...