Sunday, 18 November 2012

GTLcontrol code update v2.0 online

You might have seen the control software I put up for Gigabyte Tweak Launcher (GTL) about a month back. At the competitive end of overclocking the ability to dynamically control the clock speed is priceless, it can be the difference between those last 10 points you need to take the world record. GTLcontrol provides this functionality to any motherboard that supports Gigabyte's GTL.

I have updated the code base to include a full GUI, hotkeys for bclk/multi up/down adjustments and I've also cleaned up the code to increase the performance a little.


The hotkeys F7/F8 are used for multi up/down and F10/F11 are now used for bclk up/down. This allows low end Gigabyte boards to be used just like the uber high end Z77X-UP7.

Also to support the GUI functionality is a new F5 hotkey to "show" the GUI if you have hidden it. I suggest turning the GUI off once you have your settings right, as then GTLcontrol will use less memory and impact your benchmark less. I have done extensive testing with it off and on and found no efficiency loss, but better to be safe than sorry. Please note that if you do turn the GUI off, you need to manually turn it back on by setting "gui=1" in the gtlcontrol.ini file.

Remember when you make any changes to save and then hit reload, this will activate the changes.

Feel free to take this code and do whatever you want with it, please email me any changes as I would like to check them out.

You can download the full version from here or the source code from my github.

Enjoy!

Wednesday, 17 October 2012

How to upgrade SCCM 2007 clients to SCCM 2012

You would think upgrading from SCCM 2007 to 2012 would be a relatively easy task, but I've found it a mammoth process. Not only is there no way to "upgrade" to server itself, there is also no clean way to upgrade the clients directly from 2007 to 2012. I am not a big fan of the SCCM client "push" technique, so below is a process that is working for me.

I have put together the following kixtart/batch script combination to uninstall 2007 and then install 2012 in my environment. This might not work for everyone, but I use a combination of computer startup/login scripts and SCCM to carry out maintenance tasks in my environment.



The pre-launch script

Firstly I am calling the main batch script from my kixtart computer startup script. This could all be done in kixtart, but I want this to happen in the background. If I were to use commands like "start /wait" (which I use to ensure the SCCM 2007 client is installed before the 2012 install begins) within the kixtart script itself, this would make computer startup process take way too long.
;spawn SCCM client upgrade into background
IF (EXIST ("c:\windows\system32\ccm\") AND EXIST ("c:\windows\ccm\AAProv.dll")=0)
  SHELL "%comspec% /c start contoso/local\software\sccmclient2012\sccmupgrade.cmd"
endif
The above script simply checks that the SCCM 2007 folder "c:\windows\system32\ccm\" exists on the system and that a SCCM 2012 file "c:\windows\ccm\AAProv.dll" is not installed. It then launches the main upgrade script. You could use any file, I just picked AAProv.dll as it was one of the first files I saw in the directory.



The upgrade batch script

1. Create a new folder and copy the SCCM 2012 client and ccmclean.exe. CCMCLEAN has been floating around since SMS 2003 and while not officially supported, still works well to irradicate unwated SCCM 2007 client installs.

2. Create an empty batch script and enter the following. Obviously you need to replace the consolo.local lines with the relavent paths and MP fqdn in your environment.
REM ensure 2007 is installed properly (can prevent uninstall)
start /wait %windir%\system32\ccmsetup\ccmsetup.exe /logon
REM uninstall sccm 2007
start /wait %windir%\system32\ccmsetup\ccmsetup.exe /uninstall


REM ccm clean
start /wait
\\contoso.local\software\sccmclient2012\ccmclean.exe /all /q

REM 2012 client install
if not exist "c:\windows\ccm\AAprov.dll" (
  if not exist "c:\windows\system32\ccm\core\bin\clicore.exe" (
   
\\contoso.local\software\sccmclient2012\ccmsetup.exe /service SMSSITECODE=SDC SMSCACHESIZE=6144 SMSMP=mpfqdn.contoso.local /UsePKICert
  )
)
REM clean exit
exit 0
The above script works as follows. First I run an INSTALL (yes an install, not uninstall) of the 2007 client with the /logon flag, this will ensure that the 2007 client is installed properly, as an improper install can cause the uninstall to fail.

Next I attempt to do a clean uninstall with the native SCCM /uninstall command, this often fails, so it is followed up with the CCMCLEAN /all command which will remove anything that the native installer misses.

After the uninstall of the 2007 client, two checks are run to ensure the 2007 client is uninstalled and the 2012 client isn't already installed. Then the 2012 client is installed. I use "start /wait" commands to ensure the uninstall steps occur before the 2012 install starts.

I have used this script on a mixed environment of Windows XP SP3 32bit and Windows 7 SP1 32bit with no problems, 99.9% of clients uninstalled and upgraded clean.

This entire process probably won't suit your environment, but hopefully you can take some ideas and apply them to your deployment techniques.

Tuesday, 2 October 2012

Gigabyte Tweak Launcher hotkey control tool

Overclockers everywhere rejoiced when Gigabyte released their Gigabyte Tweak Launcher (GTL) software that is capable of adjusting the multiplier, voltages and bus speeds. GTL is super lightweight and perfect for competitive overclocking but unfortunately is has one small downfall, it doesn't support hotkeys. Hotkeys can be an essential part of taking that world record, clocking a higher frequency for one part of a test, then lowering the frequency for a heavy CPU based test.

With the help of the lightweight autoit scripting language I have put together a small script capable of passing commands to GTL via hotkeys, my gtlcontrol script works as follows.



How to use GTLCONTROL

1. Download gtlcontrol.exe and gtlcontrol.ini from my github repositories.

2. Make sure Gigabyte Tweak Launcher is installed.

3. Edit gtlcontrol.ini to set your bclk, voltage and multiplier.

4. There are 3 options for each hotkey "multienable", "voltenable" and "bclkenable".

If you want to enable any of the 3 options set the value to 1, setting the value to 0 disables the respective option.

For example, multienable=1 enables the multiplier. multienable=0 disables the multiplier.

NOTE: Every time you edit gtlcontrol.ini you need to exit and reload gtlcontrol.exe.


5. To use the application, first start Gigabyte Tweak Launcher and then open gtlcontrol.exe. GTL must be running in the background for the hotkey functionality to work.

6. Your hotkeys f1 through to f4 will execute the options you set in gtlcontrol.ini.


NOTES:

The options in the [debug] sections are for debugging, you don't need to touch them.

You may want to disable the teamau splash screen, to do this set title=0

If you don't trust binaries, the source is provided in gtlcontrol.au3 (check out my github), it is written in the autoit scripting language.

Friday, 7 September 2012

How to silently install Microsoft Mathematics 4.0

The installation options of Microsoft Maths 4.0 are very unusual. Its seemingly designed for use in schools yet it doesn't have the ability to be silent installed. The only option for network admins is a Citrix Xendesktop or Microsoft App-V style deployment.

Through trial, error and research I was able to find a set of silent installation commands that work.



The Process

1. Download Microsoft Math 4.0 x86 from here >> http://www.microsoft.com/en-au/download/details.aspx?id=15702

2. Extract the contents of MSetup_x86.exe to a folder. This can be easily done with winrar

3. Create an install.cmd with notepad++ or your favourite text editor

4. Into your install.cmd add the below deployment commands.
start /wait msiexec /i MSMath_x86.msi FROMSETUP=1 ALREADYRUNNING=0 DOTNET35=1 SKIPDXINSTALL=0 SXSOFF=0 D3DOFF=0 /qn

regedit /s eula.reg

exit 0
These commands are a combination of silent install, tricking the MSI into thinking its running from setup.exe and a selection of other options. I also apply a eula.reg (as seen below) that accepts the EULA and prevents it from popping up to the end user.

You may be able to further optimize the silent install string, but the above string works perfectly from my experience.

5. Save install.cmd

6. Paste the below text into a new file named eula.reg and save it into the same folder
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mathematics\Standalone\4.0]
"MsltAccepted"=dword:00000001
 7. Create your package and program with SCCM (or your favourite deployment technique) and trigger install.cmd


The most important part of this article are the silent install strings for MSMath_x86.msi, the other deployment options are up to you. This took me a while to find a solution to and it seems by a quick google search that many other administrators are in the same boat.

Monday, 3 September 2012

Resolving iPhone wireless dropouts with DD-WRT

I use a couple of Linksys DD-WRT based routers in my home network and have done so for a few years. I love the flexability of advanced options like radius and the reliability I recieve from these devices.

I recently began experiencing some problems with iPhone connections being unreliable, especially after the router had an uptime of over 8 hours. A reboot of the router fixed the problem but rebooting the router every day isn't my idea of a resolution.


The settings that worked

These settings are a mix of settings from around the web, since combining these I have had perfect reliability with my iPhones.

1. Login to your DD-WRT device.

2. Click the 'Wireless' tab.

3. Click the 'Advanced Settings' tab.

4. Adjust the following settings.

Beacon Interval 50
Fragmentation Interval 2304
RTS Threshold 2305

The key setting is adjusting the Beacon Interval from the default of 100 to 50. The other two settings I couldn't see any differences but they didn't negatively impact performance so I left them.


5. Click 'Save' and then 'Apply Settings'.

I tested these settings on a Linksys WRT54G running v24 SP1 Micro and a Linksys WRT150N running v24 STD and there was no negative performance impact on my other devices (laptops, iPad, etc).

The only other settings I adjusted was TX Power to 84, but that was just to cover a larger area in my home and is totally optional.

Ensure you do your own before and after performance comparisons, but as far as I can tell these settings only bring gained stability.

Sunday, 2 September 2012

Enterprise deployment of the Adobe Photoshop CS6 6.0.1 security update - CVE-2012-4170

There is no denying Adobe probably have the most convoluted enterprise processes in the industry but luckily the latest CS 6.0.1 security update deployment isn't too bad at all, if you know where to look that is.

The official Adobe blog post simply mentions going to Help > Update from within Photoshop, which is OK for updating a single client but doesn't suffice for enterprise upgrades.

This update probably isn't blog worthy, but I had trouble finding both the update itself and the silent install strings for the update, so I thought it might save someone else a few minutes.



Obtaining the update

The Adobe blog post doesn't mention the update can be downloaded in a redistributable format from the Adobe support downloads page - available here http://www.adobe.com/support/downloads/new.jsp

The above address is the location for all the latest Adobe network deployable updates/security fixes. You can also grab the Photoshop CS6 6.0.1 update for Windows directly from here http://www.adobe.com/support/downloads/detail.jsp?ftpID=5408



Silently installing the update

Again this is REALLY easy, but I saw a number of syntax errors on other blogs that complicated things.

1. Extract the Update zip file.

2. Create a install.cmd with the following text inside

start /wait AdobePatchInstaller.exe --mode=silent

Please note the "--mode=silent" has a small s, a capital S will cause this process to fail.


3. This next line is totally up to you, but I also deploy a blank file to the file system. This file allows me to easily evaluate the patch version of Photoshop when deploying future updates.

copy /Y adobecs6_13_0_1.tch c:\windows\deployment\adobecs6_13_0_1.tch

Your done! You can now deploy the install.cmd with SCCM or your favourite deployment tools. Hopefully these simple tips/references save you a few minutes.

Friday, 17 August 2012

Techniques to avoid Citrix Xendesktop boot storms

In any environments running Citrix Xendesktop with a PVS configuration, sooner or later you are likely to come across a boot storm, a mini one at least.

A boot storm is essentially a denial of service. It occurs when multiple Xendesktop or Xenapp servers reboot simultaneously and use all the available resources (normally CPU) causing extreme slowness in the rest of the environment. In some cases this initial boot storm can flow through for the rest of the day as your virtual infrastructure never recovers from the initial resource demand.

As you could imagine in a educational environment this can be amplified as X number of users log off at the end of each lesson then expect to log in 5 minutes later when their next lesson starts.

An easy fix would be to simply disable any "reboot on logoff" functionality but that can have its own implications.

For example your PVS environment may use a write cache redirect to local storage, this gives improved performance as it is less reliant on network infrastructure but is usually smaller in size. If your system was not rebooting on every logoff there is increased potential for the write cache to become full and with Xendesktop 6 the write cache overflow is on the PVS HDD itself.



Battling the infamous boot storm without changing write cache settings
After analysing our environment we decided we wanted to disable "reboot on logoff" but defiantly wanted to keep our "Cache on device hard drive" write cache configuration.  These two don't really work together by default, but these few changes allowed us to make them work perfectly together.

Part 1 - Daily reboot

Firstly we configured a daily reboot, we found the easiest way to do this was through a combination of script and Citrix policy.

Through our Desktop Group properties we have configured our Power management schedule to slowly start turning machines off around 12AM, coming to a low of 0 between 3 and 4AM. Then machines started  turning on again, allowing us to peak back our at 100 machines at 7AM, ready for staff and students to login at 8AM. By slowly turning these machines on/off we ensure we don't trigger a boot storm.

To compliment our Desktop Group Power management configuration we also set a simple task schedule on the virtual desktops themselves at 3:45AM to trigger a reboot. At 3:45AM there should be no more than around 5 machines still running, ensuring we are only rebooting a few machines at this time. This might not suit all environments, but in ours there is never going to be anyone using Citrix at 3:45AM.

That ensures at least 1 reboot a day clears the write cache.


Part 2- Write cache evaluation on logoff

Part 2 is slightly more complex but just as important in ensuring the write cache has space available.

Using the kixstart scripting language and a logoff script, we run an evaluation on available write cache space. Depending on the outcome of that evaluation we trigger a reboot or simply just allow the system to log off.

This will ensure any systems that have below a specified threshold of available write cache will reboot and the rest will be immediately ready to serve the next user. I have attached the evaluation script below, written in the kixtart language.

writecachemonitor.kix

This script can be triggered by a simple windows domain logoff user script targeted to the virtual desktop OU with loopback.


These two simple techniques have worked wonders for us, not a single boot storm, our performance has noticeably increased and end-users are much happier.