mcslemon Posted August 7, 2007 Share Posted August 7, 2007 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 More sharing options...
bj-kaiser Posted August 7, 2007 Share Posted August 7, 2007 (edited) 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 August 7, 2007 by bj-kaiser Link to comment Share on other sites More sharing options...
mcslemon Posted August 8, 2007 Author Share Posted August 8, 2007 next question then as that sounds like a good idea..What language is a good platform to create this? VB6, VB2003 + VB2005 don't appear to work. Link to comment Share on other sites More sharing options...
zorphnog Posted August 8, 2007 Share Posted August 8, 2007 I've found the simplest, for me at least, is to use an HTA/VBScript. Link to comment Share on other sites More sharing options...
Jazkal Posted August 8, 2007 Share Posted August 8, 2007 I've found the simplest, for me at least, is to use an HTA/VBScript.Yep, HTA would be my first choice. But I am going to be moving my HTA's to AutoIt3 here in the near future. Link to comment Share on other sites More sharing options...
mcslemon Posted August 8, 2007 Author Share Posted August 8, 2007 Just seen AutoIt myself... interesting! Link to comment Share on other sites More sharing options...
bj-kaiser Posted August 9, 2007 Share Posted August 9, 2007 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=385299You 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 More sharing options...
mcslemon Posted August 9, 2007 Author Share Posted August 9, 2007 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)WEndWhile 1 $get = GUIGetMsg() If $get = -3 Then ExitWEndFrom here: http://www.autoitscript.com/forum/lofivers...php?t13787.htmlIt 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 More sharing options...
bj-kaiser Posted August 9, 2007 Share Posted August 9, 2007 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 More sharing options...
mcslemon Posted August 9, 2007 Author Share Posted August 9, 2007 Yeah just noticed that! lolI'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 More sharing options...
bj-kaiser Posted August 9, 2007 Share Posted August 9, 2007 http://www.autoitscript.com/forum/index.ph...st&p=316159there is the solution. though i would prefer to use the .dll instead of adding another wrapper around imagex.One trick you could try also would be AutoIts BlockInput() function, it will disable every mouse and keyboard input other than Ctrl-Alt-Del. Link to comment Share on other sites More sharing options...
mcslemon Posted August 9, 2007 Author Share Posted August 9, 2007 Cool, I'll have a play with that in a bit.Thanks for your help so far. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now