Jump to content

New User -- Problems with manual


Recommended Posts

Hi,

I was googling around today looking for some info on silent applications installs, when I came across WPI. I was interested enough to download it, print out and read the manual; and try the hta out. I've spent a very frustrating half-day on this.

My problems are with chapters 5 and 6 of the manual, config.js, the config page in the hta; and how they all hang together/interact. The information in ch 5&6 seem very similar, and I don't quite see the differences. Also all the examples in thes two chapters are quite low level. I see no documentation on where you use global variables and higher functions in wpi. I see no evidence of their use in the sample config.js. I'm guessing that the stuff entered on the config hta page ends up creating config.js, but this is nowhere explicitly documented. Is config.js really jscript code? (I'm not much of a jscript person :rolleyes: ). A couple of paragraphs explaining how the various parts hang together at a high level is needed. For example I can find nothing in the manual about how to use global variables and functions.

My interest in this is in automating app-installs in a corporate environment, where most builds are done using MDT 2010 in a virtual machine. In this situation DVD/CD geometries are not very important, and in fact MDT expects things to be in different locations than they would be on a DVD/CD. MDT 2010 gives quite a bit of folder flexibility as to where various OS/App components reside -- so the kind of "how things hang together" documentation is important in helping how to slot things like WPIinto the MDT environment in the most efficacious manner.

That said, is there any function/variable that would indicate whether you are running in a VM? There are certain apps/pkgs which should only be installed when running in a VM (VMadditions comes to mind), and of course the opposite is also true. (Also the new XP mode in Win7 will make virtualization considerations even more important). If there isn't such a facility, consider it a future feature request.

WPI provides a nice easy way to configure the universe of silent app/pkg installs. Is there any way to force WPI itself to run silent -- ie install everything that's configured with no user choice? There are other ways to do this built into MDT, but your ui plus use of USSF, make WPI potentially attractive (even though from doc you seem to be focused a lot on gui issues, themes, etc).

Even better: a way to force a subset of apps to install silently with no user choice (the core apps), and another subset which lets the user choose from a menu (the optional apps)? Consider this a feature request as well.

Lastly, the hta seems abominably slow. I'm running on a 2ghz dual core 2gb machine ad when I switch pages I get a completely white screen for up to 15-30seconds at every switch.

A final documentation thought: Microsoft (and others) have been doing a lot of the kind of doc I'm looking for via 10-30 minute videos -- I find these very helpful in getting started, providing context, etc -- perhaps youse guys might consider making a 10-1`5 minute video and posting it on youtube. just a thought :P

Thanks in advance,

ed boyhan

Edited by eboyhan
Link to comment
Share on other sites


WPI provides a nice easy way to configure the universe of silent app/pkg installs. Is there any way to force WPI itself to run silent -- ie install everything that's configured with no user choice? There are other ways to do this built into MDT, but your ui plus use of USSF, make WPI potentially attractive (even though from doc you seem to be focused a lot on gui issues, themes, etc).

Even better: a way to force a subset of apps to install silently with no user choice (the core apps), and another subset which lets the user choose from a menu (the optional apps)? Consider this a feature request as well.

Lastly, the hta seems abominably slow. I'm running on a 2ghz dual core 2gb machine ad when I switch pages I get a completely white screen for up to 15-30seconds at every switch.

OK you ask some tough questions. I am working on the manual tonight, so your opinions will be taken into consideration.

NOW for the meat of your post:

WPI has gone into MAJOR development lately. there is scads of things in there that have barley been touched on. While the changelog is informative and the manual does show all of them the options are endless. There are dozens of conditions to check for nearly anything in a os and the hardware. Please check chapter 5 & 6. Plus mritter is adding ALOT more each version. Checking for a vm install is pretty easy if you check on a reg key or even a VM specific piece of hardware.

To run WPI fully silently you just put timer=1 or even 0 after configurating using the cmdline switch or through the options wizard.

Now for the feature request you can use the new JSCRIPT addshortcut feature mritter JUST added and add a short to the desktop to run WPI after the initial run with different switches so the user has time to choose the apps. There is several ways to do this. mritter might have a better idea on this too.

As for the slow time. I bet you have a CD\DVD in your main drive right? WPI checks for that. Also the "Allow check for a internet connetion" may slow down the start process abit.

Please take some time to read the changelog and rest of the manual, you will see that there are close to, if not over a hundred newer features in WPI that EVERYone is still getting used to.

v8 (Comming soon) Will have a HUGE new Network Wizard tab and Even the ablity to set user profiles up.

mritter is a wizard at this!

Untill last year WPI barely had NO manual to speak of. (I hate the bookwork and so does mritter) I have been concentrating on the manual. I see now that we need to get more technical with it, I had based it on just the base functions and a new user. I will make the next version much more informative. I already added 2 new chapters to it so I have plenty of room.

I was recently donated a demo video software maker so I will strive to put out a mid level configuring WPI video soon. Not untill Tue at the earliest as the weekend is really busy for me.

Edited by Kelsenellenelvian
Please excuse the spelling and rambling it is getting late (Or early)
Link to comment
Share on other sites

hi again,

Thanks for your prompt reply; it was helpful.

I went back and read the manual again a little more carefully (the changelog is part of this), but I still cannot figure out where/how one uses the global variables and functions. I don't see them in the sample config.js, and the manual (as previously stated) does not indicate where these are used. If you could give me some assistance in this, I would appreciate it.

I gather from your response that the correct way to handle installing different sets of applications is to call the HTA separately once for the core applications, and once for the optional applications. The former having no user interface interaction (being invoked at first boot), and the latter presenting the user with a menu of choices (being invoked at first logon). I am assuming of course that WPI can be invoked from a command line inside a batch file, or a cmdlines.txt file (or even from within an MDT custom task sequence).

I then went back to the manual to find out how to call the HTA from the command line with options, but I could only find one reference to this: that reference specified something like: "wpi.hta options= a bunch of file names" but no documentation as to what these file names refer to, what their contents might be, or how the files themselves are to be created. There was some info on folders used to find the files, but nothing else. Perhaps the manual should have several examples of wpi.hta command invocations with different options, and config files specified with listings of each file's contents, and what they mean. As with much of the manual the documentation here presupposes that one knows a fair bit about WPI already, which is fine if that presupposed knowledge is documented prominently elsewhere (preferably earlier) in the manual.

There are quite a few threads in Msfn.org dealing with WPI CMD files. I am printing the most interesting of them out, will look them over, and see whether or not they give me any more insight into how WPI commandline invocations are used.

As to VM detection, this is not particularly straightforward. No approach will work for all virtualization platform vendors nor will any approach be guaranteed to work from version to version within a virtualization vendor's platform. For Microsoft VM platforms the best approach appears to be to use WMI to query the motherboard manufacturer, if this string is "MICROSOFT", then you are running within a Microsoft virtualization platform, (and as long as Microsoft does not get into the motherboard manufacturing business :blushing: ) this approach should work fairly well. (This approach was suggested in a blog by a Microsoft employee so it should be fairly reliable). There is nothing in the registry that will indicate that one is running in a virtual machine. If one thinks about this, that must be the case otherwise virtualization wouldn't work very well. There are many interesting blog postings on this subject -- many I fear having been written by those who have watched the movie "the Matrix" one too many times :no: . This detection (or the results thereof) must be in-process in order for it to be of use to the HTA installation activity. One way to do this would be for someone to incorporate the detection capability within WPI; another would be to create a utility which runs before WPI is called and have the results of the detection stored somewhere. There is one detection program that come up on a Google search, but it is GUI only -- not much use here; there are also several vbscript fragments in several blogs that could be used. The two obvious places to store the results of the detection would be in the environment, or in the registry. Environment contents are only available in-process (so back to implementing in WPI unless one uses SETX -- -- but this ultimately ends up putting a result in the registry anyway, and that then requires that the entry be deleted when you are done with it -- for entries in the registry one also has to decide where in the registry would be most appropriate to put it. I gather that wpi does not use an installer and so there are no specific wpi entries in the registry??). Given how WPI is almost exclusively implemented in Jscript I'm not even sure that WMI queries are possible from within this environment (although I'm pretty sure vbscript/jscript can be intermixed on the same HTML page) -- as I am not an expert in webpage scripting.

As to the slowness of WPI I checked and I do not have any CDs or DVDs in the drive; I am however permanently connected to the Internet. The slowness does not occur on initial page opening only on page transitions between tabs, and drop-down selections. My default browser is Firefox, and I wonder if this could be contributing to the slowness as you are using the MSHTA engine, and the switching back and forth between the IE and the Firefox engines may be contributing to the delays. As I am not using WPI in any kind of installed/configured environment, I propose to let this issue rest until such time as I am using WPI for real (this will not be for a couple of weeks as I am presently debugging several MDT 2010 problems).

A couple of final thoughts: I would suggest separating all UI options, themes, etc. from HTA invocation options. This will let those interested in UI customizations to focus on them appropriately and those only interested in how WPI is executed to hone in on those options without having to worry about a lot of UI clutter. Lastly, I too hate documenting (I'm a crummy typist to boot -- the teacher said never to look at the keyboard, but of course I did/do :-)), and I can sympathize -- -- in fact most of this reply was dictated using Dragon NaturallySpeaking (I had used this package several years ago and it was marginally useful; the current version is much improved, and if I can just learn to think and dictate in the same fashion that I think and type, then all will be well).

Regards,

Ed

Link to comment
Share on other sites

  • 3 weeks later...
I see no documentation on where you use global variables and higher functions in wpi.

At the moment I think that you just need to poke around this forum to find examples.

Here's one:

prog[pn]=['Windows Defender 1.0'];
uid[pn]=['WINDOWSDEFENDER'];
desc[pn]=['Windows Defender is a security technology.'];
ordr[pn]=[503];
dflt[pn]=['yes'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['System Protection'];
cmds[pn]=['%CDROM%\\DVD-Tools\\nircmd.exe execmd start/wait %CDROM%\\DVD-Apps\\KB893803v2.exe /Q /N /Z','%CDROM%\\DVD-Tools\\nircmd.exe execmd start/wait %CDROM%\\DVD-Apps\\WindowsUpdateAgent20-x86.exe /wuforce /quiet /norestart','%CDROM%\\DVD-Tools\\nircmd.exe execmd start/wait %CDROM%\\DVD-Apps\\WindowsDefender.msi /passive /norestart','{JSCRIPT}=TimedWaitForFile("%ALLUSERSPROFILE%\\Start Menu\\Programs\\Windows Defender.lnk"%comma%60)','%CDROM%\\DVD-Tools\\nircmd.exe win close title "Windows Defender (Beta 2)"'];
cond[pn]=['getOSver() == "XP" && getSPver() >= 2'];
pn++;

It uses a couple of the documented functions to only install Windows Defender on Windows XP Service pack 2 and later.

That said, is there any function/variable that would indicate whether you are running in a VM?

No, otherwise it wouldn't be very good virtualisation. However, you can probably work out that you are running under VirtaulBox (or Virtual PC or Bohs or VMWare) by looking at some of the hardware. The manual does have examples of finding the PCI id of various things.

If you just want to avoid installing VirtualBox Guest Additions when you install on real hardware, don't worry about it. It doesn't seem to have done this system I'm using right now any harm ...

Lastly, the hta seems abominably slow. I'm running on a 2ghz dual core 2gb machine ad when I switch pages I get a completely white screen for up to 15-30seconds at every switch.

I thought it was just me with my 200+ apps, but maybe not then ...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...