Remko Weijnen's Blog (Remko's Blog)

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

Archive for the ‘script’ Category

Scriptable Citrix Password Encoder

A while ago I published a tool to Encode and Decode Citrix passwords. Today I am publishing a small update to this tool that makes it scriptable by adding a COM interface.

If you start the tool without parameters you will get the GUI, just like before:

Encrypt | Decrypt Password | Hash | Citrix | Ctx1

To use the COM interface you first need to register the executable with the /regserver switch:

CtxPass /RegServer

After the registration you can call it using any language that supports COM. To get you started I wrote a few examples

(more…)

MSCOMM32.OCX returns error 80040112

Yesterday I wrote about troubleshooting an application that used Com Port redirection in Citrix.

During the troubleshoot I noticed that the application used an ActiveX component, MSCOMM32.OCX, for serial communication.

I wanted to quickly test if the component was correctly registered so I searched the registry from HKEY_CLASSES_ROOT for mscomm32.ocx.

(more…)

Switching to the Services Session

Just read a tweet from @andyjmorgan about Interactive Service Detection. This made me remember that it’s possible to switch to the Session 0 with an undocumented api in winsta.dll.

For this API to work you must have the Interactive Services Detection (UI0Detect) service running.

(more…)

Script to Get Computer OU

Just some quick code to get the OU Name of the computer we run the script on.

VBS:

PowerShell:

Get the location of an advertised shortcut

Installers can create so called Advertised Shortcuts in the Start Menu. I wanted to check the Target Path of such an shortcut but Explorer doesn’t show it:

Microsoft Visio 2010 Properties | Shortcut Properties | Target Path

(more…)

  • 1 Comment
  • Filed under: script
  • imageI was testing a Script I wrote to launch a Citrix XenApp session using the Ica Client Object. Typical code to do this may look like this:

    On my testmachine it ran nicely but on a customer machine the script failed with the error 2312 “The Citrix online plug-in received a corrupt ICA File. The ICA File has no [ApplicationServer] section“:

    The Citrix online plug-in received a corrupt ICA File. The ICA File has no [ApplicationServer] section

    (more…)

  • 0 Comments
  • Filed under: Citrix, script
  • Embedding images in HTML

    I was creating a small dialog in an .hta file and to make a little prettier for the user I included a company logo:

    SNAGHTMLdfa805

    But I wanted to deploy the .hta as a single file.

    (more…)

    Remote Registry from 32 to 64 bit

    imageYesterday I needed to set a few registry keys remotely from a 32 bit windows machine to a 64 bit machine.

    I used reg.exe to set the key but even though it returned success the key wasn’t altered.

    As I suspected the key was written to the Wow6432Node. In the help I couldn’t find any switch to force reg.exe to use the 64-bit view.

    On a 64 bit machine this is not a problem since both 32- and 64 bit versions of reg.exe exists. The 32 bit version of reg.exe defaults to the 32 bit view and the 64 bit version defaults to the 64 bit view.

    But luckily reg.exe has a switch (that is not listed in the help) to force the View:

    Apply IP Configuration from a Database

    I am currently deploying 64 Citrix XenApp servers with Altiris. The deployment consists of an OS Image, OS Configuration and finally Citrix XenApp and Applications.

    In the OS Configuration part the IP configuration needs to be applied and I decided to do this with a database.

    The database consists of 2 tables; one table with the per host settings and one table with the global settings (such as DNS).

    In the Altiris job both tables are read from an embedded VBScript and assigned to the NIC.

    Database configuration

    I created a database (SQL Server) called IPManagement with 2 tables:

    image

     

    (more…)

    As you may know, Fast User Switching (FUS) is not available (disabled) on Windows XP computers joined to a domain, Microsoft confirms this in kb280758.

    However, Microsoft doesn’t tell us there’s an undocumented registry value that allows us to have FUS when joined to a domain!

    To enable FUS you need to set the DWORD registry value HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\ForceFriendlyUI.

    It can also be set by Group Policy at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.

    When the value is set to 1, and LogonType key is also set to 1, it allows you to use a Friendly UI on a computer joined in a domain:
    (more…)

    Donate


    Blogroll


    Categories


    Archives