Remko Weijnen's Blog (Remko's Blog)

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


4,293 views

If you ever download software from Microsoft’s Volume Licensing Site you have probably seen that it uses the Akamai download manager. Sometimes your downloads get interrupted but how to restart the downloadmanager? There’s no entry in the startmenu and not even an icon on the desktop.

You can restart the downloadmanager though by creating a shortcut to “C:\Windows\DOWNLO~1\CONFLICT.1\Manager.exe”. Please notice the short directory name (~1).

  • 1 Comment
  • Filed under: General
  • 3,874 views

    Today I was deploying some IBM x3550 and x3650 servers with Altiris Deployment Server. IBM Delivers a toolkit for Altiris that contains amongst others jobs for configuring raid arrays.

    To do this you need to create a raid policy file and deploy this. I created this policy file:

    [Policy.RAID-1]

    AppliesTo.1 = t:ServeRAID-8k-l,d:4

    Array_Mode = CUSTOM
    Array.A = 1,2
    Array.B = 3,4

    Logical_Mode = CUSTOM
    Logical.1 = A:FILL:1
    Logical.2 = B:FILL:1

    As you can see the policy only applies to the type of array controller in my servers (t:ServeRAID-8k-l). This way we prevent applying the policy to other configurarions. I have a 4 disk configuration (d:4) and want to create to RAID 1 arrays (A & B). On each array one Logical drive with the maximum size (FILL parameter).

    Read the rest of this entry »

    25,611 views

    There are several patched terminal server dll’s floating around in the net to allow multiple concurrent Terminal Server session on Windows Vista with Service Pack 1. But they all have the same limitations:

    It’s not possible to start a session to Localhost, this is because the Terminal Server client does a check to see if you are running Personal Terminal Server (Vista/XP) and denies Localhost or 127.0.0.1 if true (127.0.0.2 works though).

    It’s not possible to start multiple sessions with the same user. The patch for Vista RTM did allow for this but in Service Pack 1 some Terminal Server code has moved to the Local Session Manager (lsm.exe) so we need to patch this file as well.

    Offcourse we need to patch Terminal Server to allow unlimited session on Vista as well.

    VPatch files are in the download link below.

    Vista SP1 Patches (7142 downloads)
    10,331 views

    A while ago I included a new undocumented API into my JwaWinsta unit which is called WinStationServerPing. This API “pings” a Terminal or Citrix server and verifies that Terminal Server is up and running. It is not the same as a regular networking ping! This API actually makes a connection to a (remote) Terminal Server and verifies that Terminal Server runs and accepts connections.

    I wrote a small cmdline tool that uses this API to ping a Terminal Server which can be used to quickly determine if a Terminal Server is up and running. I named it WTSPing.

    So how does it work? Open up a command prompt (Start -> Run -> cmd) and type WTSPing /? to see the help:

    Read the rest of this entry »

    14,276 views

    I needed a script to logoff all running Terminal Server sessions in order to rollout an install package. As you might know there is a commandline tool to logoff a session, it’s called logoff.exe.

    These are the commandline options:

    LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]

    sessionname The name of the session.
    sessionid The ID of the session.
    /SERVER:servername Specifies the Terminal server containing the user
    session to log off (default is current).
    /V Displays information about the actions performed.

    No option to logoff all sessions is there?

    On a Terminal Server there is a special session called the Listener session, you can see it with TSAdmin in the sessions tab:Listener

    A Listener is associated with a protocol (Microsoft RDP by default) and is used to setup new sessions. If you logoff a Listener session it will logoff all session that were created through it. Great, just what we need!

    So Logoff 65536 will do the trick? Let’s try:

    logoff

    So Logoff is smart enough to ask for confirmation, we can prevent this by using the following commandline:

    Echo Y ! Logoff 65536

    6,638 views

    Justin Shepard converted my code to encrypt RPD passwords to VB.NET:

    4,919 views

    Recently I needed to convert a C header file to Delphi which contained bitfields. Let’s take a look at a sample structure that contains bitfields:

    It means that there is a DWORD (Cardinal) dwValue1 followed by a bitfield with the size of a ULONG (32 bits). In this bitfield 4 values are defined (BitValue1..4) which are used as boolean’s because the value can offcourse be 0 or 1. Since Delphi doesn’t know a bitfield type the question is how to translate it. Usually it would mean that we simply treat the whole bitfield value as a ULONG and extract the required properties by applying a bitmask (shl/shr). Starting from BDS2006 we can define a record with propertes and use getters and setters. Using this technique we can present boolean values to the user:

    Code completion shows that the record has one DWORD Value and 4 Boolean Values which is just what we want!
    CodeCompletion

    Offcourse we need to implement the Getters and Setters:

    We can even add a constructor to it, this can be used to e.g. initialize the record (in the example below we fill with zeroes). Note that only a constructor with at least one argument can be used:

    So why not use a class instead of record? The answer is that a class is just a pointer we can never pass this to a function, procedure or api call that expects a record. But if we want to support older Delphi versions, like Delphi 6 or Delphi 7 and even Delphi 2005, which are still used a lot we need to find another solution. I came up with (ab)using sets to emulate bitfields, we can do this because a set is actually a set of bits (limited to 256 bits). The example structure could look like this if we use sets:

    We can use normal set operations to get and set bitvalues:

    Settings like minimal enum size and record alignment are important because we need to asssure that te record size matches the C structure’s size (especially when using structures with a lot of bitfields. I choose to do this with a litte trick, first I declare some constants:

    We use these constants to force the correct size, in the example the bitfield was a ULONG which is 32 bits. We add the al32Bit constant to the bitfield:

    So I thought I had it figured out… until I came to this line in the C header file:

    So we have a bitfield consisting off multiple bits! This gave me some headaches but I finally came up with the following approach

    We need a helper function to retreive the numeric value of ColorDepth:

    The helper function is used like this:

    Some limitations remain, although I don’t think you are likely to encouter these:

    • A Delphi Set can contain at most 256 values.
    • The ValueFromBitSet function returns an Int64, so values that do not fit in an Int64 cannot be returned.
    • Values in a Set need a unique name.
    3,000 views

    Vijayshinva Karnure wrote a very cool article about running Server 2008 as a desktop os or rather as a Windows Vista replacement. It seems that besides additional features like Hyper-V, Server 2008 runs approx. 20% faster than Vista.

    If only upgrading Vista to Server 2008 would be possible… (has anyone ever tried)?

    Links:

    http://blogs.msdn.com/vijaysk/archive/2008/02/11/using-windows-server-2008-as-a-super-desktop-os.aspx

    http://vista.blorge.com/2008/03/11/windows-server-2008-is-20-faster-than-vista/

    7,696 views

    Open Server Manager and in the Security Information tab click Configure IE ESC. An improvement in Server 2008 is that you can disable it for Administators but enable it for Normal Users, this is nice for Terminal Server and Citrix environments.

    Internet Explorer Enhanced Security Configuration

  • 5 Comments
  • Filed under: Windows 2008
  • 9,644 views

    Even though Powershell is included with Windows Server 2008 it’s not installed by default. You can do this in Server Manager by going to Features and then Click Add Features in the Tasks bar on the right. Select Windows Powershell in the list and there you go!

  • 1 Comment
  • Filed under: Windows 2008
  • Blogroll


    Categories


    Archives