Brentp Posted August 3, 2011 Share Posted August 3, 2011 I have done a little GUI interface with just a few simple buttons to launch Ghost within Win7PE Environment that was built with winbuilder. When the AutoIT exe runs its just a simple box with an image at the top and a few buttons. I used Koda Form designer to add the image and the line it generated was $Pic1 = GUICtrlCreatePic("D:\image.jpg", 0, 0, 401, 44) When I run the exe on my normal machine it runs because it can read D:\image When I run my Win7PE the Autoit script runs fine but the jpg does not show. I have also tried changing the line to $Pic1 = GUICtrlCreatePic("image.jpg", 0, 0, 401, 44) and copying the jpg with the exe on the PE Environment I have also tried changing the path to where the file is within the PE environment $Pic1 = GUICtrlCreatePic("y:\ghost\image.jpg", 0, 0, 401, 44) And I have also tried a line I found elsewhere $Pic1 = GUICtrlCreatePic(@ScriptDir&"\image.jpg", 0, 0, 401, 44) Can anyone give me some pointers on how to get the image to show or Can you integrate the image into the exe so it doesnt matter where the exe is run from? Thanks Link to comment Share on other sites More sharing options...
UEZ Posted August 3, 2011 Share Posted August 3, 2011 (edited) You can use FileInstall to integrate the image.Br,UEZ Edited August 3, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Brentp Posted August 5, 2011 Author Share Posted August 5, 2011 Hi UEZ, I had ago at using the the FileInstall, I had the same results, Within normal windows when the exe was run it would deploy the jpg's and display them. Once in the PE environment, it would deploy the images but when running the exe the images would not show, within PE windows you could view the images where the were deployed to. So it seems like it has an issue within a PE environment. Brent Link to comment Share on other sites More sharing options...
UEZ Posted August 5, 2011 Share Posted August 5, 2011 (edited) What you can do is to embedd the image into your code as binary string and use the image directly from memory but I don't know whether it is working in PE environment.Can you run Windows Screenshooter in your PE environment and check whether you can see the image on the Grab Screen button or ISO Creator where you should see the background image?I assume that it is not working because of missing DLLs...Br,UEZ Edited August 5, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Brentp Posted August 16, 2011 Author Share Posted August 16, 2011 Hey UEZ I run the screenshooter within the PE environment, launched my script, then did the screen grab and stuck the little pointer over the section where the image should be. Nothing appeared. Link to comment Share on other sites More sharing options...
Zedna Posted August 16, 2011 Share Posted August 16, 2011 Try my Resources UDF. Link is in my signature. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Mobius Posted August 17, 2011 Share Posted August 17, 2011 (edited) As hinted at by UEZ, PE environments are a very cut down version of the actual OS. In BartPE only bitmaps are supported because of the lack of necessary libraries, like BartPE you could probably reintroduce the necessary libararies you require via winbuilder. Try instead using a bmp image (or even other formats such as png) with all the previous methods you have tried such as fileinstall and copying over the image file yourself. If that works then I highly recommend embedding the the bitmap in your executable with resourcehacker (or similar) and using Zedna's resource udf to utilize the bitmap in your gui. Edited August 17, 2011 by Mobius Link to comment Share on other sites More sharing options...
Tripredacus Posted August 23, 2011 Share Posted August 23, 2011 In WinPE, your paths are going to be different. As long as your app and your image are in the same location, you can refer to it using @ScriptDir. Also make sure you have the HTA package installed, which will give you the IE controls that allow for viewing JPGs among other things. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
Brentp Posted August 31, 2011 Author Share Posted August 31, 2011 Hey Mobius, the BMPs worked thanks for your suggestion. Thanks to everyone else for the help too. Ill have a look into the HTA package part. 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