Richard Parmiter

Virtualisation blog and Knowledge Base

  • You are here: 
  • Home
  • script

Profiling Adobe Acrobat Reader 9.2

Posted on October 21st, 2009

In order to profile Adobe Acrobat Reader 9.2 for Citrix streaming I did the following.

Stage 1 – Download source files

Download and install the Adobe Customization wizard 9

Download the distribution version of Acrobat reader 9.2. You need to register on the adobe site to get access to this download.

Extract the msi from the .exe that was downloaded by running the following

AdbeRdr920_en_US.exe” -nos_ne -nos_o”Extracted”

This will place the extracted files in the “Extracted” folder

Stage 2 – Create a customised installation

Open the customization wizard

Open the Reader msi (extracted above)

Select the options desired. I chose the following:

Supress display of EULA

Remove acrobat.com features

disbale all updates

disable help | Digital editions

Disable product improvement programs

Disable help | Purchase acrobat

Save the customisation MST file

Stage 3 – install

Create a .cmd file that contains the install string including the MST file. For example:

msiexec /i “acroread.msi” TRANSFORMS=”adobe_9_2_transform.MST”

Launch this .cmd file from the Citrix Streaming Profiler

Install as normal

Stage 4 – Add a pre-launch script

Even though the option to disable updates was selected during the customisation wizard, it is not disabled when streaming the app. The same applies to the customer improvment program.

The best way to remove these is to run a pre-launch script to set the reg keys to remove these options.

Create a .vbs script with the following contents

Set objWshShell = CreateObject(“WScript.Shell”)
objWshShell.RegWrite “HKLM\Software\Adobe\Adobe ARM\1.0\ARM\iCheck”, 0 ,”REG_DWORD”
objWshShell.RegWrite “HKCU\Software\Adobe\CommonFiles\Usage\Reader 9\OptIn”, 0 ,”REG_DWORD”

Call this script as a pre-launch script within the streaming profiler.

..

Tags: , , , , , , , ,
Filed under Citrix XenApp, Scripts/Reg | No Comments »

Script variable trimming

Posted on May 8th, 2009

Suppose you are trying to run some scripts based on a command line variable, but the variable being passed to it is surrounded by quote marks.

i.e. “device_name” when all i want is device_name

There is an easy way to trim this. In the script need to set this passed variable to a seperate variable, and then trim it byt doing the following:

SET tempvariable=%1                 (need to set %%1 if its run as a script file)

echo %1                                      (will show “device_name”)

echo %tempvariable%                 (will show “device_name”)

echo %tempvariable:~1,-1%       (will show device_name)

The trimmed variable can then be used for another task, i.e. to start a service on a remote server

sc \\%tempvariable:~1,-1% start “ServiceName”

Happy trimming!

Tags: , , , , , , , , , , ,
Filed under Scripts/Reg | 1 Comment »

Script to export all the servers in a Citrix Farm

Posted on April 27th, 2009

Sometimes it is useful to have a list of servers in a text file in order to perform some other task. The following script will export all servers from a Citrix Farm and add them to a text file.

This script uses the built in Citrix tool, qfarm, and cleans up the output to provide the required list. It uses a temporary file (qfarmservers.txt) during the process and deletes it at the end.

REM ***************************************************
REM qfarmservers  = output from a qfarm /servers
REM serverlist    = cleaned up list of all servers in farm
REM ***************************************************

SET qfarmservers=c:\windows\temp\qfarmservers.txt
SET serverlist=c:\windows\temp\serverlist.txt

qfarm /servers >>%qfarmServers%
for /f “skip=3 tokens=1″ %%1 in (%qfarmservers%) do (
echo %%1 >> %serverlist%
)
Del %qfarmservers% /q

Just change the log file location(s) as required.

Tags: , , , , , , , , ,
Filed under Scripts/Reg | 1 Comment »

How to export the users of an AD Group.

Posted on January 23rd, 2009

This is the best and fastest way to export all users who are members of a group

dsquery group “CN=Group Name,OU=OU Location,DC=Domain Name,DC=local” | dsget group -members | dsget user -samid -c >>c:\windows\temp\groupmembers.txt

If there are nested groups it might fail with the following error message:

The object class of the target does not match the one specified on the command line.

This error is removed by adding the -c variable as this continues despite the error.

Tags: , , , , , ,
Filed under Scripts/Reg | No Comments »

How to: Only map a drive if the server is up

Posted on September 1st, 2008

Logon scripts can be used to map drives for users. The general rule of thumb is to script in either vbs/kix/cmd files and first delete an existing mapping on the specified drive letter and map the drive as shown:

net use P: /delete

net use P: \\server.fqdn.local\share

There can be a delay in the logon time if this server doesn’t exist or is down for whatever reason. If there are many drive mappings during the logon process the delay can be substancial. To get round this problem a script can be run to only map a drive letter if the server is up.

This script is for a dos based cmd script although the same principle can be used for the other scripting technologies. The general process would take:

  • Ping the server (once or more if needed)
  • Save the ping results to a file (e.g. ping.txt)
  • search the file for ‘request timed out)
  • only map the drive if this doesn’t exist
  • delete the temporary ping.txt file.

Command file

@echo off
net use p: /delete
ping server.fqdn.local -n 1 > z:\citrix\ping.txt
findstr “Request timed out” z:\citrix\ping.txt
IF ERRORLEVEL 1 net use P: “\\server.fqdn.local\share”
del z:\citrix\ping.txt

Kix version (doesn’t require a temporary file)

Shell ‘%comspec% /c ping server.fqdn.local -n 1 | find “TTL” > nul’
If not @ERROR
? “Ping reply was good”
use P: “\\server.fqdn.local\share”
Else
? “Ping reply was bad”
EndIf

Tags: , , , ,
Filed under Scripts/Reg | No Comments »

Ads

Ads