Re: CreateObject("Microsoft.FTP") ??
- From: "David H. Lipman" <DLipman~nospam~@Verizon.Net>
- Date: Thu, 15 Sep 2005 21:32:33 -0400
From: "Alex K. Angelopoulos (MVP)" <spam.aka.maps@xxxxxxxx>
|
| "David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
| news:e1GrJgjuFHA.1032@xxxxxxxxxxxxxxxxxxxxxxx
|
>> Thank you for that bit of information. Do you have a URL of reference
>> material on the
>> COM-based HttpRequester and class and the various "monikers" ?
|
| I tend to use object browsers like TLViewer to look at COM objects (and
| that's where I learn about them usually, too). The ProgId for the
| WinHttpRequest component is "WinHttp.WinHttpRequest", and it resides in a
| file named winhttp.dll usually. I found at least 1 MSDN page as well as
| several others with the following search:
|
| http://www.google.com/search?as_q=WinHttpRequest&num=100
|
| and the MSDN page is this link:
|
| http://msdn.microsoft.com/library/en-us/winhttp/http/winhttprequest.asp
|
| Dino Esposito did an article on pluggable protocols which talks about
| monikers like res: a few years ago; the link to his article:
|
| http://www.microsoft.com/mind/0199/cutting/cutting0199.asp
|
>> In addition, can you think of a way to modify the above function such
>> completion feedback
>> can be provided. I would like to have some kind of user feedback such
>> that the user knows
>> the download is in process and has some idea of completion.
|
| Well, I haven't used KiXtart enough to know how to make it work
| interactively and let me see feedback from it - which I would like to know
| about. :)
|
| Here's in general what you would probably want to do, though. First look at
| the section of the function where you actually open the connection:
|
|> $oHTTP.Open("GET", $sURL, not 1, $sUser, $sPass)
|> else
|> $oHTTP.Open("GET", $sURL, not 1)
|
| The 3rd argument, the "not 1", is apparently a KiXtart false value, and that
| 3rd argument controls synchronicity when you make your request. If you set
| it to true, the call is made asynchronously - it should return immediately,
| letting you start giving feedback to a user. Set that to true (probably
| just 1?) and then, after this line:
|> $oHTTP.Send
| you should say a download is in progress by writing output for the user.
|
| The problem is you now have to make your script sit and wait until the xml
| request is completed. To do that, you need to have a loop that sleeps for a
| fraction of a second, then checks $oHTTP.readyState, looping until its value
| is 4. On each pass through the loop you can presumably echo a character to
| screen so they can see progress.
|
| Does that help?
|
| And since you're a KiXtart user, how do YOU run your scripts interactively?
| I've never played with it enough to figure it out. :)
|
Thanx again Alex !
I will slowly and methodically examine the URLs you have provided and will relish the
informational knowledge I will gain from it.
As for Interactive programming with KiXtart.....
Well I gained the vast majority of my experince with Kix programming the NT and AD Login
script. There was little interaction and it comprsed mostly updating, pushing, validating,
modifying and user/desktop alterations. So interactive scripting wasn't needed. Lately
however I have writing anti malware scripts. These scripts can be used by the oldest newbie
of a computer to your mom to your neighbour using Win98 ~ Win2003 Server. Therefore I have
tio assume the worst and hope for the best and provide feedback to the one runs the script.
Somthing that was not needed when an employee or contracted employee logged onto the Domain.
--
Dave
http://www.claymania.com/removal-trojan-adware.html
http://www.ik-cs.com/got-a-virus.htm
.
- References:
- Re: CreateObject("Microsoft.FTP") ??
- From: Alex K. Angelopoulos \(MVP\)
- Re: CreateObject("Microsoft.FTP") ??
- From: David H. Lipman
- Re: CreateObject("Microsoft.FTP") ??
- Prev by Date: Re: export-clixml & outputting to pipeline
- Next by Date: Re: Script to Add Domain Group to Local Administrators Group on Computer
- Previous by thread: Re: CreateObject("Microsoft.FTP") ??
- Next by thread: Script to Add Domain Group to Local Administrators Group on Computer
- Index(es):
Relevant Pages
|