Hotfixes and useful links for XenApp 6.x and Windows Server 2008 R2

If you are responsible for a XenApp 6 or 6.5 farm, then you might know that there is a lot of hotfixes out for both Windows Server 2008 R2 and XenApp 6/6.5. Citrix has a page with recommended updates, but a lot of them are included in Service Pack 1. This list will include those.

There is also good documents on the web and useful tools.

Updated link with hotfixes: http://support.citrix.com/article/CTX129229/

This thread will collect some updates that is available and recommended links/tools.

For Windows Server 2008 R2:

For Citrix XenApp 6.0:

For Citrix XenApp 6.5

Except installing updates and fixes, this are some good links:

Posted in Citrix, Customization, Microsoft, RDS | Leave a comment

Free labs on System Center 2012

Microsoft has a lot of good and free labs online. You will get access to virtual servers/machines for 90 minutes per session so that is plenty of time to get acquaintance with new technology and you won’t have to build your own lab environment at home.

Address: http://technet.microsoft.com/en-us/virtuallabs/bb539977

Posted in Application Virtualization, Microsoft, System Center, Windows | Leave a comment

A beginners guide to the registry part 1

A lot of people are doing stuff in the registry without knowing how it really works. I will try to explain how it all works, from the point where the user are creating a new user profile at logon, how to modify the default user profile, change a remote registry and so on.

The way to start regedit is to run C:\Windows\regedit.exe or use win+r and enter regedit. You will se the following categories:

HKLM (HKEY_LOCALE_MACHINE) holds all registry settings for the current machine and HKCR (HKEY_CLASSES_ROOT) is just a subkey of HKLM. So HKCR is other words HKLM\Software\Classes.

HKCU (HKEY_CURRENT_USER) holds all registry settings for your user.

HKU (HKEY_USERS) holds all builtin users and currently logged-on users settings, so you will find your HKCU under one of the SID keys.

 

HKCR

As I say above, this key is in other words HKLM\Software\Classes. This part of the registry holds the file associations per machine and keys like DLL/OCX registrations. A normal user has no access to change these.

A file association can be for example HKCR\.doc

This has no information in this key on what to do on certain actions, those you will find under HKCR\Word.Document.8 if you look on the picture above.

I have opened the key shell>Open>command and there you will see the actual command used when opening a .doc file

 

HKLM

This part holds per machine based keys like application settings from different companies. This could be settings like where to save files, registration keys, installation paths and versions and so on.

Office saves a lot of keys under HKLM\Software\Microsoft\Office

If you have a 64-bit operating system, you will find 64-bit applications under HKLM\Software and 32-bit applications under HKLM\Software\Wow6432Node

HKEY_CLASSES_ROOT\Installer\Products holds all installed applications showed in “Add or remove programs”

 

HKCU

This part holds your settings. An application normally saves their user settings in 3 places on the computer:

  • In your %AppData% folder
  • In the installation directory
  • In HKCU\Software

Your registry file is located in %Userprofile%\ntuser.dat

 

HKU

As I said above, this holds the user keys for all built-in accounts and for those that are currently logged-on. If you have an terminal server, you will see a lot of users here…

.Default is the user when no one is logged on to the computer, in other words the login screen. Two keys that you will find here is the Keyboard layout and Numlock setting.

S-1-5-18 is Local System

S-1-5-19 is NT Authority\Local Service

S-1-5-20 is NT Authority\Network Service

List of well-known SID’s: http://support.microsoft.com/kb/243330

The rest are keys for the logged-on users in most cases, built-in administrator and service accounts. You can look upp SID’s for AD accounts with ADSIEdit or look upp what accounts that has a local profile in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

New Users?

If you haven’t done any changes with GPO’s or has a central profile, when a new user logs in, it will use C:\Users\Default as a template. It is System hidden by default, so that’s why you don’t see it in the explorer.

If you want to deploy registry settings to a default profile, you can “load” C:\Users\Default\ntuser.dat, do the changes and then unload the profile (If you don’t unload the profile, new users can’t login).

Mark HKU in the registry. Go to File > Load Hive. Enter the address C:\Users\Default\ntuser.dat. Enter the name this profile should get mapped as, just so you know what to select under HKU later. Let’s user “DefaultProfile”, then it could look like:

Do your changes under the key you loaded, and when you are done, mark HKU\DefaultProfile and choose File > Unload Hive

This is the end of part 1, later this summer I will write part 2 that includes more advanced operations and tips/tricks.

Posted in Customization, Registry, Uncategorized, Windows | Leave a comment

How to run Adobe CS6 without admin rights?

Many companies are very disappointed on Adobe because of the latest release of Create Suite with version 6.0 if you read on the web.

When trying to launch some applications in the Suite you will get strange messages and the applications will crash, especially Photoshop, InDesign and Bridge. It seems like some Adobe applications wants to create temp files on the C: root and if the users aren’t local administrator, it will fail. It also seems to be extra problems if you doesn’t have the users profile on the C-drive.

One way to force an application to always run as administrator could be to create a registry key:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
“C:\\Program Files (x86)\\Adobe\\Your_Exe_File.exe”=”RUNASADMIN”

But if you don’t like to let your users be a local administrator, you can try my Adobe fix :)

These simple steps helped one of my customers with a Windows 7 64-bit environment and their profiles on the D-drive:

  1. Create a folder on the C-root, like C:\UserTemp
  2. Give the users Change rights on the folder you created, it can be done with an application called setacl, example:
    1. setacl.exe -on “C:\UserTemp” -ot file -actn ace -ace “n:S-1-5-32-545;p:change;s:y”
  3. Run the following commandlines for each user to change their %temp% and %tmp% paths:
    1. setx.exe TEMP C:\UserTemp
    2. setx.exe TMP C:\UserTemp

These simple steps makes all Adobe CS6 applications to run without any problems for the customer.

Posted in Application Packaging, Customization, Registry, Scripting, Windows 7 | 2 Comments

Oracle Java Runtime deployment

Many organisations are packaging Java Runtimes sometimes every year. I will go through how to get the MSI, how to customize it and other tips and tricks to deploy it successfully.

First you get the 32-bit Offline installer on java.com:

Then you just start the exe installation and stops at the first screen. Then you open the folder %localappdata%\..\LocalLow\Sun\Java

There you will find the MSI and cab file for the release you want to deploy. Copy them to another folder and then close the installation.

To remove the update function, you might want to create an MST file for the MSI that turns updating off. Download ORCA MSI editor from: http://www.technipages.com/download-orca-msi-editor.html

After installing ORCA, right click your MSI file and choose “Edit with ORCA”. Choose Transform > New Transform

Enter the table Propery on the left side. Change the following MSI Properties:

  • AUTOUPDATECHECK=0
  • JAVAUPDATE=0
  • JU=0

When you have changed the properties above, choose Transform > Generate Transform.  Name the MST file NoUpdate.mst and save it to the same folder as the MSI.

Now you have a complete MSI and MST and are ready to deploy java. The commandline could look something like:

  • msiexec.exe /I jre1.7.0_05.msi TRANSFORMS=NoUpdate.mst /qn REBOOT=ReallySuppress /L*v “%temp%\Install_Java_1.7u5.log”

A good thing to do as a step before running the installation to avoid restarts and failed deployments is to add a step that kills certain processes. I use this command:

  • taskkill.exe /F /IM iexplore.exe /IM jqs.exe /IM firefox.exe /IM java.exe
  • If the process is not started above, it could result in Exit code 128, so add this if you can to the list of success codes.

In some releases of Java there has been a JQS service that could mess with future updates. I usually removes this service with this command:

  • “%programfiles%\java\jre7\bin\jqs.exe” -unregister
  • This could get the following exit codes: 0, 1 or 9009

As a company I would recommend looking on ATEA’s service called AppUpdate: http://services.atea.com/services_uk/services/appupdate.aspx

There you will get the newest releases packaged of the most usual applications that companies are using…

 

 

Posted in Application Packaging, Application Virtualization, Customization | Leave a comment

Simple script to remove user printers

If you have a Citrix environment or a simple RDS/TS environment and are using Roaming profiles, you might notice that the profile might save a lot of old printers in the profile.

Maybe they aren’t seen by the user if they open the control panel > printers, but applications might getting problems or installation of new printers might fail.

There is some hotfixes out on the web that is supposed to fix this and other stuff:

But if you want a simple solution, you might exclude some registry keys or write a simple VBScript that runs during logoff:

const HKEY_CURRENT_USER = &H80000001
strComputer = “.”

Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” & strComputer & “\root\default:StdRegProv”)

strKeyPath = “SOFTWARE\Microsoft\Windows NT\CurrentVersion\PrinterPorts”
strKeyPath2 = “SOFTWARE\Microsoft\Windows NT\CurrentVersion\Devices”

oReg.DeleteKey HKEY_CURRENT_USER, strKeyPath
oReg.DeleteKey HKEY_CURRENT_USER, strKeyPath2

Posted in Citrix, RDS, Windows | Leave a comment

BankID 4.19.1

I love that BankID is using MSI nowdays, but the latest version 4.19.1 had a flaw.

When specifying a silent command with /qn and deploying the application, the installation will never complete.

It seems like it presents a finish dialog and because the installation is normally runned as SYSTEM, you won’t see it :)

Add the MSI Property NOINSTALLDONEDIALOG=1 and you are good to go!

 

Posted in Application Packaging, Customization | 1 Comment

You like free Application Virtualization?

Many organizations are trying to virtualize more and more. It will be more and more common to start implementing a VDI solution so the end users can enjoy the same desktop on both their company PC and their iPads and so on.

Beside a personal desktop that is virtualized, more and more people starts creating virtualized applications. It can be tough at the beginning because it cost a lot and takes a lot of hours, but in the end you will have better control over your environment and the step to implement the next plattform/OS will be much simplier.

I have tried the most popular products like Microsoft App-V, Vmware Thinapp and Novell ZAV and they work as espected and have their good and bad flaws.

But there is a free application out on the web and that is cameyo: http://www.cameyo.com/

It is simple to use and have much of the functionality as the big products. So setup a virtual computer in VirtualPC, HyperV, Vmware workstation or what ever you want, install cameyo and take a snapshot and you are ready to start virtualize applications :)

Here you will find some best practices for how to setup your machine where you capture your applications: http://technet.microsoft.com/en-us/library/dd351420.aspx

Posted in Application Packaging, Application Virtualization, Windows | Leave a comment

Simple startup script to remove profiles

I see a lot of customers that has a lot of user profiles under C:\Users even when they have configured User Hive Cleanup and so on…

My solution for this is a startup script in VBScript that I have in my Group Policy for those servers.

‘ Ignore any errors
On Error Resume Next

‘ define some constants
Const HKEY_LOCAL_MACHINE = &H80000002
Const STR_GUID_PATH = “SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileGuid”
Const ROOT_PROFILE_PATH = “HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\”
Const SID_STRING = “SidString”

‘ some variables
strProfiles = “”

‘ Create a shell
Set WSHShell = CreateObject(“WScript.Shell”)

‘ Open the Registry
Set objRegistry=GetObject(“winmgmts:\\.\root\default:StdRegProv”)

‘ Extract the ProfileGUID entries from the registry returned in arrGUIDs
objRegistry.EnumKey HKEY_LOCAL_MACHINE, STR_GUID_PATH, arrGUIDs
 
‘ Process each of the entries in the ProfileGUID
For Each objSubkey In arrGUIDs

    ‘ Extract the SID from the GUID entry
    strRegPath = STR_GUID_PATH & “\” & objSubkey
    objRegistry.GetExpandedStringValue HKEY_LOCAL_MACHINE, strRegPath, SID_STRING, sidString

    ‘ Extract the profile path from the ProfileList sub tree in the registry relating to the current GUID / SID
    ProfileRegPath = ROOT_PROFILE_PATH & sidString
    
    RegKey = ProfileRegPath & “\ProfileImagePath”
    profilePath = WSHShell.RegRead (regkey)

    ‘ Replace %systemdrive% with “c:”
    profilePath = replace(profilePath,”%SystemDrive%”,”C:”)
   
    ‘ Extract username from profilePath
    userName = Right(profilePath, len(profilePath)-InStrRev(profilePath,”\”))
    
    If username <> “Administrator”  AND username <> “Public” AND username <> “Default” AND username <> “Ctx_streamingSvc” Then
       
        sPath = “reg delete ” & “””HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileGuid\” & objSubkey & “”” /f”
        CMDRegistry = sPath
        WSHShell.Run CMDRegistry

        sPath = “reg delete ” & “””HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\” & sidString & “”” /f”
        CMDRegistry = sPath
        WSHShell.Run CMDRegistry

        CMDLine1 = “cmd /c rd /S /Q ” & profilePath
        WSHShell.Run CMDLine1
    end if
Next

 

Posted in Citrix, Registry, Scripting, Windows | Leave a comment

Verify your XenApp 6.5 HDX environment

When you implement a new Citrix XenApp environment it’s easy to miss a policy setting or function. A nice addon to check your HDX settings for a user is to download HDX monitor 2.0. It’s in tech preview right now so some settings are hard to figure out or might not work.

You download it from: http://hdx.citrix.com/hdx-monitor/tech-preview

It’s a click-once installation so a normal user can install and run it.

So do this in a published desktop and you will see what HDX settings that is turned on for your user.

Here you will get tips on how you get the best experience.

I haven’t figurered out how to get full points on Audio yet and how to make Network to work at all.

For the network issue I watch this thread: http://forums.citrix.com/thread.jspa?threadID=300897

For the audio question  I watch this thread: http://forums.citrix.com/thread.jspa?threadID=308035

Posted in Citrix | Leave a comment