Sign in to follow this  
Followers 0
Brentp

Image does not display within PE Environment

9 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You can use FileInstall to integrate the image.

Br,

UEZ

Edited 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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by Mobius

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0