$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
28 Jan // php the_time('Y') ?>
On a Citrix XenApp 5 environment a user reported that he was unable to start a Full Screen session on a Dual Monitor Configuration.
He received this error message:
Citrix has a KB Article: “How to Allow More Memory for Session Graphics on Windows Server 2003” that explains exactly how we can solve this.
We need to change the MaxLVBMem registry value and we can use the Excel Sheet from the KB Article to calculate the proper value.
Please don’t set this value too high because a higher value means you will restrict other kernel memory pools.
You also need to deny the SYSTEM account the SetValue permission on the HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management key to prevent the Citrix IMA service from overwriting the new value.
So I wrote a small PowerShell script to change the permission and set the value:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | $keyName = "SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\icawd\thin16" $valueName = "MaxLVBMem" # Calculate your value! http://support.citrix.com/article/CTX114497 [int]$value = 0xc00000 # Set Identity to SYSTEM via it's Well Known SID [System.Security.Principal.SecurityIdentifier]$ident = "S-1-5-18" # Open Registry Key (with Write Permissions) $regKey = Get-Item "HKLM:" $regKey = $regKey.OpenSubKey($keyName, $true) # Fetch Existing permissions $acl = $regKey.GetAccessControl() # Construct a new Ace $rights = [Enum]::Parse([Security.AccessControl.RegistryRights], "SetValue") $deny = [Enum]::Parse([Security.AccessControl.AccessControlType], "Deny") $rule = New-Object Security.AccessControl.RegistryAccessRule($ident, $rights, $deny) # Add the new Ace to the Acl $acl.AddAccessRule($rule) # Apply the new Acl to the Registry key: $regKey.SetAccessControl($acl) # Now set the required Value $regKey.SetValue($valueName, $value) # Close the key $regKey.Close() |
24 Dec // php the_time('Y') ?>
Today I needed to script the installation of IBM System i Access for Windows (formerly called IBM Client Access).
With older versions of this client (up to 5.4) you could use the -r (record) installer switch to record the install in a setup.iss file but version 6.1 uses an MSI based installer.
IBM offers the client in a 2 DVD download but you probably only need the first dvd (dvd 1 has both the x86 and x64 installers, dvd 2 has the ia64 installer) which is a whopping 3,5 GB download.
Inside the download (a zip) is an iso file of which you will only need the files in the root and the Image32 or Image64a folder.
Inside the image folder are subfolders names MRI29xx where xx is a language identifier:
The following Identifiers are used: (more…)
17 Dec // php the_time('Y') ?>
Yesterday I was packaging an application called Kluwer Juridische Bibliotheek. When the user first starts this application a screen with the License Conditions pops up and it must be accepted:
I always try to remove such things as I don’t think it’s necessary for every user to accept it.
13 Dec // php the_time('Y') ?>
I usually change the text below the “This Computer” icon to reflect the current username and servername:
This is an ancient trick, just set the the LocalizedString Value of the following key:
1 | HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} |
to “%USERNAME% on %COMPUTERNAME%”.
It get’s a little more complicated if you want to set this from a script, because the environment variables are replaced with the actual value BEFORE they are entered in the Registry.
26 Nov // php the_time('Y') ?>
I remembered from a previous project that when the Citrix Web Interface this is caused by a setting called generatePublisherEvidence in the Aspnet.config file.
This behaviour has been documented by Citrix in CTX117273.
If you read it carefully you will see the note that you need to fix it in 2 places for an x64 system.
If you know me a little than you have probably guessed I wanted to fix this with a nice script. I have chooses PowerShell this time because it has good support for XML and I made a one-liner so I can easily use it in an Embedded Altiris script.
The script changes the config file for both x86 and x64:
1 | gci "$env:WINDIR\Microsoft.NET\Framework*" | foreach {$x=[string]$_ + "\v2.0.50727\Aspnet.config";[xml]$c=Get-Content $x;$n=$c.configuration.runtime.generatePublisherEvidence;if($n -eq $null){$n=$c.CreateElement("generatePublisherEvidence");$c.configuration.runtime.AppendChild($n)};$n.SetAttribute("enabled",[string]$false);$c.Save($x)} |
EDIT: If you run by commandline you need to care of quotes within quotes, easiest thing to do is to use double quotes (“) to surround the commandline and use single quotes (‘) for Strings inside the commandline:
1 | powershell.exe "& {gci "$env:WINDIR\Microsoft.NET\Framework*" | foreach {[string]$x=($_.Fullname) + '\v2.0.50727\Aspnet.config';[xml]$c=Get-Content $x;$n=$c.configuration.runtime.generatePublisherEvidence;if($n -eq $null){$n=$c.CreateElement('generatePublisherEvidence');$c.configuration.runtime.AppendChild($n)};$n.SetAttribute('enabled',[string]$false);$c.Save($x)}}" |
25 Nov // php the_time('Y') ?>
A while ago I created a script that I can run as embedded script in Altiris that creates a Server Manager Answer File (for Server 2008).
I could have simply done an echo >answer.xml but I wanted a well formed XML that could be read and displayed in an XML editor or Internet Explorer when needed.
I use the Microsoft.XMLDom object in the script the create the XML and I think the code is easy to understand so I will just show it here: (more…)
12 Nov // php the_time('Y') ?>
I ran a VBScript that queries the Win32_Product WMI class on Windows 2003 but it returned error 0x80041010 instead of the expected results.
I looked up that errorcode and it means WBEM_E_INVALID_CLASS. This happened because the “WMI Windows Installer Provider” was not installed.
You can do this through Add/Remove Programs | Windows Components | Management and Monitoring Tools | WMI Windows Installer Provider.
Or if you want to do this with a script you can use SysocMgr:
1 2 3 4 5 6 7 8 | @echo off rem Install WMI Windows Installer Provider rem Create Sysoc Answer File echo [Components] > InstallIWMI.txt echo WbemMSI = on >> InstallIWMI.txt Sysocmgr.exe /i:\windows\inf\sysoc.inf /u:\Windows\Temp\InstallIWMI.txt /r |
12 Jun // php the_time('Y') ?>
Today someone asked questions about a script I wrote back in 2007 to solve a bug in Outlook (2003 but at least Outlook XP has the same issue). If you have access to someone’s calendar and want to make a print of it Outlook wants to print it in it’s default view which is a combined view on calendar appointments and tasks. However if you do not have permissions to the other persons tasks folder Outlook refuses to print and displays the following error: The messaging interface has returned an unknown error. If the problem persists, restart Outlook.
To resolve it you can go to the Calendar | Daily View | Print, then click Page Setup and under Include Options deselect Taskpad. I didn’t want to do this for all users that’s why I wrote the script.
23 Jun // php the_time('Y') ?>
I was working on an unattended installation of Citrix Presentation Server 4.5 or rather Citrix Xenapp. I was creating the dsn file for the installation by a script that uses the echo command and output this to a file.
This is a part of the script:
rem Create ODBC file
rem ———————————————————————–
echo [ODBC] > %ODBC%
echo DRIVER=SQL SERVER >> %ODBC%
echo UID=%SQL_SA% >> %ODBC%
echo Address=%SQL_SERVER%,1433 >> %ODBC%
echo Network=DBMSSOCN >> %ODBC%
echo LANGUAGE=us_english >> %ODBC%
echo DATABASE=%CTX_DATASTORENAME% >> %ODBC%
rem echo WSID=%COMPUTERNAME% >> %ODBC%
echo APP=Citrix IMA >> %ODBC%
echo SERVER=%SQL_SERVER% >> %ODBC%
echo Description=Citrix Datastore >> %ODBC%
echo. >> %ODBC%
Even though the generated DSN file looks ok the installation fails. If you look in the installation log you can see this error: Error 26009. Could not Access the datastore using the DSN file.
I then created a dsn file through the ODBC Data Source Administrator and then the installation went ok. I compared the DSN file with the one my script generated and it was the same.
A search with Google and in the Citrix forums leads to numerous posts with the same error but none with a real solution. Some suggestions are that you need to remove the WSID line or even the order of the entries in the DSN file. But none of these suggestions work.
So I compared the two files again and I noticed that the filesize of my generated DSN was slightly bigger. So let’s look again at the script:
echo DRIVER=SQL SERVER >> %ODBC%
See the space right before the >>? This means that after each line in the dsn file there’s a space too. If you open the file with a Hex Viewer you can easily see the spaces (ASCII value 20):
So the solution is to change this (for all lines) to:
echo DRIVER=SQL SERVER>> %ODBC%
After that it works perfectly!
5 Nov // php the_time('Y') ?>
Dirk Schmitz send me his Python version of encrypting the RDP Password:
1 2 3 4 5 | import win32crypt import binascii pwdHash = win32crypt.CryptProtectData(u"MYPASSWORD",u'psw',None,None,None,0) print binascii.hexlify(pwdHash) |
Read the original article here: https://www.remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/