Remko Weijnen's Blog (Remko's Blog)

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

Archive for the ‘Altiris’ Category

Default User Profile: Remko’s solution

If you are implementing a Citrix, Terminal Server or even just a plain Client-Server environment you will need to create a Default User Profile at some point.

The Default User Profile can be thought of as the initial registry settings that are used when a new profile is created.

Many people think that the Default User Profile is available in regedit via HKEY_USERS\.Default but this is NOT the Default User Profile.

UsersDefault

(more…)

Unattended Installation of the Oracle Client

Last week I needed to an unattended installation of the Oracle Client, in my case version 10.2.0.1.0.

Oracle has a record switch that allows you to record an installation and generate a response file using: setup -record -destinationFile response_file_name. This is documented here.

When you are finished you can use this response file to perform the unattended install, eg setup -silent -responseFile response_file_name.

There is a problem though, the installer (setup.exe) launches a java based installer and immediately returns.

This was a problem for me since I cannot deploy a dependant application if the Oracle install hasn’t finished yet.

I did some googling and found a lot of questions about this subject and saw a common resolution where a script is watching a certain file that is creating when the installation has finished in a loop.

I figured there should be a better wait so I to a closer look at the installer with Ida Pro. I noticed that setup.exe launches another exe. called oui.exe (Oracle Universal Installer) which in turn launches Java.

(more…)

Today I needed to script the installation of IBM System i Access for Windows (formerly called IBM Client Access).

With older versions of this client (up to 5.4) you could use the -r (record) installer switch to record the install in a setup.iss file but version 6.1 uses an MSI based installer.

IBM offers the client in a 2 DVD download but you probably only need the first dvd (dvd 1 has both the x86 and x64 installers, dvd 2 has the ia64 installer) which is a whopping 3,5 GB download.

Inside the download (a zip) is an iso file of which you will only need the files in the root and the Image32 or Image64a folder.

Inside the image folder are subfolders names MRI29xx where xx is a language identifier:

The following Identifiers are used: (more…)

  • 1 Comment
  • Filed under: Altiris, script
  • Master Return codes in Altiris

    Altiris offers a Master Return code, a very usefull feature that is not used often I think. In this article I will explain why I find them usefull and we will implement a Master Return code for Installations that require a reboot.

    A Master Return code can be consired as a Global Action handler, whenever a job returns a specific error/return/result code this Global handler will be called (unless you override it in the job with another action).

    A perfect usage for a Global Action handler is installing MSI files that need I reboot. If you do nothing the system will be rebooted after the successfull installation and your job will return as failed with error 3010.

    Microsoft documents that 3010 means ERROR_SUCCESS_REBOOT_REQUIRED: A restart is required to complete the install. This message is indicative of a success.

    To prevent the reboot we can pass REBOOT=ReallySurpress to the MSI but we still need to indicate to Altirs that 3010 actually means Success and that we need to reboot.

    (more…)

  • 2 Comments
  • Filed under: Altiris
  • After doing an unattended installation of the Citrix Online Plugin it was not possible to launch a Published Application.

    It would just give the error mesage: “citrix online plugin could not launch the requested published application”.

    Even though the installation finished without errors and the logfiles indicated no failure at all I was able to fix it by using 2 steps described in CTX123761.

    First install the Microsoft Visual C++ 2005 Redistributable Package SP1 and the (re)deploy the Online Plugin adding a Transform called transform_notstrict.mst which can be found in the aforementioned KB Article.

  • 0 Comments
  • Filed under: Altiris, Citrix
  • 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):

    BDE

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

    (more…)

    I usually change the text below the “This Computer” icon to reflect the current username and servername:

    UserOnComputer

    This is an ancient trick, just set the the LocalizedString Value of the following key:

    to “%USERNAME% on %COMPUTERNAME%”.

    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.

    (more…)

    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:

    (more…)

    I wanted to query the full path name of an Altiris Job, this sounds easier that it is though.

    Consider the following hierarchy:

    Tree

    Now I want to assemble the full Path, in this case: RPA\Getronics\PKG_p007.Citrix_Components.

    (more…)

    Blogroll


    Categories


    Archives