Jump to content











Photo
- - - - -

HTML Component Support in Vista PE


  • Please log in to reply
5 replies to this topic

#1 TofuBug

TofuBug
  • Members
  • 3 posts
  • Location:Apalachin NY
  • Interests:C#<br />Managed C++ (only a little here and there)<br />SQL (flat industry standard)<br />SQL Server 2000 and 2005<br />DHTML<br />VBScript<br />VB.NET<br />VBA<br />HTA, HTC<br />Windows PE<br />ADSI/LDAP<br />WMI<br />
  •  
    United States

Posted 17 January 2008 - 05:32 PM

Greetings All,

I'm Looking for a little insight into a problem I’m having with my deployment boot CD that from playing around with VistaPE I’m pretty sure someone here can help me out.

First off let me say after playing around with version 11 the VistaPE using WinBuilder 074 and I must say it is a pretty slick and well written program I was able to consistently build CD's with explorer enabled, IE enabled, etc.

A few problems though It will not correctly detect and load drivers for the NIC on ANY assets my Group manages (we have several models of older IBM mostly pre Lenovo both laptops and desktops and we are now deploying Dells up to the current 755 optiplex, 390 Precision workstations and 630, 430 laptops) I’m currently using a boot CD built from the WAIK's Windows PE creation tools for Vista and every last asset (with the exception of the 755) the CD boots detects the NIC every time with nothing more than the out of the gate drivers and settings on the CD.

The second problem is more of a process problem than a functional problem. As nice as it is to have explorer loaded and to have access to most common applications while VistaPE is loaded for what we use it for on a day to day basis it is serious overkill. We manage over 10,000 assets with only 2 imaging technicians. Now of course it's not like they're doing all 10,000 at once we have a bench are set up in a dedicated room with enough capacity to have roughly 15-20 desktops and the same amount of laptops connected to our network for the only 3 tasks they do Image/Reimage DOD Hard Drive Wipe and Full Ghost System Backups. Due to the high volume of assets being worked at any one time I designed the CD to be incredibly simplistic since speed is much more important than extra GUI functionality.

To give you an idea where I stand here The CD was built like I said from the WAIK using their walkthrough in their help file for PE as I’m sure most people here are familiar with that or they can just look it up I won't insult everyone by running through it instead I’m just going to list the only out of the ordinary modifications to the WIM I’ve done for our uses
  • Added ADSI support for retrieving certain preexisting asset information from Active Directory
  • Guardian Edge's Encryption Plus Hard Disk (EPHD) Drive access utility (All our laptops have their hard drives completely encrypted and doing a backup requires the EPHD Access Utility to load the drive into a readable format)
  • Added a custom startnet.cmd which does the following
  • Of course runs wpeinit
  • Runs 3 NET USE commands to map 3 LAN shares from our imaging server using our domain admin setup account
  • Launches a simple HTA located on one of the LAN shares which allows the technician to either auto-backup an asset or image a system
Now I can't take credit for the total design of the system someone else set it up and frankly did a great job the only problem is the man was clueless when it came to scripting so when I took over the responsibility everything used to be either batch files or .cmd files I've been slowly updating things into HTA's for their ease of use and ease of maintenance. That being said I’m trying to incorporate a Network Connection Manager HTA I had developed for use on our desktops into the CD itself to launch after the wpeinit command in a nut shell it's just a multiple drive mapping HTA with ADSI User Account validation for group drive mapping and individual drive mappings.

The problem we have from time to time is that while the NET USE commands work fine they propose a few problems the first being if the technician simply miss types the password you either have to manually retype all three command strings in again, or re-run startnet.cmd (what they usually do) both take time and when you have a fully loaded bench little losses in time like that add up fast. So I had wanted to incorporate the HTA into the CD since at a worst case scenario they miss type the password the HTA just tells them to enter it again no extra time lost.

Now basic HTA's work like a charm when PE is booted HOWEVER... :thumbsup: The NCM HTA like 95% of all the HTA's I’ve developed are actually made up of several tasks specific HTC files.

For those of you who do not know what HTC files are let me elaborate if for nothing more than the fact I’ve found very little information on the internet of other people using or discussing HTC's other than Microsoft’s msdn descriptions and walkthroughs.

Basically HTC files house what are called HTML Components which for the sake of a simplistic explanation are files that define custom DHTML Elements with their own custom Properties, Methods, Collections, Events etc.

They are created with special HTML markup and the internal functionality is completely script driven.

The basic premise and why I’m addicted to them is once the HTC is written it at a maximum it takes 3 lines to implement the entire HTML Component into a parent web page or HTA (or even another higher level HTC)

<HTML xmlns:{Namespace}>

<? import namespace="{Namespace}" implementation="someHTC.htc">

<{Namespace}:SomeHTC id="SomeHTC1" CustomProperty="Something" oncustomEvent="DoSomething()"></{Namespace}:SomeHTC>

In my opinion the ability to quickly reuse that level of complicated controls that unlike com objects you can just go back with notepad and tweak if need be should be any good scripter's fantasy.

Here's the basic outline of the NCM HTA showing its HTC elements
  • IRIS_NCM.hta - Simple entry point nothing more than a container for the main HTC
    • IRIS_NCM.htc - houses other more task specific HTC's
    • Logon.htc - Displays a logon dialog box in a sudo-modal way which:
    • Accepts User Name and password with from user input or script inserted values
    • Fires 2 custom events for Successful or Unsuccessful logon's
    • The User Name and Password can be retrieved by the parent document for further use
  • DriveMappings.htc - Houses a list of DriveMapLine elements along with:
    • An Add Drive Select control and Button along with a matching Remove Drive Select control and Button which add and remove drive mapping lines while maintaining their alphabetical ordering
    • A Map Drive button that begins the process of attempting to map any DriveMapLines present
    • Has custom events for Success or failure of the attempted drive mappings as well as a custom event when a specific DriveMapLine is requesting Alternate Credentials
    • Internal method to load a defaultdrivemappings.xml file with predefined DriveMapLine information to preload commonly used network shares without the need to type them in
    • DriveMapLine.htc - The core functional component of the NCM (Note: the DriveMappings.htc has one implementation reference to this HTC but can have multiple copies of the DriveMapLine Element) It Houses
    • A drive letter textbox (Read-only) Filled in with the drive letter from the Add Select /Add Button controls of its Parent HTC
    • An UNCPath textbox for entering a desired path to a network share
    • An account override checkbox to allow that DriveMapLine to have different credentials than the group
    • Custom event to flag for the need for different credentials
    • Custom event to flag for an update to the UNCPath (for basic UNC validation, Same server two different accounts, not having \\ etc)
    • Custom events for successful and unsuccessful drive mapping
[/list][/list]Now this tool works like a charm in our normal user environment and works well, however when I try and run it under PE 2.0 which does have HTA and scripting and XML and WMI and MDAC support enabled and will successfully run a basic HTA chokes when it gets the HTC's :D

Obviously the functionality of HTC's are in something external to what is required to support mshta.exe

Now when I built a VistaPE CD with Explorer and IE enabled the NCM worked like a charm.

So my question or questions are what it would take to JUST enable IE in PE 2.0

not even to use as a graphical browser but just to have the proper dll's controls and support function needed to utilize IE's functionality from a scripting perspective

I honestly don't know if you have to have Explorer and IE together since M$ likes to integrate IE with Explorer or if you can just get IE loaded and working by itself with or will work

What I do NOT want though is to use either as the shell for PE again just IE's functionality

My apologies for the long drawn out post, But I get a little frustrating and I’m sure I’m not alone when you go to trying and figure out someones problem for which they only post a generic "help me" post. I'm hopping I’ve given enough information and outline things enough so we don't have to play excessive forum tag trying to get down to what my problem is before we can get to a solution (not that I am averse to excessive forum tag as long as it is moving in the direction of a solution :D )

Again phenomenal program and while it does not fit our imaging and data backup process I still might find a good use for it down the road so I am by no means tossing VistaPE away just setting it gently aside for now.

Thanks in advance for any help or direction

Cheers, :D

Ryan Strope

Distributed Services

(Software package development/testing)

Lockheed Martin Systems Integration Owego

(Cyber City Computers)

ryan.strope@lmco.com

Quid quid latine dictum sit, altum videtur



#2 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 17 January 2008 - 05:45 PM

If you haven't scanned the pinned items above, you might want to have a glance there -- in particular, my comments on NDIS 5.1 vs NDIS 6.0 drivers needed and on WinBuilder API quirks re file associations. IE7 is implemented in VistaPE's script options, but its (non)handling of local HTML, XML and client-side scripts needs some refinements.

#3 TofuBug

TofuBug
  • Members
  • 3 posts
  • Location:Apalachin NY
  • Interests:C#<br />Managed C++ (only a little here and there)<br />SQL (flat industry standard)<br />SQL Server 2000 and 2005<br />DHTML<br />VBScript<br />VB.NET<br />VBA<br />HTA, HTC<br />Windows PE<br />ADSI/LDAP<br />WMI<br />
  •  
    United States

Posted 17 January 2008 - 06:08 PM

If you haven't scanned the pinned items above, you might want to have a glance there -- in particular, my comments on NDIS 5.1 vs NDIS 6.0 drivers needed and on WinBuilder API quirks re file associations. IE7 is implemented in VistaPE's script options, but its (non)handling of local HTML, XML and client-side scripts needs some refinements.


Thanks for the quick response

I'm not all that worried about the network drivers like i said i won't actually be using VistaPE in our environment i just mentioned it from a feed back persective for the people running this project.

I had looked at a few of the items regarding IE but i've been searching on HTML Components and so far when i searched on IE functionality i've been getting results that are too obscure.

But I've looked up some of your pinned posts and will be reviewing them to see if i can glean something from them.

Basically I wanted to have an inf setup file for IE i can just load with the peimg /inf command

I was going to try and tear apart the .script file for loading Explorer and IE but i can't claim to even come close to understanding the WinBuilders .script files layout and syntax since monday was the first time i had even seen them

Anymore direction or suggestions will be gladly accepted

Thanks again for the help

Cheers, :thumbsup:

Ryan Strope

Distributed Services

(Software package development/testing)

Lockheed Martin Systems Integration Owego

(Cyber City Computers)

ryan.strope@lmco.com

Quid quid latine dictum sit, altum videtur



#4 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 17 January 2008 - 11:03 PM

Heh heh, good luck with your pursuit. Everyone seems to want his own 'customized' envoronment. WinBuilder goes a fair way in that direction, but it may not be able to fully satisfy your special requirements. If you manage to figure our all of IE's complex spiderweb of interdependencies, please share your discoveries. I'm still plowing through all the .INF files and registry dumps myself. :thumbsup:

You might find a good (better?) starting place with BartPE as its use of WinXP/2003 is somewhat more mature at present. Especially in the case of IE usage (with inevitable close ties to the Windows Explorer shell) VistaPE is, as mentioned, still struggling with some of those dependencies and with scripted applications in particular.

#5 TofuBug

TofuBug
  • Members
  • 3 posts
  • Location:Apalachin NY
  • Interests:C#<br />Managed C++ (only a little here and there)<br />SQL (flat industry standard)<br />SQL Server 2000 and 2005<br />DHTML<br />VBScript<br />VB.NET<br />VBA<br />HTA, HTC<br />Windows PE<br />ADSI/LDAP<br />WMI<br />
  •  
    United States

Posted 18 January 2008 - 01:27 AM

Heh heh, good luck with your pursuit. Everyone seems to want his own 'customized' envoronment. WinBuilder goes a fair way in that direction, but it may not be able to fully satisfy your special requirements. If you manage to figure our all of IE's complex spiderweb of interdependencies, please share your discoveries. I'm still plowing through all the .INF files and registry dumps myself. :thumbsup:

You might find a good (better?) starting place with BartPE as its use of WinXP/2003 is somewhat more mature at present. Especially in the case of IE usage (with inevitable close ties to the Windows Explorer shell) VistaPE is, as mentioned, still struggling with some of those dependencies and with scripted applications in particular.


Thanks I appreciate the encouragement :D

I'm kind of stuck with PE though

I have severe limitations placed on what i can use to accomplish things here.

First off we can not use anything that is freeware or open source unless it has gone through an extensive code review (which is never going to happen so there might as well not even be an "unless")

Yes Windows PE 2.0 is techincally freeware but being as we're one the largest companies utilizing and deploying microsoft products we're allowed to use Windows PE

Now when i first took over the responsibilty of maintaining the PE CD they were running from the 2003 server based version and not only was it a pain in the ass to even build one of those cd's but the simple fact that when new hardware arrived the entire collection of cd's had to be recreated with the new drivers (at least with PE 2.0 our technicians can just use drvload to inject the drivers as an after thought using the same PE CD instead of being dead in the water)

So as much as this IE problem is annoying me the things i have gained going to PE 2.0 far out weight that issue.

I will however keep plugging away at it and i will of course let everyone know if i get something work

Bear in mind though what i am after is strictly script level support for .HTA and .HTC files only so even if i get everything working for what i need i can't guarantee it will work on the visual side.

Again thanks for the encouragement i'll keep you as posted as my overloaded schedule allows :D

Cheers, :D

Ryan Strope

Distributed Services

(Software package development/testing)

Lockheed Martin Systems Integration Owego

(Cyber City Computers)

ryan.strope@lmco.com

Quid quid latine dictum sit, altum videtur



#6 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 18 January 2008 - 04:55 AM

I understand. Having retired from the world of bureaucratic constraints a few years ago, I'm now free to experiment with all kinds of "unsanctioned" stuff. I only suggested having a look at BartPE because some of its basic core .INF files (with optional addons separated out) might provide some clue as to those elements that are needed to meet your specific requirements without all the extra baggage.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users