likuidkewl Posted May 14, 2004 Posted May 14, 2004 I am trying to get a .bmp to be the background of a .HTA file in windowsPE and it is just not working. I am wondering if anyone knows a way to make this work. I don't want to have to add explorer and IE to make this work either, so if anyone knows of a way please feel free.Here is the begining of the .hta file<HTML> <HEAD> <TITLE>WinPE Recovery and Install disc</TITLE> <HTA:APPLICATION ID="oApp" WINDOWSTATE="Normal" BORDER="none" INNERBORDER="Yes" SHOWINTASKBAR="yes" SCROLL="No" APPLICATIONNAME="WinPE Recovery Console" NAVIGABLE="yes"> <style type="text/css"> TD {font-size:8pt} input {font-size:8pt} H5 {font-size:10pt; font-style:bold} </style> </HEAD><BODY BGCOLOR="000000"><BODY BACKGROUND="file:///%systemdrive%\i386\system32\InstallBG.bmp"><FONT COLOR="White" FACE="times"><H2><Center>Welcome to the WinPE Installation and Recovery CD.</Center></H2><Center>Designed by Likuidkewl</Center><script language="VBscript">Dim WshShell : Set WSHShell = CreateObject("Wscript.Shell")Dim WshNetwork : Set WshNetwork = CreateObject("WScript.Network")Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")sub window_onload() window.resizeto 640, 480 window.moveTo 112, 84end sub
likuidkewl Posted May 15, 2004 Author Posted May 15, 2004 Thought this fixed it but it didn't<HTML> <HEAD> <TITLE>WinPE Recovery and Install disc</TITLE> <HTA:APPLICATION ID="oApp" WINDOWSTATE="Normal" BORDER="none" INNERBORDER="Yes" SHOWINTASKBAR="yes" SCROLL="No" APPLICATIONNAME="WinPE Recovery Console" NAVIGABLE="yes"> <style type="text/css"> TD {font-size:8pt} input {font-size:8pt} H5 {font-size:10pt; font-style:bold} </style> </HEAD><BODY BGCOLOR="#000066"><FONT COLOR="000000" FACE="times"><H2><Center>Welcome to the WinPE Installation and Recovery CD.</Center></H2><Center>Designed by Likuidkewl</Center><script id=clientEventHandlersVBS language=vbscript>Dim WshShell : Set WSHShell = CreateObject("Wscript.Shell")Dim WshNetwork : Set WshNetwork = CreateObject("WScript.Network")Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")sub window_onload() window.resizeto 450, 400 window.moveTo 112, 84 window.document.body.background = "file:///"+ _ WshShell.ExpandEnvironmentStrings("%SystemRoot%") + _ "\Scripts\installbg.bmp"end subsub Diskpart_onclick() WshShell.Run "%systemdrive%\Scripts\DiskPart.cmd"end SubThe whole code is not posted, due to the nature of the question asked, but if anyone wants to see it, I can post it.
Kenny McCormick Posted May 15, 2004 Posted May 15, 2004 Can you post the whole code? I like to se it.
likuidkewl Posted May 15, 2004 Author Posted May 15, 2004 <HTML> <HEAD> <TITLE>WinPE Recovery and Install disc</TITLE> <HTA:APPLICATION ID="oApp" WINDOWSTATE="Normal" BORDER="none" INNERBORDER="Yes" SHOWINTASKBAR="yes" SCROLL="No" APPLICATIONNAME="WinPE Recovery Console" NAVIGABLE="yes"> <style type="text/css"> TD {font-size:8pt} input {font-size:8pt} H5 {font-size:10pt; font-style:bold} </style> </HEAD><BODY BGCOLOR="#000066"><FONT COLOR="000000" FACE="times"><H2><Center>Welcome to the WinPE Installation and Recovery CD.</Center></H2><Center>Designed by Likuidkewl</Center><script id=clientEventHandlersVBS language=vbscript>Dim WshShell : Set WSHShell = CreateObject("Wscript.Shell")Dim WshNetwork : Set WshNetwork = CreateObject("WScript.Network")Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")sub window_onload() window.resizeto 450, 400 window.moveTo 112, 84 window.document.body.background = "file:///"+ _ WshShell.ExpandEnvironmentStrings("%SystemRoot%") + _ "\Scripts\installbg.bmp"end subsub Diskpart_onclick() WshShell.Run "%systemdrive%\Scripts\DiskPart.cmd"end Subsub explorer_onclick() WshShell.Run "%systemdrive%\Scripts\explorer.vbs"end Subsub Notepad_onclick() WshShell.Run "%systemdrive%\Scripts\notepad.vbs"end Subsub Readme_onclick() WshShell.Run "%systemdrive%\Scripts\Readme.vbs"end Subsub run_onclick() WshShell.Run "%systemdrive%\Scripts\run.vbs"end Subsub run_onclick() WshShell.Run "%systemdrive%\Scripts\pro.vbs"end Subsub run_onclick() WshShell.Run "%systemdrive%\Scripts\home.vbs"end Subsub reboot_onclick() WshShell.Run "%systemdrive%\Scripts\reboot.vbs"end Subsub shutdown_onclick() WshShell.Run "%systemdrive%\Scripts\shutdown.vbs"end Sub</script><BR></BR><Table><table align="Center" cellspacing="0" width="75%"><TR><TD align=Left><INPUT Type="Button" ID="Readme" Value="Readme"> View the Readme</TD></TR><TR><TD align=Left><INPUT Type="Button" ID="Diskpart" Value="Diskpart"> !WARNING! see Readme</TD></TR><TR><TD align=Left><INPUT Type="Button" ID="Explorer" Value="Explorer"> Browse the hard drive</TD></TR></TR><TR><TD align=Left><INPUT Type="Button" ID="Run" Value="Open Run"> Open the run box</TD></TR></TR><TR><TD align=Left><INPUT Type="Button" ID="Notepad" Value="Notepad"> Edit scripts</TD></TR></TR><TR><TD align=Left><INPUT Type="Button" ID="Pro" Value="XP Prof"> Install Windows XP</TD></TR></TR><TR><TD align=Left><INPUT Type="Button" ID="Home" Value="XP Home"> Install Windows XP</TD></TR></TR><TR><TD align=Left><BUTTON onclick="self.close()"> Exit</BUTTON> Back to command prompt</TD></TR><TR><TD align=right><INPUT Type="Button" ID="reboot" Value="Reboot"></align></TD></TR><TR><TD align=right><INPUT Type="Button" ID="shutdown" Value="Shutdown"></TD></TR></Table></BODY> </HTML>
Kenny McCormick Posted May 15, 2004 Posted May 15, 2004 Have you tried to put the background in the same dir as the htm file and use:<BODY BGCOLOR="000000" BACKGROUND="../InstallBG.bmp">
mbouchard Posted May 17, 2004 Posted May 17, 2004 I just tried the line below and was able to get it working, the picture was in the same folder as the hta <BODY BACKGROUND="test.jpg">
likuidkewl Posted May 17, 2004 Author Posted May 17, 2004 I just tried the line below and was able to get it working, the picture was in the same folder as the hta <BODY BACKGROUND="test.jpg">Just out of curiosity did you use a VM or an actual cd?
mbouchard Posted May 18, 2004 Posted May 18, 2004 I used a VM. Have not checked on a CD. Will try it today.
mbouchard Posted May 24, 2004 Posted May 24, 2004 I finally got around to testing this and yes it did work off of the CD.Mike
likuidkewl Posted May 25, 2004 Author Posted May 25, 2004 Thanks when I get around to it again, I will see what my issue is.
emila67 Posted December 10, 2022 Posted December 10, 2022 I used a VM. Have not checked on a CD. Will try it today.
Dave-H Posted March 27, 2023 Posted March 27, 2023 @emila67 You are aware the previous post to yours was 18 years ago?!
Tripredacus Posted March 27, 2023 Posted March 27, 2023 Dave-H reply not that timely either. But if you have to bump an old topic, it is best to at least add something to it. I have no answer on how to put a BMP as the background since JPG seems to work just fine. The issue nowadays is not the difference between 4:3 and 16:9 or 10, it is that some hardware seems to be able to stretch the background fine to fit, and some do not. And forget about 4K displays. There doesn't seem to be a good way around getting one singular HTA at fullscreen to be able to reliably fit the background image on multiple different aspect ratios, resolutions and video controllers. 2
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