$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
10 Feb // php the_time('Y') ?>
I am writing a class that wraps Active Directory into Objects that live in an Objectlist, much like my Terminal Server class in the Jedi Windows Security Library.
One of the classes is TJwADUser that represents an Active Directory user with all kinds of properties. So while I was implementing them I stumbled upon the accountExpires attribute which is implemented as an 8 byte integer so I figured I could read it as Int64, cast this to TFileTime (FILETIME) and convert to TDateTime.
This raised an error however (EVariantTypeCastError with message ‘Could not convert variant of type (Dispatch) into type (Double)’.).
So I checked what kind of variant Active Directory returns and it is not the expected varInt64 but varDispatch.
It turns out that we need the IADsLargeInteger interface to obtain the correct values. The code below works for me:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | function TJwADUser.GetExpirationDate: TDateTime; var LargeInteger: IADsLargeInteger; ft: TFileTime; v: Variant; begin if Get('accountExpires', v) then begin LargeInteger := IDispatch(v) as IADsLargeInteger; ft.dwLowDateTime := LargeInteger.LowPart; ft.dwHighDateTime := LargeInteger.HighPart; if Int64(ft) = 0 then Result := 0 else Result := FileTime2DateTime(ft) end else begin Result := 0; end; end; |
Notes: The Get function is a wrapper for IADs(User).Get(Ex) so you can ignore that and my function returns 0 when the value is empty or on read failure.
The backup has been restored and all downloads should be working again. If you do find a non working download please leave a comment.
3 Dec // php the_time('Y') ?>
Yesterday I was troubleshooting why Workspace Control was not available on an HP t5540 (Windows CE) Thin Client. This was a Citrix Xenapp 5 environment on Server 2008. When logging in through the Web Interface from the Thin Client’s browser we noticed two things: Client Detection failed and the Reconnect and Disconnect buttons were not available: I looked into the files in the webinterface folder (wwwroot/Citrix/XenApp)and searched for workplace and reconnect. I determined that the Client Detection is done in the nativeClientDetect.js (app_data/clientDetection/clientscripts). But what I saw was very strange:
1 2 3 4 5 6 7 8 9 10 11 12 | // Detect whether ICA Client is available. <% if ((sClientInfo.osWinCE() && sClientInfo.isIE()) || sClientInfo.osSymbian() ) { %> // It is difficult to reliably detect processor type for WinCE and Symbian Devices // and therefore to choose the right flavour of the ICA client. // Also, it is not possible to simply download and install ICA client for some of these devices, // e.g. WBTs. Therefore, we assume that ICA client is always available. function detectNativeClient() { return true; } |
Most of the downloads are not working (error 404) at the moment, I am waiting for my hoster to restore some stuff from the backup so please be patient…
UPDATE: backup is restored and downloads are working again!
26 Nov // php the_time('Y') ?>
I never liked the new eventviewer that was introduced with Windows Vista. If you want to have the old eventviewer back (you can use the old and new one together) you need to follow the following steps:
It should look like this:
Doubleclicking an Event feels familiar as well:
25 Nov // php the_time('Y') ?>
Windows Vista introduced the Command Bar in Explorer which is sometimes also referred to as the Folder Band or the Task Band. The Command Bar is of course also present in Windows 7 and Server 2008 (R2).
This Command Bar shows possible tasks or actions depending on the active folder. I wanted to remove the “Uninstall or change a program” (in Dutch this is called “Een programma verwijderen of wijzigen”) button from the Computer view:
24 Nov // php the_time('Y') ?>
I needed to do a mass password change on imported accounts and decided to do this with Powershell. For some reason (maybe because I am using PowerShell 2.0) I got an unexpected error when using the Password property or the SetPassword method (RandomPassword is a function I wrote that generates Random passwords the meet the Complexity Requirements):
1 2 | $user.Password = RandomPassword $user.CommitChanges() |
17 Nov // php the_time('Y') ?>
I noticed that XenApp 5 Feature Pack comes with a new version of the Web Interface (5.2) (it is also available as standalone download). The parameters to install it in silent mode have changed but there’s no documentation at all on the Citrix Site:
This is more a note to self because I always forget. Explorer holds all it’s settings in memory so if you change a settings through the GUI (like in Folder Options) you cannot use a tool like Process Monitor to see what the corresponding registry entry is.
16 Nov // php the_time('Y') ?>
I needed to add a printer connection to a Citrix server but the problem was that this printer had a buggy driver. I wanted to use an alternative driver such as the Citrx Universal Printer driver but on Terminal Server you might want to use the Terminal Services Easy Print driver.
So I decided to make something that could be used in both situations, the result is a small commandline tool called AddPrinter2 (sorry I am not good in finding original names).
It takes 2 parameters: the printername as unc path and the driver name. An example would be:
AddPrinter2 “\\server\printer” “Citrix Universal Printer”.