Remko Weijnen's Blog (Remko's Blog)

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

Archive for December, 2010

Default Explorer View

As you probably know there are several different Folder Views in Windows Explorer:


The Explorer keeps tracks of the last used View per Folder in the registry in the key HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags. This KB article sort of desribes this functionality.


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.


International Karate+

A few weeks ago I turned on my old Commodore Amiga A1200 which had been stored for 15 years or so.

The idea was that my kids can use it as a game computer but tonight I couldn’t resist and I played some of the old games.

Do you remember International Karate+?


It’s still a very nice game to play with excellent gameplay even though it seems that my Suzo Arcade joystick has had it’s best time (Luckily I have a 2nd one somewhere but I can’t find it).

I also noticed there is an online flash based clone of International Karate+.

It’s not’s as good as the real thing especially in the gameplay but it’s done very well.

My favorite KB Article

The previous post reminded me of my all time favourite knowledge base article from Compaq titled: “Where do I find the “Any” key on my keyboard?

It’s still in

  • Filed under: General
  • Just had a good laugh while reading Microsoft KB article 2258090:

    When you try to copy a file that is larger than 2 GB over a Remote Desktop Services or a Terminal Services session through Clipboard Redirection (copy and paste) by using the RDP client 6.0 or a later version, the file is not copied. And, you do not receive an error message.

    Wow, did you ever (attempt to) copy such a large file in your Remote Desktop Session?

    Packaging an Application that uses the BDE

    Today I needed to package an application that uses the Borland Database Engine (BDE).

    The BDE is a database engine/connectivity component commonly used in Delphi and C++ Builder applications. It has been deprecated since 2000 when it was replaced by dbExpress.

    But it’s still widely used so you may still find applications that require the BDE.

    In my environment I already have a package for the BDE itsself. But the application I needed to package today, needs to have an Alias addded.

    This is usually done manually by going into the BDEADMIN control panel applet or by copying the file where BDE saves the aliases (IDAPI32.CFG).

    Here is a screenshot of the Alias my application needs (it uses an Interbase database):


    I didn’t like the copy approach and didn’t even consider the manual option so I wrote 2 little tools.


    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:


    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.


    Where is LSA_OBJECT_ATTRIBUTES defined?

    If you read MSDN documentation for LSA_OBJECT_ATTRIBUTES you will think it’s defined in LsaLookup.h:


    And that it’s supported since Windows 2000 but I couldn’t find it in this header file.

    Instead I found it in NTSecAPI.h, so I decided to check the different SDK versions and starting from SDK v7 LsaLookup.h exists but in earlier SDK’s (v5.0, v6.0a and v6.1) there is no LsaLookup.h.

    Last time I showed a User Defined Function to the Full Path of an Altiris Job given it’s id (event_id). Note that Altiris calls a Job an Event so the terms Event and Jobs are interchangeable here.

    To complete it we first need to prepend the server and share name to the path.

    I looked into the Altiris database tables to find the best place to get the servername and it seems that the hostname column of the mmsettings table is a good way.

    In my database there was only one row in the table but I restrict the results by adding top 1:

    Then I looked into the available tokens for one that returns a job id but we can only return a job name or a computer id. Since a job name is not unique I decided to use the computername and find the active job for this computer.

    When a Job is scheduled an entry is added to the event_schedule table. If you look into this table you will notice a column status_code which is NULL initially and when the job start it will get a value of -1 which indicates the job is active.

    When the job has finished the status will always be 0 or higher. (more…)

    Earlier I described a SQL Query to get the Full Path of an Altiris Job, today I will describe how we can make a User Defined Function (UDF) in SQL so we can call it easier.

    I am using an UDF because it allows us to specify parameters, in this case a single parameter (the EventId (or job id).

    This is the SQL that creates the UDF: