Jump to content

Preventing closure of WinPE environment


mcslemon

Recommended Posts

Hi,

We are looking to use WinPE 2.0 with ImageX to deploy our builds. I've spent the last few days tweaking it as much as possible.

I have one slight concern with the ease at which the environment can be shut down. Obviously whatever I do can't protect against power off's etc, but will help stop fiddling students from closing it mid Image!

Currently we use Zenworks which allows us to lock the machine until the image has completed. Is there a way of hiding the X in the command window of WinPE, enabling ImageX to complete its task?

Cheers,

Neil.

Link to comment
Share on other sites


create a custom application in a script/compiled language of choice and let it run as shell. That way you have full control over the session. search the docs and the forum for winpeshl.ini

Edited by bj-kaiser
Link to comment
Share on other sites

Would you be interested in wimgapi/imagex integration into AutoIt? I already have done some work there. The only thing that doesn't work is setting up a callback function to visualize the progress while the image gets applied, for capture it works gracefully. (this seems to be a bug in the wimgapi.dll, read the thread in the autoit forums)

This is my latest include for wimgapi.dll (at the moment)

http://www.autoitscript.com/forum/index.ph...st&p=385299

You will also need DllCallback.au3 from here if you want to use a callback function for capturing:

http://www.autoitscript.com/forum/index.ph...st&p=384128

Link to comment
Share on other sites

That also sounds interesting!

I've looked at imagex and autoit myself and just out of interest, found this:

#include <GUIConstants.au3>
#include "constants.au3"
$gui = GUICreate("console stuff")
$edit = GUICtrlCreateEdit("", 10, 10, 300, 300, BitOr($WS_VSCROLL, $WS_HSCROLL,$ES_READONLY))
GUISetState()
$ping = Run(@ComSpec & " /c ping google.com", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1
$lineout = StdoutRead($ping)
If @Error = -1 Then ExitLoop
GUICtrlSetData($edit, $lineout & @CRLF, 1)
WEnd

While 1
$get = GUIGetMsg()
If $get = -3 Then Exit
WEnd

From here: http://www.autoitscript.com/forum/lofivers...php?t13787.html

It puts the output of the Comspec into a scrollable text window... only thing I've noticed is that once the task in the comspec has finished, the script goes into a loop. But otherwise looks quite interesting.

I'll take a look at what you've done as this would be very useful.

Neil.

Link to comment
Share on other sites

Stdoutread and imagex != fun.

Since imagex.exe seems to suffer from an error similar to the one found in wimgapi.dll. You will see the output of imagex.exe only after the program ended. I.e. as long as you run it from cmd.exe it looks ok, but if you want to redirect the output be it a file or read into AutoIt, you will not see anything until imagex.exe is done.

And thats not what we want. But so far there seems no solution to this behaviour other than let imagex.exe run from a wrapper that redirects the output ... i will see if i can find that link again.

Link to comment
Share on other sites

Yeah just noticed that! lol

I'm getting back to the situation where people can abort the cmd windows! I was hoping either HTA's or Autoit would help. At the end of the day it's not a big deal, its just with our other imaging product we're able to block user intervention once the image is proceeding.

I'll take a look at the wrapper link when you find it and see what it does for me.

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...