Modify startnet.cmd? ZCM 2017 Update 2

We are using ZCM 2017 update 2 to let us use WinPE via USB to restore images on some of our newer devices that aren't loading using the PXE/Linux imaging system (like the latest HP x360 G1, or the HP Stream G4).

I have worked with Novell Support (who have been exceptional) on this, and I'm at the point now where booting to a WinPE USB stick works, and I can cancel the Zenworktodo.exe GUI and then use the command line to take/restore images.

All good, but now I want to make it easier, and script a menu like I have under the PXE/Linux system.

Novell support told me that I can remove the 'zenworktodo.exe' file under C:\Program Files (x86)\Novell\ZENworks\share\tomcat\webapps\zenworks\ext\3PIUtils and then when building the WinPE ISO it will stay at the command prompt.

But how can I add a custom menu/batch file to run? I'm not very fluent in WinPE, sorry. My best guess is to create a batch file menu and then convert it from a bat file to a "zenworktodo.exe" file so it will run. But is there an easier way to somehow modify the startnet.cmd file, so that after the 'wpeinit' I have it call a custom bat file?

  • Ok, Google helped me with this one, and I'm replying to my own post in case others need to know:

    Create the WinPE ISO as normal per this guide:, page 168. Then use Rufus or similar tool to burn that ISO to a USB.

    Then put USB in drive, it becomes a drive letter (E: in my case). Create empty c:\mount folder.
    CD to E:\Sources folder.
    E:\Sources>DISM /Mount-WIM /WimFile:E:\sources\boot.wim /index:1 /MountDir:c:\mount
    Then go into c:\mount folder, go down to Windows\system32 and modify the 'startnet.cmd' file. Leave wpeinit, but I rem'd out zenworktodo and added DOS commands to do what I wanted.
    In my case, the simplest part was just adding two lines:
    net use z: \\(zcm2017-server-ip-address)\images
    img -restore -local z:\imagename.zmg
    But could also have added DOS menu commands too.
    Then close and save Startnet.cmd, and close out of the windows explorer window otherwise it won't fully unmount.
    E:\Sources>dism /unmount-Wim /MountDir:"c:\mount" /commit

    Then boot to that WinPE USB stick, and it should skip the GUI and go straight to the DOS commands to restore the image.