HTA错误:Windows 7安装过程中出现空白屏幕 [英] HTA Error: Blank screen during Windows 7 installation

查看:71
本文介绍了HTA错误:Windows 7安装过程中出现空白屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,



我要在新机器的Windows安装过程中创建一个HTA文件。



我想要测试我的示例HTA文件,但在安装启动期间,我所看到的只是"一个空白的白色窗口"。



以下是我的HTA文件的代码:

Hello All,

I've to create an HTA file that will work during Windows Installation on a new machine.

I'm tying to test my sample HTA file but during installation startup, all I'm seeing is "a blank white window".

Below is the code of my HTA file:

<html>

<head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

    <style>
.fullbackground{
    ;
	width:100%; /* alternative: right:0; */
    height:100%; /* alternative: bottom:0; */
}
img.fullbackground{
    ;
    z-index:-1;
    top:0;
    left:0;
    width:100%; /* alternative: right:0; */
    height:100%; /* alternative: bottom:0; */
} 
       
.messageSection { ; width: 100%; }
		
        
       
.mainbody,
.header,
.footer {
    padding: 5px;
}
.mainbody {
    margin-top: 25px;
    min-height: 150px;
    max-height: 388px;
    overflow: auto;
}
.messagePara {	font-family: Calibri; font-size: 16pt; font-weight: bold; color: #FFFFFF; text-align: center;  margin-left:20%; margin-right:20%; margin-bottom:20%;}

.header {

    margin: auto;
    width: 60%;
 
    padding: 10px;
	text-align:left;
	color: #FFFFFF; font-family: Calibri; font-size: 14pt; font-weight: bold; margin-top:30px;

	
}
.footer {
    height: 40px;

    -webkit-border-bottom-left-radius: 5px;
    -webkit-border-bottom-right-radius: 5px;
    -moz-border-radius-bottomleft: 5px;
    -moz-border-radius-bottomright: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
	
	font-family: Calibri; font-size: 11pt; font-weight: bold; color: #FFFFFF; text-align: center; ; width:100%;	bottom:0;	left:0;
}
	   
    </style>

    <HTA:APPLICATION ID="oHTA"
         BORDER="none"
         CAPTION="no"
         CONTEXTMENU="no"
         Icon="autorun.ico"
         INNERBORDER="no"
         NAVIGABLE="yes"
         SCROLL="no"/>

    <script language="javascript">

	var __TITLE_VAR_TEXT   		      = "Sample Title";
    var __COPYRIGHT_VAR_TEXT          = "Sample Footer";
    var __MESSAGE_DISC_VAR_TEXT        = "Sample Message";
    var __LINKBODYBACKGROUND_VAR_TEXT = "Sample.jpg"; //background image

    var splashWindowWidth  = 637;
    var splashWindowHeight = 479;


    if (window.screen)
    {

        splashWindowLeft = (window.screen.availWidth - splashWindowWidth) / 2;
        splashWindowTop  = (window.screen.availHeight - splashWindowHeight) / 2;
    }

    try
    {

        window.moveTo(splashWindowLeft, splashWindowTop);
        window.resizeTo(splashWindowWidth, splashWindowHeight);
    }
    catch(e){}

    

    function windowOnLoad()
    {
		maxWindow();
        document.title = __MESSAGE_DISC_VAR_TEXT;
		
		document.getElementById("image").src=__LINKBODYBACKGROUND_VAR_TEXT;
		
        window.setTimeout("closeScreen()",5000);

    }

    function closeScreen()
    {
        self.close();
    }
	

	
function maxWindow()
{
window.moveTo(0,0);

if (document.all)
{
  top.window.resizeTo(screen.availWidth,screen.availHeight);
}

else if (document.layers||document.getElementById)
{
  if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
  {
    top.window.outerHeight = screen.availHeight;
    top.window.outerWidth = screen.availWidth;
  }
}
}

    </script>
</head>

<body style="text-align: center; " onload="windowOnLoad()">
<div class="fullbackground">
<img id="image" class="fullbackground" />
    <div class="header"> <script language="javascript">document.write(__TITLE_VAR_TEXT);</script></div>
    <div class="mainbody">
        <p id="messagePara" class="messagePara">
         <script language="javascript">document.write(__MESSAGE_DISC_VAR_TEXT);</script>
	</p>
    </div>
    <div class="footer"> <script language="javascript">document.write(__COPYRIGHT_VAR_TEXT); </script></div>
 </div>
</body>

</html>




我用以下条目更新了所需的INI文件: -


[样本]

类型=命令

Caption =启动用户界面

Reboot = No

CommandLine =" mshta.exe%programfiles%\Folder_1 \Folder_2 \ .Folder_3 \ Folold_4 \ Sample.hta"
$


我已经参考以下网址: -


http://www.windows-noob.com/forums/topic/5968-hta-blank-screen/



http://blogs.msdn.com/b/joelschoenberg/archive/2008/08/18/maintenance-booting-your-windows-machines.aspx



但没有一个选项有效。



我也试过将HTA文件传递给下面提到的论点: - < br $>


CommandLine = mshta.exe

参数="%programfiles%\Folder_1 \Folder_2 \ Folder_3 \ Folder_4 \ Sample .hta" b
$
但它没有用。



注意:我以前也使用的"直接路径; Sample.hta"文件,但它仍然没有出现。



安装之前,我已经尝试按F8键并使用mshta.exe运行HTA,这完全正常。



任何人都可以分享一些关于如何执行此"HTA"的建议。来自INI文件和正确的commandLine值?

提前付款。


I've updated the required INI file with the following entries:-

[Sample]
type = command
Caption=Launching user interface
Reboot=No
CommandLine="mshta.exe %programfiles%\Folder_1\Folder_2\Folder_3\Folder_4\Sample.hta"

I've referred the below URLs :-

http://www.windows-noob.com/forums/topic/5968-hta-blank-screen/

http://blogs.msdn.com/b/joelschoenberg/archive/2008/08/18/maintenance-booting-your-windows-machines.aspx

But none of the options worked.

I also tried with passing the HTA file in arguments as mentioned below:-

CommandLine=mshta.exe
Arguments="%programfiles%\Folder_1\Folder_2\Folder_3\Folder_4\Sample.hta"

but it didn't worked.

NOTE: I've also used the direct path of "Sample.hta" file but it still didn't show up.

Before installation, I've tried pressing F8 key and running the HTA using mshta.exe and that works completely fine.

Can anyone please share some suggestions of how to execute this "HTA" from INI file and the correct commandLine value ?
Thanks in advance.

TECHIT_ASHISH

TECHIT_ASHISH

推荐答案

尝试为mshta.exe和任何参数指定完整路径。如果在任何路径中都有空格,请不要忘记引号。

Try to specify full paths for both mshta.exe and any arguments. Do not forget quotation marks if you have spaces in any paths.

我通常使用这样的命令行:

I usually use a command line like this:

%SYSTEMROOT%\ System32 \ mshta.exe" full_path_to_file_including \%environment_variables%\ file.hta"

%SYSTEMROOT%\System32\mshta.exe "full_path_to_file_including\%environment_variables%\file.hta"


这篇关于HTA错误:Windows 7安装过程中出现空白屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆