Remko Weijnen's Blog (Remko's Blog)

About Terminal Server, Citrix, Delphi and other stuff


1,592 views

Today I can proudly announce the official release of SasLibEx 2.0 which will bring support for new compilers, a native x64 version and some exciting new features!

New Compilers:

SasLibEx 2.0 introduces support for Visual Studio 2010 (C++), RAD Studio 2010 (Delphi and C++ personalities) and the new RAD Studio XE (Delphi and C++).

Native x64:

A separate native x64 version is available for Visual Studio 2005, 2008 or 2010 (C++).

New Features:

SasLibEx 2.0 introduces new unique features, the most important ones being:

  • New method to simulate the Secure Attention Sequence (SAS aka Ctrl-Alt-Del) with only user permissions.
  • New Switch console function to reconnect closed RDP sessions for remote control.
  • SasLibEx could already Lock and Unlock (without credentials) the Desktop, now there is also a function to determine if a Desktop or Session is Locked.
  • Log off any session from a service.
  • Retrieve the user’s name from a service.

Just like the old features, the new features do not require User Account Control to be enabled, nor does it require signing your executables.

If you would like to know more, upgrade or order please contact me using the Contact Form or directly by e-mail:

mail

If you didn’t read before about SasLibEx and what it can do please read my earlier posts about it.

1,022 views

Certified

Just a quicky, I am little excited because my certifications are going well.

Last month I passed the final exam for MCITP Enterprise Administrator and a few minutes agoI got a mail from Citrix confirming that I passed the beta exam for XenApp 6 which means I am certified (CCA for XenApp 6).

I may now call myself: MCITP Enterprise Administrator, MCSE and MCSA + Messaging, MCDBA and CCA :P

3,016 views

I have written a small commandline tool that shows the Active Directory Property Sheet for a given account.

The Property sheet is what you get when you doubleclick an object in Active Directory & Computers. Basically this tool is meant to make it easy to quickly view or change properties without needing to start a GUI tool and looking up the account in the AD Tree.
Read the rest of this entry »

1,163 views

After launching the newly installed RAD Studio XE for the first time it tried to install something. This failed because I didn’t run it elevated which makes Windows 7 fire the Program Compatibility Assistant:

RadStudioXECompat

It would be better for Embarcadero to detect if we run elevated and only run the installer when we are (or request elevation).

Maybe it’s time for Embarcadero to use Jwscl which make such things very easy?

  • 0 Comments
  • Filed under: Delphi
  • 1,538 views

    Just noticed this is my Start Menu after installing RAD Studio XE:

    DelphiXEStartMenu

    Luckily Clicking Delphi XE launches 2010…

  • 2 Comments
  • Filed under: Delphi
  • 735 views

    RAD Studio XE has (just?) been released, see http://www.embarcadero.com/rad-studio-xe-preview

    1,421 views

    While browsing through my old projects folder I found a little commandline tool that I wrote about a year ago. I needed to detect a certain published application on a Citrix environment in the loginscript.

    The tool detect the current Citrix published applicationname or if you are running Terminal Server aka Remote Desktop Services the Initial Program name and stores this in an environment variable (APPNAME).

    There are no parameters and there are no special dependancies (such as MFCom).

    CtxPubApp (181)
  • 2 Comments
  • Filed under: Citrix
  • 745 views

    I have installed a new rating plugin that gives you, my readers, a convenient and fast method to give feedback. So please do so, let me know what posts you find interesting!

    I have also added a Contact form in case you have any questions, article suggestions or maybe even consultation requests. The contact page is an attempt to streamline the e-mails I get from this blog so I hope this will work :-)

    1,392 views

    Fun with asm

    Today just some fun stuff with ASM, probably not the most recommended way to do things but for sure the most geeky way :P

    Get the Current Session Id:

    function GetCurrentSessionId: DWORD;
    asm
      mov     eax,fs:[$00000018];   // Get TEB
      mov     eax,[eax+$30];        // PPEB
      mov     eax,[eax+$1d4];       // PEB.SessionId
    end;
     

    Get the Current Console Session Id:

    function GetConsoleSessionId: DWORD;
    asm
      mov eax, [$7ffe02d8];
    end;

    And… if we can read it we can also write it?

    procedure SetCurrentSessionId(const SessionId: DWORD);
    asm
      mov     edx,fs:[$00000018];
      mov     edx,[edx+$30];
      mov     [edx+$1d4], SessionId;
    end;

    and

    procedure SetConsoleSessionId(const SessionId: DWORD);
    var
      p: PDWORD;
      OldProtect: DWORD;
    begin
      p := PDWORD($7ffe02d8);
      Win32Check(VirtualProtect(p, SizeOf(p), PAGE_READWRITE, @OldProtect));
      p^ := SessionId;
      Win32Check(VirtualProtect(p, SizeOf(p), OldProtect, @OldProtect));
    end;

    You can safely try it since it of course affects the current process only, so don’t worry.

    And perhaps more usefull

    procedure SetIsDebuggerPresent(const Value: Boolean);
    asm
      mov edx,fs:[$00000018];     // TEB
      mov edx, [edx+$30];         // PPEB
      mov byte ptr[edx+2], Value; // +0×002 BeingDebugged    : UChar
    end;
     
    1,813 views

    I needed to obtain the Fully Qualified Domain Name (FQDN) for a given NetBios domain name. Eg from MYDOMAIN to dc=mydomain,dc=local.

    I did some tests with the TranslateName API and if you append a \ to the domain name it returns the FQDN.

    Here is a short example:

    Read the rest of this entry »