The Network Manager at Westminster School presents solutions to sticky problems...

Showing posts with label Not displaying. Show all posts
Showing posts with label Not displaying. Show all posts

Thursday, 26 March 2015

Displaying C# Dialogs in the 64bit SCCM Task Sequence

Task Sequence Variables are a powerful tool when deploying new Operating Systems with Task Sequences in System Center 2012 R2. With a Task Sequence Variable, stored on a collection, you can reduce the number of Task Sequences you maintain. Each action or group of actions can be executed based on what the content of a Task Sequence Variable is.

The next logical step to using Task Sequence Variables for existing systems is to use them for unknown computers. For that you need a user dialog box to appear at the start of the Task Sequence to allow the person building the new PC to select what options to include in the build. You might want to be very specific about the drivers you install, for example.

For a Task Sequence with a 32bit boot image Psexec.exe is perfect for launching a dialog in Session 0. Without the option to do this the dialog does not appear. The application will run but it cannot display a GUI without having been launched in the same session at the Task Sequence.

However, 32bit is a bit old in the tooth. Most sensible people are now switching to 64bit operating systems. Psexec.exe however is a purely 32bit application that will not run on a 64bit WinPE image because WinPE does not support Windows on Windows (WOW64.) There are instructions on Technet Blogs about how to write your own application, which you then have to go search out each step of the way.

I did this and found the path a bit harrowing. It's not for the feint hearted but it's doable. I managed to write it first time. To make the application specific to Task Sequences (and not exploitable for other uses) it is written in such a way that it is tied to the task sequence process and will otherwise fail. If you like you can download it from here.

To use it, add it and the dialog executable to a package. In the task sequence use a "Run Command Line" option. Specify the package and for the command-line use tslaunch.exe

This was built for .Net 4.5.1 and works with the Window 8.1 64bit WinPE image (6.3.9600.16384)

If you would like the source code, please contact me on Google+ and I'd be happy to oblige.

Friday, 9 December 2011

IE9 Rendering Problems

We have been having problems with IE and some add-ins: notably Flash 11 and Silverlight. The symptoms include having some flash objects not appear at all. Streetview, for example, displayed a blank black panel with some images appearing at the mouse passed over it. For Silverlight, it was Word Web App. Again, a black background with some text occasionally appearing when the mouse rolled over. SharePoint also got a rough time, with permission denied boxes appearing to be totally blank.

We have discovered that the problem is not with Internet Explorer, Silverlight or Flash. In fact it was the Intel Graphics Adaptor incorporated into our otherwise well endowed desktops.

There is a simple work-around for this (if an upgrade to the Graphics Driver) does not fix the problem: Tell Internet Explorer to use the Software Render. Tools -> Internet Options: Advanced Tab: Tick 'Use Software Rendering instead of GPU Rendering'. Done!

Now if, like me, you have around 500 PCs and laptops to look after, you don't want to wander around all 500. Neither do I want to have the pain of having to explain to a range of competencies how to fix this themselves. Instead, I use group policy preferences (under user configuration) Windows Settings, Registry:
Hive: HKCU
Path: Software\Microsoft\Internet Explorer\Mait
Value Name: UseSWRender
Value: 1

Apply this to all your affected users and enjoy a cuppa.