Jump to content

Image does not display within PE Environment


Brentp
 Share

Recommended Posts

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

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

Link to comment
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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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

wtfpl-badge-1.png

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
 Share

  • Recently Browsing   0 members

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