<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Roberto Alves</title>
	<atom:link href="http://robertoalves.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://robertoalves.com</link>
	<description>Scripting and server based computing</description>
	<lastBuildDate>Mon, 09 Apr 2012 21:36:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Re-enable toolbars in Excel 2003</title>
		<link>http://robertoalves.com/?p=203</link>
		<comments>http://robertoalves.com/?p=203#comments</comments>
		<pubDate>Wed, 11 Mar 2009 17:05:04 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[spotlight]]></category>
		<category><![CDATA[vbs]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=203</guid>
		<description><![CDATA[Sometimes you can be very surprised with the amount of irresponsible people doing some code as vbs scripts, programs or even simple excel macros that can negatively affect production environments. Last week I got a very simple problem, that can be frustrating for a user. Some external partner of my company created a Excel spreadsheet [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you can be very surprised with the amount of irresponsible people doing some code as vbs scripts, programs or even simple excel macros that can negatively affect production environments.</p>
<p>Last week I got a very simple problem, that can be frustrating for a user. Some external partner of my company created a Excel spreadsheet with a macro that disable all toolbars and hide Excel menus. Basically, the macro cleans all Excel screen, transforming the spreadsheet into something similar to a Visual Basic program.<br />
<span id="more-203"></span><br />
But after use this spreadsheet, all users start to report a problem with other Excel spreadsheets. All Excel toolbars disappeared. It means that the macro modification was made by a spreadsheet and saved the last Excel status in Windows profile.</p>
<p>In this case, I was forced into create a new Excel 2003 file with a macro to do the opposite, re-enabling all toolbars and menus again.</p>
<p>It is very simple:</p>
<ol>
<li>Create a new blank  Excel spreadsheet.</li>
<li>Go to Tools &#8211; Macro &#8211; Visual Basic Editor</li>
<li>On your left side, in the Project panel, you need select <strong>ThisWorkbook</strong></li>
<li>In the left combo box you need select Workbook</li>
<li>In the right combo box you need select Open</li>
<li>Will appear the function that runs when this spreadsheet is opened</li>
<li>Copy and paste inside the function the code below:<br />
<blockquote><p>On Error Resume Next<br />
Application.CommandBars(&#8220;Worksheet Menu Bar&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Standard&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Standard&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Cell&#8221;).Enabled = True<br />
Application.DisplayFormulaBar = True<br />
Application.DisplayStatusBar = True<br />
Application.CommandBars(&#8220;Toolbar List&#8221;).Enabled = True<br />
Application.DisplayFormulaBar = True<br />
ActiveWindow.DisplayHeadings = True<br />
Application.DisplayStatusBar = True<br />
ActiveWindow.DisplayHorizontalScrollBar = True<br />
ActiveWindow.DisplayVerticalScrollBar = True<br />
ActiveWindow.DisplayWorkbookTabs = True<br />
Application.CommandBars(&#8220;Standard&#8221;).Visible = True<br />
Application.CommandBars(&#8220;Formatting&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Formatting&#8221;).Visible = True<br />
Application.CommandBars(&#8220;Chart&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Forms&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Web&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Reviewing&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Visual Basic&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Drawing&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;web&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Picture&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;PivotTable&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;CELL&#8221;).Enabled = True<br />
Application.CommandBars(&#8220;Visual Basic&#8221;).Enabled = True</p></blockquote>
</li>
<li>Save the spreadsheet with any name</li>
<li>Ask to users open yours spreadsheet to solve the problem</li>
</ol>
<p>Below you can see the Visual Basic macro editor after all configuration.</p>
<p><img class="alignnone size-full wp-image-205" title="excel_enable_toobars1" src="http://www.robertoalves.com/wp-content/uploads/2009/03/excel_enable_toobars1.jpg" alt="excel_enable_toobars1" width="616" height="522" /></p>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=203</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Easily running commands in all servers/workstations</title>
		<link>http://robertoalves.com/?p=201</link>
		<comments>http://robertoalves.com/?p=201#comments</comments>
		<pubDate>Thu, 05 Mar 2009 09:54:09 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[wscript.shell]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=201</guid>
		<description><![CDATA[Sometimes we are diving into so many tools, products, technologies, etc that we forgot simple and old tools that can save the day or at least save a good time. I will give as example the Sysinternals psexec, that is very useful to run remote commands. Let&#8217;s imagine that you need force a policy update [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we are diving into so many tools, products, technologies, etc that we forgot simple and old tools that can save the day or at least save a good time. I will give as example the Sysinternals psexec, that is very useful to run remote commands.</p>
<p>Let&#8217;s imagine that you need force a policy update in all servers or workstations. May be, your first thought can be:  <em>&#8220;I can create a script that reads a file with a list of servers/workstations, after read the file, the script can run processes using a WScript.Shell object. After ran the process in each server the script can get a result and save a file with the task results.&#8221;</em> Of course that this script will take some time to write and probably will have some dozens of code lines.</p>
<p>Or, you can do the same task just with one line of command.<br />
<span id="more-201"></span><br />
<strong>psexec @servers.txt c:windowssystem32gpupdate.exe /force &gt; result.txt</strong></p>
<p>Yes! Psexec can read a text file with a list of machines and run the command in all machines, simplifying your life and to save the results, you can use our  old ms-dos technique: &#8220;&gt;&#8221;</p>
<p>Additionally, Psexec offers other some great features like run the process interacting with the machine desktop, or timeouts between each machine, or run as System, or even define what processor you want to run the process.</p>
<p><a href="http://www.sysinternals.com" target="_blank">www.sysinternals.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=201</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.vbs script to restrict access only from internet to Citrix XenApp or TS servers</title>
		<link>http://robertoalves.com/?p=194</link>
		<comments>http://robertoalves.com/?p=194#comments</comments>
		<pubDate>Thu, 26 Feb 2009 17:35:51 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Metaframe]]></category>
		<category><![CDATA[Presentation Server]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[terminal services]]></category>
		<category><![CDATA[vbs]]></category>
		<category><![CDATA[wscript.shell]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=194</guid>
		<description><![CDATA[This vbs script consist into two verifications to restrict access of users from internet in Citrix XenApp (Presentation Server/Metaframe) servers or Terminal Services, to be included in the session initialization. The idea of this script allow access from users from Internet just if they are in a specific Active Directory group. In the first verification, [...]]]></description>
			<content:encoded><![CDATA[<p>This vbs script consist into two verifications to restrict access of users from internet in Citrix XenApp (Presentation Server/Metaframe) servers or Terminal Services, to be included in the session initialization. The idea of this script allow access from users from Internet just if they are in a specific Active Directory group.</p>
<p>In the first verification, the script checks if the current user belongs to a group called &#8220;Remote Workers. If yes, the script jumps to the end. If no, the script goes to the second verification.<br />
<span id="more-194"></span><br />
The second verification sees if is possible to ping the user workstation from the server. If the ping replies, means that the user is using the local network, then the script jumps to the end. If the ping doesn&#8217;t reply, the script will understand that the user is trying to access from internet, them he will be logged off from the server.</p>
<p>See the flow below to see better how this script works:</p>
<p><img src="file:///C:/DOCUME~1/ralves.UK/LOCALS~1/Temp/moz-screenshot-7.jpg" alt="" /></p>
<p><img class="alignnone size-full wp-image-196" title="login" src="http://www.robertoalves.com/wp-content/uploads/2009/02/login.jpg" alt="login" width="326" height="443" /></p>
<p>And follow the script bellow:</p>
<blockquote><p>On Error Resume Next</p>
<p>Dim group_validation, target, ping_result</p>
<p>Set objNetwork = CreateObject(&#8220;WScript.Network&#8221;)<br />
set objShell = CreateObject(&#8220;WScript.Shell&#8221;)<br />
Set objUser = GetObject(&#8220;WinNT://&#8221; &amp; objNetwork.UserDomain &amp; &#8220;/&#8221; &amp; objNetwork.UserName)</p>
<p>group_validation = false</p>
<p>For each oGroup in objUser.Groups<br />
if instr(oGroup.Name,&#8221;Remote Workers&#8221;) then group_validation = true<br />
Next</p>
<p>If group_validation = false then<br />
strTarget = objShell.ExpandEnvironmentStrings(&#8220;%ClientName%&#8221;)<br />
Set objExec = objShell.Exec(&#8220;ping -n 2 -w 1000 &#8221; &amp; strTarget)<br />
ping_result = LCase(objExec.StdOut.ReadAll)</p>
<p>If InStr(ping_result, &#8220;reply from&#8221;)=0 Then<br />
msgbox &#8220;Access denied&#8221;<br />
objShell.run(&#8220;logoff&#8221;)<br />
End if<br />
End If</p>
<p>&#8216;msgbox &#8220;done&#8221;</p></blockquote>
<p>Things to consider when you are going to use this script:</p>
<ul>
<li>In my tests, the command logoff didn&#8217;t work in the login script. Worked just calling the script from the usrlogon.cmd file. You need just add a line like in the file: wscript [path][script_name.vbs]</li>
<li>Ping will not work if servers can&#8217;t resolve names though wins or dns.</li>
<li>You need disable session reconnection or use this script with the tool ReconnAct! to ensure that reconnected sessions will be verified.</li>
<li>If you deploy Citrix to your users only through Web Interface/Secure Gateway, then you can find a better solution in <a href="http://www.thomaskoetzing.de" target="_blank">www.thomaskoetzing.de</a>.</li>
<li>Don&#8217;t put in production before validate very well.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=194</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple and better solution to redirect local drives in XenApp sessions</title>
		<link>http://robertoalves.com/?p=187</link>
		<comments>http://robertoalves.com/?p=187#comments</comments>
		<pubDate>Fri, 30 Jan 2009 17:04:01 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[terminal services]]></category>
		<category><![CDATA[vbs]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=187</guid>
		<description><![CDATA[ICA or RDP are not the best protocols to copy files between DataCentres and remote workstations. But, some times is very difficult to implement a different solution to provide access to users local files from Citrix XenApp or Terminal Services, and even if the idea was rejected in the design of your environment, one day [...]]]></description>
			<content:encoded><![CDATA[<p>ICA or RDP are not the best protocols to copy files between DataCentres and remote workstations. But, some times is very difficult to implement a different solution to provide access to users local files from Citrix XenApp or Terminal Services, and even if the idea was rejected in the design of your environment, one day you will be faced with this problem and may be your easiest and better option will be enable redirection from local drives to remote sessions.</p>
<p>Well, you can select if you want map/redirect floppy disks, cd roms, remote drives or local drives. If you are worried with the impact of this configuration in the logon time of your users, probably you will enable just the redirection for local drives and unfortunatelly you will consider that many users can have more than one local drive and this can affect their logon.<br />
<span id="more-187"></span><br />
But, you still can have problems. Let&#8217;s say that your company has a policy to prevent users to access their local C: drives. Enabling the redirection, the C: drive will appear in the remote session and users will be free to do what they want with these drives.</p>
<p>Maybe the best solution can be just redirect one drive. But how to do the redirection of just one local drive if users can have many others?</p>
<p>Simple:</p>
<p>1. Create a policy disabling the drive connection at logon</p>
<p><img class="alignnone size-medium wp-image-188" title="redirect_drives1" src="http://www.robertoalves.com/wp-content/uploads/2009/01/redirect_drives1-300x228.jpg" alt="redirect_drives1" width="300" height="228" /></p>
<p>2.  And in this policy, enable just the local drives mapping</p>
<p><img class="alignnone size-medium wp-image-189" title="redirect_drives2" src="http://www.robertoalves.com/wp-content/uploads/2009/01/redirect_drives2-300x228.jpg" alt="redirect_drives2" width="300" height="228" /></p>
<p>Now, users will have a connection to their local drives but the redirected drive will not be created. If you check at Windows Explorer &#8211; My Network Places &#8211; Client you will see the resource available for connection.</p>
<p>3. Include in your login script, some code to map the drive, like this below in .vbs:</p>
<blockquote><p>Set oNet = WScript.CreateObject(&#8220;WScript.Network&#8221;)<br />
Set objShell = CreateObject(&#8220;Shell.Application&#8221;)<br />
onet.MapNetworkDrive &#8220;D:&#8221;, &#8220;\clientd$&#8221;, True<br />
objShell.NameSpace(&#8220;D:&#8221;).Self.Name = &#8220;Files on my PC&#8221;</p></blockquote>
<p>or like this in .bat:</p>
<blockquote><p>net use d: \clientd$</p></blockquote>
<p>In both case,  I redirected the local D: drive to a mapped D: drive in the XenApp server. Of course that the D: drive must to be NOT in use on XenApp servers. I used D: to create a standard of all users store their files in D: drive of their machines, and they will see the same letter in Citrix sessions.</p>
<p>The result? Just one drive redirected to local resources (D:).</p>
<p><img class="alignnone size-medium wp-image-190" title="redirect_drives3" src="http://www.robertoalves.com/wp-content/uploads/2009/01/redirect_drives3-300x117.jpg" alt="redirect_drives3" width="300" height="117" /></p>
<p>If users want copy files from any media (USB, CD ROM, Cameras, etc) to Citrix they need copy to D: local drive and then copy from D: to Citrix session drives. Sometimes can be a little confusing, but can ensure to me a reliable environment, without users complaining that they can&#8217;t see cameras or usb stick on their sessions due errors or inapropriate logoff/logons and ensure to me that all users spend the same time to map local drives, without affect logon time.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=187</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Citrix FastLaunch a good option to improve logon time of Citrix XenApp sessions?</title>
		<link>http://robertoalves.com/?p=183</link>
		<comments>http://robertoalves.com/?p=183#comments</comments>
		<pubDate>Fri, 30 Jan 2009 15:43:32 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=183</guid>
		<description><![CDATA[In this month Citrix released a new utility called FastLaunch. This is not a official supported utility or even a tech preview. It is just a very small utility made by IT guys in Citrix to &#8220;hold&#8221; Citrix sessions, providing to users reconnect their sessions every time, instead to logon again. This tool was created [...]]]></description>
			<content:encoded><![CDATA[<p>In this month Citrix released a new utility called FastLaunch. This is not a official supported utility or even a tech preview. It is just a very small utility made by IT guys in Citrix to &#8220;hold&#8221; Citrix sessions, providing to users reconnect their sessions every time, instead to logon again.</p>
<p>This tool was created some time ago and Citrix didn&#8217;t made available because they faces a interesting problem caused by the community involvement. Someone shows the utility in a Citrix event, then other one put a video in internet talking about the utility, and a lot of people become to ask for downloads or to Citrix include the utility in XenApp.</p>
<p>But, the &#8220;magic&#8221; utility is not a dream for almost Citrix administrators pissed off by users complaining about slow logons. In almost cases, this utility can be a major problem, witch means that you need to be very careful before publish to production users.<br />
<span id="more-183"></span><br />
This tool can be a good benefit if well managed and applied only in some cases, but probably will cause the loss of one or more benefits that makes XenApp the best product in the server based computing market.</p>
<p>Basically, the FastLaunch utility is a simple executable that can be published in your XenApp environment or called by login scripts or in start up folders. This executable creates a icon in the user&#8217;s task bar and holds users sessions on the server, even after users log out. When users needs to open again an application, they don&#8217;t need login again, they just reconnect to theirs sessions already opened in the servers, witch gives to users the impression that they logged very fast in the environment, because generally they don&#8217;t know the difference between a full logon and a session reconnection.</p>
<p>Before put this tool in production, you need be aware that you will probably affect:</p>
<p>* XenApp load balancing, witch can cause a major headache in large environments, then is recommendable implement only to a small groups of users or keep your load balancing rules in Default mode, keeping users equal divided between servers, forgetting processor, memory, etc utilization. It means that you will need take additional careful in your monitor to see if you don&#8217;t have equal servers, but one with 80 users and other with just 5.</p>
<p>* Printer creation if you are using auto-create printers solution. Every time that the user reconnects, printers needs to be recreated due user mobility or new printers added.</p>
<p>* Anything included in the Citrix login script. Commands in login script will run less times, like drive mappings, application configurations, etc.</p>
<p>* Maintenance interruptions that will include someone forcing the logoff of all disconnected sessions.</p>
<p>* After maintenance interruptions that include servers reboot, users will need logon again. Considering that a lot of SBC environment requires periodically reboots, due Windows problems to manage memory and page file utilization. It means that your users will be not totally free of their logon screens.</p>
<p>* License utilization can increase, because you can have users with opening new sessions in case of no reconnection. And you will keep all licenses allocated, even if you don&#8217;t have active users. Witch means that if your license numbers were designed considering just your concurrent users number, you will be unable to use this tool, that needs a license policy by nominated users, not concurrent.</p>
<p>Well, if after consider all problems that this tool can cause you discover that you can install in your environment, I think that privileged users will be very grateful to you. And don&#8217;t forget to implement other &#8220;logon improvements&#8221; like the new Citrix User Manager Profiles and perform constant maintenance in user.</p>
<p>Citrix Fast Launch Download<br />
<a href="http://community.citrix.com/display/xa/Citrix+Fast+Launch+Tool" target="_blank">http://community.citrix.com/display/xa/Citrix+Fast+Launch+Tool</a></p>
<p>Gus Pinto blog showing a video with the tool working<br />
<a href="http://community.citrix.com/blogs/citrite/gusp/2008/04/28/Citrix+Fast+Launch+Preview" target="_blank">http://community.citrix.com/blogs/citrite/gusp/2008/04/28/Citrix+Fast+Launch+Preview</a></p>
<p>Other video<br />
<a href="http://community.citrix.com/blogs/citrite/gusp/2008/04/28/Citrix+Fast+Launch+Preview" target="_blank">http://community.citrix.com/blogs/citrite/gusp/2008/08/18/Citrix+Fast+Launch,+Take+2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=183</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML-based map network drives for login scripts</title>
		<link>http://robertoalves.com/?p=180</link>
		<comments>http://robertoalves.com/?p=180#comments</comments>
		<pubDate>Tue, 16 Dec 2008 15:21:53 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=180</guid>
		<description><![CDATA[I found at VisualBasicScript.com Forum a very useful script wrote by a user called &#8220;ginolard&#8221;, that can be used at login scripts or if you need, you can use the basic structure of this script into others scripts with different proposes. Basically, this script read a XML file and execute mapnetwork commands considering the information [...]]]></description>
			<content:encoded><![CDATA[<p>I found at <a href="http://www.visualbasicscript.com/m_52191/tm.htm" target="_blank">VisualBasicScript.com Forum</a> a very useful script wrote by a user called &#8220;ginolard&#8221;, that can be used at login scripts or if you need, you can use the basic structure of this script into others scripts with different proposes.</p>
<p>Basically, this script read a XML file and execute mapnetwork commands considering the information gathered. The great advantage of use this model (scripts reading XML or INI files to get information), is that you can keep the same script for a long time without amends.<br />
<span id="more-180"></span><br />
For example, if your login script map network drives according user groups, you can keep the &#8220;rules&#8221; in the information file (XML or INI) and in the future, to add groups or maps, you need just change the file. Without touch in a script that can cause problems in a production environment.</p>
<p><strong>XML-based script:</strong></p>
<blockquote><p><em>Sub MapNetworkDrives<br />
On Error Resume Next<br />
&#8216;Map group-specific drives based on the entries in the MappedDrives.xml file.<br />
Dim objNetwork    :     Set objNetwork = CreateObject(&#8220;WScript.Network&#8221;)<br />
Dim objFSO        :    Set objFSO = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)<br />
Dim objSysInfo    :     Set objSysInfo = CreateObject(&#8220;ADSystemInfo&#8221;)<br />
Dim objUser     :    Set objUser = GetObject(&#8220;LDAP://&#8221; &amp; objSysInfo.UserName)<br />
Dim XMLDoc        :     Set xmlDoc = CreateObject(&#8220;Microsoft.XMLDOM&#8221;)</em></p>
<p><em>Dim MD_XMLPath    :    MD_XMLPath = GetLogonServer &amp; &#8220;NETLOGONMWTESTMappedDrives.xml&#8221;<br />
Dim GroupObj,objDriveNode<br />
&#8216;Load the XML file</em></p>
<p><em>xmlDoc.async = False<br />
If objFSO.FileExists(MD_XMLPath) Then<br />
xmlDoc.Load(MD_XMLPath)</em></p>
<p><em>&#8216;Compare each group the user is a member of and see if it is found in the XML file<br />
&#8216;If so, retrieve the UNC path and drive latter to be mapped.</em></p>
<p><em>For Each GroupObj In objUser.Groups<br />
Set objDriveNode = xmlDoc.selectSingleNode(&#8220;//MappedDrives/Group[@Name = '" &amp; Ucase(GroupObj.cn) &amp; "']&#8220;)<br />
If Not objDriveNode Is Nothing Then<br />
Err.Clear<br />
objNetwork.MapNetworkDrive objDriveNode.childNodes(1).text &amp; &#8220;:&#8221;, objDriveNode.childNodes(0).text,True<br />
If Err.Number &lt;&gt; 0 Then<br />
WriteToErrorLog &#8220;Error mapping &#8221; &amp; objDriveNode.childNodes(1).text &amp; &#8221; to &#8221; &amp; objDriveNode.childNodes(0).text<br />
End If<br />
End If<br />
Next<br />
End If<br />
End Sub</em></p></blockquote>
<p><strong>XML format to be followed:</strong></p>
<blockquote><p>&lt;MappedDrives&gt;<br />
&lt;Group Name=&#8221;SERVER_GROUP1&#8243;&gt;<br />
&lt;UNCPath&gt;\MYSERVERSHARENAME$&lt;/UNCPath&gt;<br />
&lt;DriveLetter&gt;G&lt;/DriveLetter&gt;<br />
&lt;/Group&gt;<br />
&lt;/MappedDrives&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=180</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Impact of PDF Readers in Citrix/TS environments</title>
		<link>http://robertoalves.com/?p=176</link>
		<comments>http://robertoalves.com/?p=176#comments</comments>
		<pubDate>Fri, 12 Dec 2008 13:01:06 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[consumption]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=176</guid>
		<description><![CDATA[Day by day, PDF files are becoming more and more popular and in some cases, more used than .doc files! And I bet that many Citrix administrators never stopped to think how much the PDF Readers are affecting the server performance and scalability in a Citrix farm, considering that memory consumption of PDF readers can [...]]]></description>
			<content:encoded><![CDATA[<p>Day by day, PDF files are becoming more and more popular and in some cases, more used than .doc files! And I bet that many Citrix administrators never stopped to think how much the PDF Readers are affecting the server performance and scalability in a Citrix farm, considering that memory consumption of PDF readers can be very interesting and frightening for Citrix administrators.</p>
<p>Multi functional printers with scanners that send scanned documents through email in a pdf file are very common, large documents found in internet generally are in PDF, many companies are using pdf format to protect copyright, some companies prefer use pdf against other formats thinking into document sizes, etc. Result: PDF is becoming the most used format at many companies and PDF Reader are affecting directly on Citrix Farm performances.<br />
<span id="more-176"></span><br />
For example, I got some reports in Citrix Resource Manager and did some tests with 85 users using PDF Readers (70 using Acrobat Reader 8 and 15 using FoxIt Reader 2.2 through XenApp 4.5 in diverted departments of a construction company, and I discovered:</p>
<p><strong>Time analysed: 2 months (40 weekdays)</strong></p>
<p><strong>Adobe Acrobat Reader 8 (70 users)</strong></p>
<p>•	Count: <strong>22.512</strong> – The average is each user opening  8 pdf files per weekday)<br />
•	Average CPU utilization while active: <strong>19.6%</strong><br />
•	Maximum memory set while active: <strong>1358 MB</strong><br />
•	Maximum memory peak working set: <strong>1905 MB</strong><br />
•	Average memory while active: <strong>23.4 MB</strong><br />
•	Average memory peak working set: <strong>52.3 MB</strong><br />
•	Maximum time active: <strong>01:23</strong> (hh:mm)<br />
•	Spool print size of CPS 4.5 admin guide (414 pages using HP LaserJet 4 driver): <strong>9.52 MB</strong><br />
•	Spool print size of CPS 4.5 admin guide (414 pages using HP DeskJet 660C driver): <strong>9.53 MB</strong><br />
•	Spool print size of CPS 4.5 admin guide (414 pages using ThinPrint driver): <strong>9.25 MB</strong></p>
<p><strong>Fox IT Reader 2.2 (15 users)</strong></p>
<p>•	Count: <strong>8.148</strong> – The average is each user opening  14 pdf files per weekday)<br />
•	Average CPU utilization while active: <strong>12.5%</strong><br />
•	Maximum memory set while active: <strong>569 MB</strong><br />
•	Maximum memory peak working set: <strong>1071 MB</strong><br />
•	Average memory while active: <strong>14 MB</strong><br />
•	Average memory peak working set: <strong>31.5 MB</strong><br />
•	Maximum time active: 00:37 (hh:mm)<br />
•	Spool print size of CPS 4.5 admin guide (414 pages using HP LaserJet 4 driver): <strong>447 MB</strong><br />
•	Spool print size of CPS 4.5 admin guide (414 pages using HP DeskJet 660C driver): <strong>66.2 MB</strong><br />
•	Spool print size of CPS 4.5 admin guide (414 pages using ThinPrint driver): <strong>61 MB</strong></p>
<p>Just to compare: Microsoft Word count for these users at the same period was <strong>15.908</strong>. That shows an impressive difference of 14.752 less, against <strong>30.660 pdf documents opened</strong>! In this case, a PDF Reader can be so important as Microsoft Word.</p>
<p><strong>Conclusion</strong></p>
<p>The data above shows that FoxIt Reader is much better than Adobe Acrobat Reader considering hardware consumption. But if you are considering Print performance, Acrobat Reader is much better than FoxIt Reader.</p>
<p>The first impression is that Acrobat Reader is a very mature application, and contains more features, better compression for print jobs and support to more technologies embedded in a pdf document.</p>
<p>Otherwise, FoxIt Reader is a very light application, with low hardware consumption, ensuring better performance to manipulate pdf files and acceptable work in tight environments, without print.</p>
<p>Additionally I tested the newest version of these two Readers, Adobe Acrobat Reader 9 and FoxIt Reader 3, and I got similar results. The hardware consumption of both readers is slight higher (about 10%) comparing to the older versions, and print engines of both are the same of older versions.</p>
<p>If you wanna do some tests with &#8220;bad&#8221; pdf files, you can download the &#8220;PDF from Hell&#8221; at <a href="http://www.loginconsultants.com/index.php?option=com_docman&amp;task=cat_view&amp;gid=20&amp;Itemid=62" target="_blank">Login Consultants download site</a>.</p>
<p>Do you know other good PDF Readers?</p>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=176</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Different procedure to rename Citrix XenApp 5 Servers</title>
		<link>http://robertoalves.com/?p=171</link>
		<comments>http://robertoalves.com/?p=171#comments</comments>
		<pubDate>Fri, 05 Dec 2008 16:04:04 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[Metaframe]]></category>
		<category><![CDATA[Presentation Server]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=171</guid>
		<description><![CDATA[Rename a Citrix XenApp Server (Presentation Server/Metaframe) Is a very common administrative task, but many administrators ignore that Citrix has recommendations to be followed. And this recommendations are different from XenApp 4.0/4.5 than XenApp 5. Basically, there is only one item that was included by Citrix on the procedure to rename servers. But is very [...]]]></description>
			<content:encoded><![CDATA[<p>Rename a Citrix XenApp Server (Presentation Server/Metaframe) Is a very common administrative task, but many administrators ignore that Citrix has recommendations to be followed. And this recommendations are different from XenApp 4.0/4.5 than XenApp 5.</p>
<p>Basically, there is only one item that was included by Citrix on the procedure to rename servers. But is very important, and you can have serious problems if you don&#8217;t follow the instructions below to set in Registry to IMA service force a Localhost replication with datastore.<br />
<span id="more-171"></span><br />
To XenApp 5.0 the procedure found at page 306 of Citrix XenApp Administrator&#8217;s Guide (XenApp 5 for Windows 2008) is:</p>
<blockquote><p>1. Create a Citrix local administrator account on the server you want to rename.</p>
<p>2. On the server you want to rename, run chglogon /disable to prevent users from logging into the server.</p>
<p>3. Open the Access Management Console on a different server, remove the server to be renamed from published applications assigned to that server.</p>
<p>4. On the server you want to rename, stop the Citrix Independent Management Architecture service.</p>
<p>5. In the Registry, set the HKEY_LOCAL_MACHINESOFTWAREWow6432NodeCitrixIMARUNTIMEPSRequired registry value to 1.  This value is KEY_LOCAL_MACHINESOFTWARECitrixIMA  RUNTIMEPSRequired on XenApp, 32-bit Edition.</p>
<p>Caution: Not changing the PSRequired registry value to 1 can result in incomplete records in the data store. Changing this value to 1 forces the Citrix Independent Management Architecture service to communicate with the data store and create a record for the newly named server.<br />
The value for PSRequired reverts to 0 the next time the Citrix Independent Management Architecture service restarts.</p>
<p>6. Change the name of the server in the server operating system and restart the server.</p>
<p>7. Log on to Access Management Console using the local administrator account you created.</p>
<p>8. Update all references to the old server to the new server name. This might require logging on to the XenApp Advanced Configuration tool as well.<br />
Important: Before removing the old server name, change all objects that reference the old name to the new server name, including data collector ranking, published application references, load evaluators, and zone settings.</p>
<p>9. Expand the Servers folder and remove the old server name from the Access Management Console’s list of servers.</p>
<p>10. Add the new server name to the list of configured servers for published applications.</p></blockquote>
<p>To Presentation Server 4.0 the procedure found at page 81 of Advanced Concepts Guide for PS 4.0 that was commonly used for XenApp 4.5</p>
<blockquote><p>1. In the Presentation Server Console:<br />
• In the Add MetaFrame Administrators wizard, select Add local<br />
administrators to the Administrator node<br />
• From the Privileges screen, choose Full Administration</p>
<p>2. Use chglogon /disable to prevent users from logging on to the server.</p>
<p>3. Remove the server to be renamed from any published applications assigned to that server.</p>
<p>4. Stop the Citrix IMA Service.</p>
<p>5. Change the name of the server.</p>
<p>6. Restart the server.</p>
<p>7. Use chlogon /enable to restore the previous setting.</p>
<p>8. Log on to the console using the local administrator account.</p>
<p>9. Expand the Servers folder.</p>
<p>10. Remove the old server name from the console’s list of servers.</p>
<p>11. Add the new server name to the list of configured servers for published applications.</p></blockquote>
<p>And pay attention at Citrix web site because the procedure can be changed after apply future hot fixes or product upgrades!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=171</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building quickly a XenApp 4.5 server for demonstration</title>
		<link>http://robertoalves.com/?p=160</link>
		<comments>http://robertoalves.com/?p=160#comments</comments>
		<pubDate>Thu, 04 Dec 2008 16:08:31 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=160</guid>
		<description><![CDATA[Sometimes we need install a simple XenApp environment for some porprouse like training, pre-sales, show some funcionality, test something before put in production, test an application to see if is compatible, etc. and depending of the propourse, you might spend some hours doing this boring task. But for XenApp 4.5, you can use a freeware [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we need install a simple XenApp environment for some porprouse like training, pre-sales, show some funcionality, test something before put in production, test an application to see if is compatible, etc. and depending of the propourse, you might spend some hours doing this boring task.</p>
<p>But for XenApp 4.5, you can use a freeware called <strong>VisionApp Experience 2007 </strong>that does all (or almost) work for you. Is quite simple, and you need just inform the path of XenApp 4.5 installation files and Windows 2003 installation files. Also, is recommended to you run a Windows Update before start the installation and run the tool locally.<br />
<span id="more-160"></span><br />
After finish the unattended installation you can access your new environment through Web Interface. This tool install automatically a XenApp 4.5 with all components including WI 4.5 and Streaming Server. In additional, the tool creates some publish content, publish applications and streaming applications. Ready to use!</p>
<p><img src="file:///C:/DOCUME~1/ralves.UK/LOCALS~1/Temp/moz-screenshot-2.jpg" alt="" /><img src="file:///C:/DOCUME~1/ralves.UK/LOCALS~1/Temp/moz-screenshot-3.jpg" alt="" /><a href="http://www.robertoalves.com/wp-content/uploads/2008/12/visionapp_exp_20072.jpg"><img class="alignleft size-medium wp-image-165" title="visionapp_exp_20072" src="http://www.robertoalves.com/wp-content/uploads/2008/12/visionapp_exp_20072-300x211.jpg" alt="" width="300" height="211" /></a></p>
<p>Unfortunately, VisionApp Experience 2007 is restricted, installing only XenApp 4.5 for Windows 2003 server 32 bit. This is means that probably won&#8217;t work with Windows 2003 Server 64 bits or for others version of XenApp, like the newest version 5. Additionally, you can&#8217;t choose options like create a separate DataStore or Web Interface.</p>
<p>However can be very useful in some cases:</p>
<ul>
<li>Pre-sales work, showing how XenApp and some functionalities like published applications, streaming applications, and published content works;</li>
<li>Test if some application or device works through XenApp, without compromise your production environment (if you don&#8217;t have an appropriate test environment);</li>
<li>Training something or install a quickly server to teach something;</li>
<li>Test XenApp 5 upgrade or interoperability;</li>
<li>You can create a DVD with all installations and keep in your case for &#8220;emergencies&#8221;</li>
</ul>
<p>To get the tool go to <a href="http://www.visionapp.com/resources/downloads/products-freeware.html" target="_blank">VisionApp web site</a> and register yourself to download.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=160</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>White Web Interface for Citrix XenApp 5</title>
		<link>http://robertoalves.com/?p=155</link>
		<comments>http://robertoalves.com/?p=155#comments</comments>
		<pubDate>Wed, 03 Dec 2008 16:52:15 +0000</pubDate>
		<dc:creator>roberto</dc:creator>
				<category><![CDATA[Citrix]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[XenApp]]></category>

		<guid isPermaLink="false">http://www.robertoalves.com/?p=155</guid>
		<description><![CDATA[Citrix brought some benefits launching XenApp 5, and the majors were support to Windows 2008 and a reformulated Web Interface. The new Web Interface 5 is very cool, using the most new CSS techniques and is more smart, recognizing the browser capabilities that each user is using (including mobiles). Also, the new Web Interface 5 [...]]]></description>
			<content:encoded><![CDATA[<p>Citrix brought some benefits launching XenApp 5, and the majors were support to Windows 2008 and a reformulated Web Interface. The new Web Interface 5 is very cool, using the most new CSS techniques and is more smart, recognizing the browser capabilities that each user is using (including mobiles).</p>
<p>Also, the new Web Interface 5 brings the pass-through built-in functionality from the previous version 4.6. Almost administrators didn&#8217;t had enough time to upgrade to WI 4.6, and now they can update direct to 5 and get the most updated version. But (there is always a but), Citrix include a black background on WI 5 and this background is not easy modified by console.</p>
<p><span id="more-155"></span><br />
This is a shame, considering that Citrix knows that all companies like to have a personal and simple web page to access Citrix applications. And would be good if Citrix add simple functions to console, like change background colour, exclude Citrix logo on footer, customize Title bar, include icons with links on application list bar, etc.</p>
<p>Our luck is that Citrix has thousands of persons across the world, worrying about how to deliver the best solution. Then, a good soul published at <a href="http://www.PimpMyXenApp.com" target="_blank">www.PimpMyXenApp.com</a> a &#8220;kit&#8221;, including a very clear tutorial and the images that you need to transform your black Web Interface into a White page.</p>
<p>The process is simple and you will take just some minutes to do, but you will change a lot of lines on the original Web Interface code, then is recommend to you back up everything before start and be prepared to become the newest &#8220;designer&#8221; of your company, receiving request to change colours, images, backgrounds, font sizes, blablablabla.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertoalves.com/?feed=rss2&#038;p=155</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

