Remko Weijnen's Blog (Remko's Blog)

About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like


4,602 views

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:

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.

1,576 views

The backup has been restored and all downloads should be working again. If you do find a non working download please leave a comment.

  • 1 Comment
  • Filed under: Uncategorized
  • 5,162 views

    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: NoButtons 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:

    Read the rest of this entry »

  • 3 Comments
  • Filed under: Citrix
  • 1,424 views

    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!

    7,538 views

    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:

    1. Open a command prompt as Adminstrator.
    2. Type Regsvr32 els.dll (if you get error code 0x80070005 then you didn’t run as Administrator).
    3. Start mmc.exe and goto File | Add/Remove Snapin.
    4. From the available Snapins choose “Classic Event Viewer”.
    5. Right-Click Classic Event Viewer under Console Root and select New Window from Here.
    6. Choose Customize from the View menu.
    7. Deselect the Action Pane and Click OK
    8. Now save the file with a name of your choice eg EventVwrC.msc.

    It should look like this:

    EventVwrC

    Doubleclicking an Event feels familiar as well:

    EventProps

    18,447 views

    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).

    CommandBar

    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:

    CommandBarButton

    Read the rest of this entry »

    9,006 views

    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):

    Read the rest of this entry »

  • 2 Comments
  • Filed under: PowerShell
  • 4,139 views

    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:

    WIDocs

    Read the rest of this entry »

  • 2 Comments
  • Filed under: Altiris, Citrix
  • 2,014 views

    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.

    Read the rest of this entry »

    2,421 views

    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”.

    Read the rest of this entry »

    Blogroll


    Categories


    Archives