.NET GUI not showing in WinPE
I created a utility in C #, something basic. I run it during SCCM task sequence deployment. One of the first things it does (during a form load event) is an ldap request. This piece of code is in the try block and the exception is thrown and an error message is displayed, but the form never appears. On my dev machine, when the error occurred, I got the message, but the form will be displayed later.
I have verified that all the DLLs I call are installed in WinPE, anyone else any .NET development for WinPE? This is WinPE 4.0 and I installed .NET 4.0 and other software using the elimination tool that comes with the Windows 8 ADK. Nothing special about the web since WinPE's .NET support is fairly new.
source to share
It looks like the System.Windows.Forms assembly was not loaded. I found this while trying to create a form with powershell and powershell gave an error stating that it could not find the type. After googling, I came across a fix that says a method is used to load the assembly [System.Reflection.Assembly]::LoadWithPartialName
and I downloaded the System.Windows.Forms assembly. After that I created the form in powershell and it displayed without issue and after I ran the application again it displayed gui fine.
UPDATE
Looks like I found my answer: the task sequence starts in session 0, i.e. no gui! http://blogs.technet.com/b/cameronk/archive/2010/04/27/creating-a-user-interactive-task-sequence-experience.aspx
Update 20130219
I ended up with psexec and called my executable using
psexec.exe -accepteula -s -i -h C:\_SMSTaskSequence\Packages\STE000AAA\myapp.exe
source to share