Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

WinPE 2.0 simple Ghost Menu HTA

- - - - -

  • Please log in to reply
117 replies to this topic

#101
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,921 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Now I have 2 all white boxes that pop up with nothing on them when I load the image. I have the HTA, Scripting, Legacy Setup packages added to the image. Does anybody know what code is changed in 3.0? Need Help to get this to work.

Thanks


I've not used this HTA before, but I know I had to make some VBScript changes in mine to work with WinPE 3.0. I'm not sure what would need to be changed in this one.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg


How to remove advertisement from MSFN

#102
rafael901

rafael901

    Newbie

  • Member
  • 11 posts
  • Joined 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag
Ok,

I just switched to winpe 2.0 instead of 3.0. But now I am getting the access denied problem when I call my .hta file from the mapped drive cmd.exe /c Mshta.exe z:\wizard.hta. Did anyone ever solve this problem? I do not want to use the X: system drive. I prefer to stick with the mapped network drive for editing purposes.

#103
rafael901

rafael901

    Newbie

  • Member
  • 11 posts
  • Joined 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag
I found the solution in another thread to the access denied problem but now I have an all white .hta file that comes up on my winpe image.

#104
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,921 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

You are likely battling network permissions. I never tried to run an HTA from a network share. Use a USB key (or WDS) to have your boot image on, so you can easily mount and edit it.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#105
rafael901

rafael901

    Newbie

  • Member
  • 11 posts
  • Joined 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag
I was able to get the .hta file to work over the network except for the information in my .htm files does not show up. I created the files using excel and saved them as html files in my ghost images directory. All the category buttons show up and the radio button show up but the information in the .htm files does not show up on the side when I click one of my radio buttons. It just give an script error message and asks if I would like to continue. Any ideas on what's wrong?

#106
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,921 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

I'd be scared to see the source of an html file made in Excel. :o

Your first step is to start with the script error. What does it say?
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#107
rafael901

rafael901

    Newbie

  • Member
  • 11 posts
  • Joined 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag
It just states that there was an script error and that the script could not run. The error was not specific.

#108
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,593 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

I'd be scared to see the source of an html file made in Excel. :o

And you would be right! :thumbup
All those Msohtml tags could grab you at the ankles :ph34r: and drag you with them in the abysses of perverse abomination ..... :w00t:
This one is a single sheet workbook created from scratch with just "Hello, world!" in A1:
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 10">
<link rel=File-List href="hallo_file/filelist.xml">
<link rel=Edit-Time-Data href="hallo_file/editdata.mso">
<link rel=OLE-Object-Data href="hallo_file/oledata.mso">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>jaclaz</o:Author>
  <o:LastAuthor>jaclaz</o:LastAuthor>
  <o:Created>2011-10-04T15:57:36Z</o:Created>
  <o:LastSaved>2011-10-04T15:58:28Z</o:LastSaved>
  <o:Version>10.2625</o:Version>
 </o:DocumentProperties>
 <o:OfficeDocumentSettings>
  <o:DownloadComponents/>
  <o:LocationOfComponents HRef="file:///E:\"/>
 </o:OfficeDocumentSettings>
</xml><![endif]-->
<style>
<!--table
	{mso-displayed-decimal-separator:"\,";
	mso-displayed-thousand-separator:"\.";}
@page
	{margin:.98in .79in .98in .79in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;}
tr
	{mso-height-source:auto;}
col
	{mso-width-source:auto;}
br
	{mso-data-placement:same-cell;}
.style0
	{mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	white-space:nowrap;
	mso-rotate:0;
	mso-background-source:auto;
	mso-pattern:auto;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Arial;
	mso-generic-font-family:auto;
	mso-font-charset:0;
	border:none;
	mso-protection:locked visible;
	mso-style-name:Normale;
	mso-style-id:0;}
td
	{mso-style-parent:style0;
	padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:windowtext;
	font-size:10.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Arial;
	mso-generic-font-family:auto;
	mso-font-charset:0;
	mso-number-format:General;
	text-align:general;
	vertical-align:bottom;
	border:none;
	mso-background-source:auto;
	mso-pattern:auto;
	mso-protection:locked visible;
	white-space:nowrap;
	mso-rotate:0;}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>Sheet1</x:Name>
    <x:WorksheetOptions>
     <x:Selected/>
     <x:Panes>
      <x:Pane>
       <x:Number>3</x:Number>
       <x:ActiveRow>1</x:ActiveRow>
      </x:Pane>
     </x:Panes>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:WindowHeight>12015</x:WindowHeight>
  <x:WindowWidth>21915</x:WindowWidth>
  <x:WindowTopX>0</x:WindowTopX>
  <x:WindowTopY>105</x:WindowTopY>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml><![endif]-->
</head>

<body link=blue vlink=purple>

<table x:str border=0 cellpadding=0 cellspacing=0 width=77 style='border-collapse:
 collapse;table-layout:fixed;width:58pt'>
 <col width=77 style='mso-width-source:userset;mso-width-alt:2816;width:58pt'>
 <tr height=17 style='height:12.75pt'>
  <td height=17 width=77 style='height:12.75pt;width:58pt'>Hello, world!</td>
 </tr>
 <![if supportMisalignedColumns]>
 <tr height=0 style='display:none'>
  <td width=77 style='width:58pt'></td>
 </tr>
 <![endif]>
</table>

</body>

</html>

jaclaz

#109
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,921 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Well in that case, I'd recommend you use some other type of editor to work with your HTA file. I can see WinPE may have a lot to complain about with code like that.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#110
rafael901

rafael901

    Newbie

  • Member
  • 11 posts
  • Joined 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag
Can HTAs work properly if they are lauched from a mapped network drive? When I launch my HTA file from the local machine everthing works perfectly but nothing works when I launch it from a mapped drive.

#111
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,921 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

I found the solution in another thread to the access denied problem but now I have an all white .hta file that comes up on my winpe image.



You are likely battling network permissions. I never tried to run an HTA from a network share. Use a USB key (or WDS) to have your boot image on, so you can easily mount and edit it.



Can HTAs work properly if they are lauched from a mapped network drive? When I launch my HTA file from the local machine everthing works perfectly but nothing works when I launch it from a mapped drive.


Back to this again? If you want to keep your HTA on the network drive, that's fine. Try copying it to the RAMDISK and run it from there.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#112
ismine

ismine
  • Member
  • 2 posts
  • Joined 08-July 11
  • OS:none specified
  • Country: Country Flag
hi,

Maybe this post is old, but he deserves to be reviewed.

I tried to reproduce the same, but without success, I get an error at this line:

For Each objFile in colFileList

I suspicion this piece of code :

Set colFileList = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='z:\\winpe\\" & fileName & "'} Where " & "ResultClass = CIM_DataFile")

"colFileList" is not a collection
When i use MsgBox to display it's contents (filename) i get " & fileName & "

Thank you for help

#113
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,921 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

I'll agree. The WMI code is suspect because it is written expecting it to work 100% of the time. For example, there is no check to see if the data collected is an object, or is an array.

Did you install the WMI package into your WinPE? Are you using WinPE 2.0 like the OP has this coded for?

There is some changes to how VBScript is handled between WinPE 2.0 and WinPE 3.0, this I ran into when I updated my HTA as well. The changes aren't documented as far as I know.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#114
ismine

ismine
  • Member
  • 2 posts
  • Joined 08-July 11
  • OS:none specified
  • Country: Country Flag
Hi,
Tested on online OS (W7) and I think that's enough.

Set colFileList = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='z:\\winpe\\" & fileName & "'} Where " & "ResultClass = CIM_DataFile")
If I understand this code, The Win32_Directory.Name is directory class and the return type is file so it don't work. I tried some other stuff without success.
If someone has successfully make it work, (keeping the same idea) thank you in advance for clarification.

#115
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,921 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Hi,
Tested on online OS (W7) and I think that's enough.


I would disagree. There are way too many differences between WinPE 3.0 and Windows 7 to rely on testing on a live OS to be enough.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#116
rafael901

rafael901

    Newbie

  • Member
  • 11 posts
  • Joined 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag
Has anybody adjusted this script to work in winpe 4.0?

#117
sinad

sinad
  • Member
  • 1 posts
  • Joined 12-February 13
  • OS:Windows 7 x64
  • Country: Country Flag
Thank you very much to all for your information, especially Keythom, this is just what I needed.
I've configured everything with WinPE 3.0 and works properly, about the restart after the ghost, the problem is that the path should be of MS-DOS, there are two options or leave the ghost in a shorter route or put the path type ms-dos, I've configured with the second option and I've added a small vbs as showing a message over and press OK to restart the computer.

strTaskValue = "cmd /C x:\progra~2\ghost\ghost32.exe" & " -clone,mode=restore,src=" & Chr(34) & Radio.Id & ".gho" & Chr(34) & ",dst=1,sze1=30000M,sze2=V -sure " & chr(38) & " z:\WinPE\mensaje.vbs" & chr(38) & " wpeutil reboot"

#118
baxtin

baxtin
  • Member
  • 1 posts
  • Joined 05-September 13
  • OS:Vista Enterprise x86
  • Country: Country Flag

I know this topic is pretty old but I was rehashingi t for use in my environment recently. If anyone is having Script errors when the program runs it is likely related to your folder structure. Ensure your host system has Z:\images\winpe for example. I accidentally created only Z:\winpe and then I mapped it in the startnet.cmd. So when the script looked for winpe it wasnt there, hope this helps someone late to the game.

 

 

Also, if you want to make an easy .htm details for your images use Word 2013 and save as a Web Page Filtered.


Edited by baxtin, 06 September 2013 - 03:19 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users