All,
For those of you that cannot see the point of the question:
What are the security differences between running HTA's on XP and Vista (as
I suspect that the inherent difference is because of changes in Vista's
security model - particularly IE 7's protected mode)?
Code that works fine in XP doesn't work (as far as I can determine it is
"just ignored" and fails silently without error, preventing any subsequent
lines to run).
For example this code in any HTA on Vista fails silently at the 3rd line,
the second msgBox never executes and no errors are returned.
msgBox "Blah, Blah!"
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")
msgBox "Blah, Blah!"
The same code in a standard .vbs works fine.
Pete
"Bob Barrows [MVP]" <> wrote in message
news:...
> Pete Gomersall wrote:
>> Hi,
>> Does anyone know why HTA code that previously worked in XP doesn't in
>> Vista? For example this code taken from the HTA Developers Center on
>> Script Center works fine in XP and also on Vista if called within a
>> .vbs file however it doesn't work in Vista when used in a HTA:
>
> I have not even installed Vista so I cannot answer your question.
>
> However, I can say that the likelihood of anyone being able to help will
> be limited by your failure to define "doesn't work". What is the failure
> mode? Machine crash? Error message? Incorrect results? Acts as if it
> does something but nothing happens?
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
|