Store passwords local with plain text access on WinPE

I have an application that needs to store Network Credentials for a Network Drive/Share on the disk. The user shouldn’t need to enter the password every time. The OS is WinPE, so he cannot map the drive once and it will stay there.

Limitation:

  • I need the password in plain text, to map the drive.
  • The program should work without an additional password that the user has to enter.

Thoughts:

  • Hash + Salt is not reversible, so I cannot get the password in plain text.
  • An encrypted password is not safe, because the program has to store the key. If someone looks inside the code he will get the key and decrypt the password.
  • I cannot use the “Protect Data” interface of windows, because I use WinPE. Protect Data Documentation

The program is written in C#. Maybe someone has a good idea about my problem. Thanks!

WinPE PXE boot fails

I am trying to PXE boot Windows. I have a Samba share setup, ISO mounted, looks good on the server side.

The default menu entry is as follows:

LABEL Windows Server 2012 MENU LABEL Windows Server 2012 KERNEL /memdisk INITRD /windows/winpe.iso APPEND iso raw 

ENDTEXT

I built a WindowsPE image with DISM, base PE files + Dell drivers. I created both a USB drive output and an ISO output. The USB drive I made boots fine. The ISO gives me the following output and then boots the local hard drive.

I have previously successfully executed a WinPE image, but that image didn’t have the drivers I needed. Thus, I think my default is ok. This ISO is about 333 MB, whereas the original was about 1/3rd of that.

But when I attempt to boot my new WinPE ISO, I get the following messages:

PXE Boot Screenshot

And then it boots to local drive, not the desired ISO.