Many moons ago I released a video where I launched TsGui either from a package, or from a network share. The network share option had the benefit of not needing a usable disk partition to download the files to, for example if you’ve just replaced the hard drive. The problem with this is that you need to authenticate to that share, and then have to run the executable over a potentially slow and/or unstable connection (depending on your environment).

Since that video was released, the -webconfig option was added to TsGui, which gives us other options. This is how I do it these days.

Rather than running TsGui from a network share, I copy the TsGui files into the boot image. Then the files are already there, and you can pull the config from a web server. This way you can update the TsGui config without having to update your boot image. Then you don’t have the issues mentioned above.

To do this, edit your boot image and go to the ‘Customization’ tab. Tick the ‘Enable prestart command’ option and tick ‘Include files for the prestart command’. Set this to the location where your TsGui files are stored.

Here’s my boot image config. The command line doesn’t actually matter. I just happen to setup DaRT using a script, but it could just be something like ‘cmd /c echo Done‘.

This will copy the contents of the ‘Preboot_Files’ folder into the boot image and files will be accessible during the task sequence from x:\sms\pkg\sms10000

In the task sequence you call TsGui from the x:\sms\pkg\sms10000 folder. Note the use of the -webconfig option to pull the config file from a web server.

This step has a condition set using the built-in _SMSIsInWinPE variable. If you’re not in WinPE the ‘x:\sms\pkg\sms10000’ path won’t work, so you just use a package in the normal way when in Windows.

I usually just host the TsGui xml configs on the ConfigMgr server, although you could host this on any web server.

To ensure ConfigMgr upgrades don’t mess with my TsGui configs, I create a new site in IIS. This is set to run over HTTP so I don’t need to worry about SSL certs etc. I don’t store any secrets in my configs so this is fine. If you have any secrets or sensitive information in your config make sure to use HTTPS. Set the hostname on the site to something different to the main server, then create a CNAME in DNS for the new name (tsgui.home.local in this case).