Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WSh and drive mappings

92 views
Skip to first unread message

Richard Hornung

unread,
Dec 10, 2002, 1:55:30 PM12/10/02
to
I am trying to find a script that will allow me to interactivly enter drive
letter servername\share name, userID/domain, password with the password
field starred or blanked out to map drives on windows 2000 machines.


Michael Harris (MVP)

unread,
Dec 10, 2002, 9:56:35 PM12/10/02
to

Write a simple HTA...

HTML Applications (HTA)
http://msdn.microsoft.com/workshop/author/hta/hta_node_entry.asp


--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US


Tarjei T. Jensen

unread,
Dec 11, 2002, 6:48:06 AM12/11/02
to

"Michael Harris (MVP) wrote:
> Write a simple HTA...
> HTML Applications (HTA)
> http://msdn.microsoft.com/workshop/author/hta/hta_node_entry.asp

That is just the reference for the HTA:APPLICATION tag. It really does not
tell us how tro create HTML applications.

I've had a look in a couple of books and it looks like if I want to know how
to program in a HTA, I will have to read a book on dynamic HTML (DHTML).

greetings,


Michael Harris (MVP)

unread,
Dec 11, 2002, 10:02:03 AM12/11/02
to
> I've had a look in a couple of books and it looks like if I want to
> know how to program in a HTA, I will have to read a book on dynamic
> HTML (DHTML).

Correct, HTAs are simply DHTML pages hosted by mshta.exe instead of
iexplore.exe (the IE browser). Except for the HTA:APPLICATION tag and the
APPLICATION attribute of FRAME/IFRAME, it's all just standard DHTML
coding...

Tarjei T. Jensen

unread,
Dec 11, 2002, 11:00:37 AM12/11/02
to
Michael Harris (MVP) wrote:
> Correct, HTAs are simply DHTML pages hosted by mshta.exe instead of
> iexplore.exe (the IE browser). Except for the HTA:APPLICATION tag and the
> APPLICATION attribute of FRAME/IFRAME, it's all just standard DHTML
> coding...


Any recommendations for which book to go for?
Any book with sensible examples?


greetings,

Michael Harris (MVP)

unread,
Dec 11, 2002, 3:06:19 PM12/11/02
to

If I were looking for a current DHTML book, I'd check www.wrox.com. I have
"IE5 Dynamic HTML Programmer's Reference". I just checked and they don't
appear to have any IE6 specific titles, but an IE5 reference is still a good
starting spot for fundamentals. The MSDN DHTML docs are then the place to
go for current version support.

I doubt you'll find any books about HTAs explicitly. The "VBScript
Programmer's Reference" from Wrox has a chapter on HTAs as well as chapters
on the other significant script host environments like WSH, ASP, WSCs, IE,
etc.

Paul Randall

unread,
Dec 11, 2002, 4:09:03 PM12/11/02
to

"Tarjei T. Jensen" <tarjei...@akerkvaerner.com> wrote in message news:3df76125$1...@news.wineasy.se...

Hi,
Depending on how well you know how to use your newsgroup reader, and its capabilities, you may be able to get all the info you need
right here at microsoft.public.scripting.wsh and microsoft.public.scripting.vbscript.

The following comments apply to Outlook Express 5.5.
Under Tools -> Options -> Read, you can specify how many headers to get at a time. Using a big number, such as 1000, allows you to
get a lot of info at onces. If you have the checked the box for 'automatically expand grouped messages, you can easily search all
of these headers for certain authors.

Under Edit -> Find -> Message in this folder,
you can enter some person's name. Joe Earnest, for instance, has attached files a number of times to his postings. The code in
these attachments will likely be useful to you.

I think there is a way to get OE to download all of the text of the messages too. By default it just downloads the headers, and
doesn't download each message's text until you attempt to display it. Synchronize may be the term to look for in the OE help. This
could take a long time, depending on your net connection speed. If you get all the contents of the messages downloaded, then you
can use the Edit -> Find -> Message in this folder box to search the message contents by checking the checkbox for that. If you do
that and search for some text that is used only withing HTAs, such as hta:application, you will probably find a number of handy
working examples of HTAs.

I hope this helps

-Paul Randall


Michael Harris (MVP)

unread,
Dec 11, 2002, 8:18:09 PM12/11/02
to
> Depending on how well you know how to use your newsgroup reader, and
> its capabilities, you may be able to get all the info you need right
> here at microsoft.public.scripting.wsh and
> microsoft.public.scripting.vbscript.
>
> The following comments apply to Outlook Express 5.5.
> Under Tools -> Options -> Read, you can specify how many headers to
> get at a time. Using a big number, such as 1000, allows you to get a
> lot of info at onces. If you have the checked the box for
> 'automatically expand grouped messages, you can easily search all of
> these headers for certain authors.
>

But Google is soooooooooo much easier and incredibly fast ;-)..

Google Advanced Groups Search
http://www.google.com/advanced_group_search

I used to save all my NG posts in 'Sent Items' in OE for later searching.
But I can find one of my old posts faster than I ever could with OE... Plus
I can find anyone else's just as fast.

Now I only use 'Sent Items' to see where I just answered a question when I
come across a multiposted copy...

Paul Randall

unread,
Dec 11, 2002, 10:13:14 PM12/11/02
to

"Michael Harris (MVP)" <mik...@mvps.org> wrote in message news:eg$wHxXoCHA.948@TK2MSFTNGP10...

>
>
> But Google is soooooooooo much easier and incredibly fast ;-)..
>
> Google Advanced Groups Search
> http://www.google.com/advanced_group_search
>
> I used to save all my NG posts in 'Sent Items' in OE for later searching.
> But I can find one of my old posts faster than I ever could with OE... Plus
> I can find anyone else's just as fast.
>
> Now I only use 'Sent Items' to see where I just answered a question when I
> come across a multiposted copy...

Maybe googling is just another thing that I don't 'get'.
Somedays I easily find exactly what I want. Other days...

For instance, I decide that searching for the exact phrase "hta:application" should find some working HTAs.

I do www.google.com
I type "hta:application", including the quotes, so it should find that exact string.
It gives me a list of 1 to 10 of about 1070.
I decide to limit to groups, so I hit the groups tab.
Now I'm looking a a list of 1 to 10 of 1250!
Way too many, most of which probably don't apply.
So I click on advanced groups and find that I have to type the whole name of the group that I want to search. Way too hard for a
person who is short-term-memory-challenged. And what if I wanted to search scripting.wsh and scripting.vbscript?
I finally get the group name typed in right and then notice that the colon is missing from my exact phrase, so I fix that. and hit
google search.

At last, only 79 hits!

I must admit that this list probably includes more working HTA examples than the last 1000 messages in this newsgroup.

I guess I just need some of your googling knowledge and techniques. Like which of Google's many pages to go to before I type in
anything. And a better feel for which groups to search when researching problems not directly linked to scripting, like DHTML/HTA
font things. And an easier way to get the name of some specific group into that field.

-Paul Randall


Michael Harris (MVP)

unread,
Dec 11, 2002, 11:35:17 PM12/11/02
to
>
> I do www.google.com
>


I always use the advanced search page...

Google Advanced Search
http://www.google.com/advanced_search

I can find things on MSDN faster with this by using the domain filtering
than I can by using the MSDN search pages and get better quality hits high
on the list as well...


>
> So I click on advanced groups and find that I have to type the whole

> name of the group that I want to search....
>


The advanced group search lets you mask on newsgroup.

For example...

--> *scripting* will cover all Usenet groups with names that include the
string scripting...

--> microsoft.* covers only microsft groups

I rarely (if ever) target one specifc NG in any search...


>
> I guess I just need some of your googling knowledge and techniques.
>


I actually do 99.9% of my NG searches via an HTA I wrote (GoogleGroups.hta)
so that I can minimize the amount of typo-ing I do ;-)... I wrote this for
my own use, I know how it works, and it was never meant for public
consumption, but here it is (posted below and also attached as
GoogleGroups.hta.txt).

I'll give you a little 'user guide' first...

-- You have to edit the HTA source to add remove items in the idGroup and
idAuthor select lists.

-- The top select option is blank to let you be non-specific about group or
author.

-- The text boxes (idGroupOther/idSearchOther) below each select lets you
type in a group/mask and/or author override for any given search.

-- The text box (idSearch) to the left of the buttons is for the search
string. An exact phrase match is just a "quoted string". Words/phrases
separated by spaces are implied ANDs. To include ORs, enter them at the end
of the search string separated by OR.

"exact match" this that wiggly OR piggly

equates logically to:

"exact match" AND this AND that AND (wiggly OR piggly)

-- The searches are all sent to an IE window named "GoogleGroupsSearch" so
that if you run another search with an earlier search results window open,
the window is reused. If you want to keep the earlier results window open
when you run the other search, use IE's File/New/Window (or the Ctrl+N
shortcut). The second copy will have the same results displayed and
probably has the same "GoogleGroupsSearch" name associated with it, but now
there are 2 named "GoogleGroupsSearch" and the next search (usually) reuses
the 1st one that was opened.

Now that I've written all of this, I should probably just copy/paste it as a
big comment in the HTA source (snip, copy, paste...).

<html>
<title>GoogleGroups</title>
<hta:application
id="GoogleGroups"
applicationname="GoogleGroups"
singleinstance="yes"
windowstate="normal"
caption="yes"
showintaskbar="yes"
sysmenu="yes"
scroll="no"
/>
<script language="vbscript">

moveto 250,100
resizeto 500,320

sub idSubmit_onclick()

sGroup = idGroup.options(idGroup.selectedIndex).text
sAuthor = idAuthor.options(idAuthor.selectedIndex).text
query = idSearch.value
if len(trim(idGroupOther.value)) > 0 then
query = query & " group:" & trim(idGroupOther.value)
elseif len(trim(sGroup)) > 0 then
query = query & " group:" & sGroup
end if
if len(trim(idAuthorOther.value)) > 0 then
query = query & " author:" & trim(idAuthorOther.value)
elseif len(trim(sAuthor)) > 0 then
query = query & " author:" &sAuthor
end if
url = "http://groups.google.com/groups?q=" & query _
& "&num=100&scoring=d"
window.open url,"_new"

end sub

sub idClear_onclick()
idGroup.selectedIndex = 0
idAuthor.selectedIndex = 0
idGroupOther.value = ""
idAuthorOther.value = ""
idSearch.value = ""
end sub

sub idClose_onclick()
window.close
end sub
</script>
<style>
body {
font:x-small verdana
}
</style>
</head>
<body>
<table border=0 cellpadding=0>
<tr valign=top>
<td>
<select id=idGroup size=10 style="width:250px">
<option selected></option>
<option>*.scripting</option>
<option>*.scripting.wsh</option>
<option>*.scripting.vbscript</option>
<option>*.scripting.jscript</option>
<option>*.wmi</option>
<option>microsoft.*</option>
<option>microsoft.public.outlook.*</option>
</select>
</td>
<td>
<select id=idAuthor size=10 style="width:200px">
<option selected></option>
<option>Michael Harris</option>
<option>Torgeir Bakken</option>
<option>Alex Angelopoulos</option>
<option>Walter Zackery</option>
<option>Tom Lavedas</option>
<option>Mark Pryor</option>
<option>Steve Fulton</option>
<option>Michel Gallant</option>
</select>
</td>
</tr>
<tr valign=top>
<td>
<input type=text value="" id=idGroupOther style="width:250px">
</td>
<td>
<input type=text value="" id=idAuthorOther style="width:200px">
</td>
</tr>
</table>
<table border=0 cellpadding=0>
<tr valign=top>
<td>
<input type=text value="" id=idSearch size=60>
</td>
<td align=right>
<input type=button value="Submit" id=idSubmit style="width:75px"><br>
<input type=button value="Clear" id=idClear style="width:75px"><br>
<input type=button value="Close" id=idClose style="width:75px"><br>
</td>
</tr>
</table>
</body>
</html>

GoogleGroups.hta.txt

Tarjei T. Jensen

unread,
Dec 12, 2002, 6:11:52 AM12/12/02
to
Michael Harris (MVP) wrote:
> I actually do 99.9% of my NG searches via an HTA I wrote
(GoogleGroups.hta)
> so that I can minimize the amount of typo-ing I do ;-)... I wrote this
for
> my own use, I know how it works, and it was never meant for public
> consumption, but here it is (posted below and also attached as
> GoogleGroups.hta.txt).

That is a terrific tool. My only problem is that google seems to not like
the wildcards in front of the groups names. But I have fixed most of that.


Thanks,

Tarjei T. Jensen

unread,
Dec 12, 2002, 6:25:02 AM12/12/02
to
Michael Harris (MVP) wrote:
> If I were looking for a current DHTML book, I'd check www.wrox.com. I
have
> "IE5 Dynamic HTML Programmer's Reference". I just checked and they don't
> appear to have any IE6 specific titles, but an IE5 reference is still a
good
> starting spot for fundamentals. The MSDN DHTML docs are then the place to
> go for current version support.

I decided last evening to buy the second edition of the O'Reilly Dynamic
HTML book. I get the impression that O'reilly uses more paper than wrox and
is therefore easier to read and easier to use as a reference.

> I doubt you'll find any books about HTAs explicitly. The "VBScript
> Programmer's Reference" from Wrox has a chapter on HTAs as well as
chapters
> on the other significant script host environments like WSH, ASP, WSCs, IE,
> etc.

After a few hours agnonizing, I chose the O'Reilly VBScript book over the
Wrox book. I liked the ordering in the Wrox book, but I think the examples
and more paper in the O'Reilly book won me over.

greetings,

Michael Harris (MVP)

unread,
Dec 12, 2002, 3:11:49 PM12/12/02
to
> After a few hours agnonizing, I chose the O'Reilly VBScript book over
> the Wrox book....

I have only one O'Reilly title (on Regular Expressions) and was very happy
with it. I've seen others highly recommend O'Reilly titles in general, so
it was probably a good pick assuming it covers at least VBScript 5.0...

Michael Harris (MVP)

unread,
Dec 12, 2002, 3:21:06 PM12/12/02
to
>
> That is a terrific tool. My only problem is that google seems to not
> like the wildcards in front of the groups names. But I have fixed
> most of that.

???

*scripting
*scripting*
*.scripting
*.scripting*

all work fine for me...

Ned Flanders

unread,
Dec 12, 2002, 4:10:14 PM12/12/02
to
Paul Randall wrote:
> So I click on advanced groups and find that I have to type the whole
> name of the group that I want to search. Way too hard for a person
> who is short-term-memory-challenged. And what if I wanted to search
> scripting.wsh and scripting.vbscript? I finally get the group name

I have a favourite that points directly to the scripting newsgroups:

http://groups.google.ca/advanced_group_search?group=microsoft.public.scripti
ng.*

(URL is probably wrapped)

You can do this for any groups you search regularly.


Ned Flanders

unread,
Dec 12, 2002, 4:28:25 PM12/12/02
to
Oh wow is this little baby ever going to get used here too.
Thank you *very* *very* much for sharing Michael!

Paul Randall

unread,
Dec 12, 2002, 7:51:30 PM12/12/02
to
Thanks, Toolman!

Part of the reason I posted my poor methods of googling was hoping that some scripting guru would take pity on me and create an HTA
or share one that would take most of the work out of it. As you said, "Google is soooooooooo much easier and incredibly fast ;-).."

Now it will be for me too!

And Tarjei gets a working HTA example. What more could we ask for?

-Paul Randall

"Michael Harris (MVP)" <mik...@mvps.org> wrote in message news:#wIsRfZoCHA.2280@TK2MSFTNGP12...

Tarjei T. Jensen

unread,
Dec 13, 2002, 9:43:29 AM12/13/02
to

"Michael Harris (MVP)" <mik...@mvps.org> wrote in message
news:ev7bwqhoCHA.1972@TK2MSFTNGP11...

> > After a few hours agnonizing, I chose the O'Reilly VBScript book over
> > the Wrox book....
>
> I have only one O'Reilly title (on Regular Expressions) and was very happy
> with it. I've seen others highly recommend O'Reilly titles in general, so
> it was probably a good pick assuming it covers at least VBScript 5.0...

It is from 2000 and they have printed it a few times since then.

greetings,


0 new messages