MSFN Forum: WinPE 2.0 simple Ghost Menu HTA - MSFN Forum

Jump to content


  • 6 Pages +
  • « First
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic

WinPE 2.0 simple Ghost Menu HTA a simple HTA to make Ghosting easy Rate Topic: -----

#101 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 28 September 2011 - 09:12 AM

View Postrafael901, on 27 September 2011 - 11:10 AM, said:

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.


#102 User is offline   rafael901 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 29 September 2011 - 09:22 AM

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 User is offline   rafael901 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 29 September 2011 - 10:41 AM

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 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 30 September 2011 - 08:28 AM

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.

#105 User is offline   rafael901 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 03 October 2011 - 08:07 PM

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 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 04 October 2011 - 08:27 AM

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?

#107 User is offline   rafael901 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 04 October 2011 - 09:27 AM

It just states that there was an script error and that the script could not run. The error was not specific.

#108 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,427
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 04 October 2011 - 10:34 AM

View PostTripredacus, on 04 October 2011 - 08:27 AM, said:

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 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 04 October 2011 - 10:47 AM

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.

#110 User is offline   rafael901 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 10 October 2011 - 10:26 AM

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 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 11 October 2011 - 08:35 AM

View Postrafael901, on 29 September 2011 - 10:41 AM, said:

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.



View PostTripredacus, on 30 September 2011 - 08:28 AM, said:

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.



View Postrafael901, on 10 October 2011 - 10:26 AM, said:

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.

#112 User is offline   ismine 

  • Group: Members
  • Posts: 2
  • Joined: 08-July 11
  • OS:none specified
  • Country: Country Flag

Posted 17 July 2012 - 01:32 AM

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 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 17 July 2012 - 08:29 AM

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.

#114 User is offline   ismine 

  • Group: Members
  • Posts: 2
  • Joined: 08-July 11
  • OS:none specified
  • Country: Country Flag

Posted 17 July 2012 - 01:01 PM

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 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 18 July 2012 - 09:15 AM

View Postismine, on 17 July 2012 - 01:01 PM, said:

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.

#116 User is offline   rafael901 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 23-September 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 25 January 2013 - 07:48 PM

Has anybody adjusted this script to work in winpe 4.0?

#117 User is offline   sinad 

  • Group: Members
  • Posts: 1
  • Joined: 12-February 13
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 25 February 2013 - 02:18 AM

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"

Share this topic:


  • 6 Pages +
  • « First
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy