A Windows Vista forum. Vista Banter

Welcome to Vista Banter.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to ask questions and reply to others posts, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Go Back   Home » Vista Banter forum » Microsoft Windows Vista » Vista Administration, Accounts and Passwords
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Vista Administration, Accounts and Passwords Queries, comments and issues relating to the administration of Windows Vista. (microsoft.public.windows.vista.administration_accounts_passwords)

HTA's in Vista



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old November 17th 06, 01:50 PM posted to microsoft.public.scripting.vbscript,microsoft.public.windows.server.scripting,microsoft.public.windows.vista.administration_accounts_passwords
Pete Gomersall
external usenet poster
 
Posts: 7
Default HTA's in Vista

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:
Sub GetOSVersion
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
Msgbox objOperatingSystem.Caption & " " & _
objOperatingSystem.Version
Next
End Sub

I suspect a change in the security model for the interaction of mshta and IE
7 (protected mode etc) but I am guessing here.
It would be great if someone from MSFTcould provide a link to documentation
on HTA's and Vista.

  #2 (permalink)  
Old November 17th 06, 02:07 PM posted to microsoft.public.scripting.vbscript,microsoft.public.windows.server.scripting,microsoft.public.windows.vista.administration_accounts_passwords
Bob Barrows [MVP]
external usenet poster
 
Posts: 1
Default HTA's in Vista

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.


  #3 (permalink)  
Old November 17th 06, 03:21 PM posted to microsoft.public.scripting.vbscript,microsoft.public.windows.server.scripting,microsoft.public.windows.vista.administration_accounts_passwords
Pete Gomersall
external usenet poster
 
Posts: 7
Default HTA's in Vista

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
...
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.



  #4 (permalink)  
Old November 18th 06, 03:16 AM posted to microsoft.public.scripting.vbscript,microsoft.public.windows.server.scripting,microsoft.public.windows.vista.administration_accounts_passwords
Slim
external usenet poster
 
Posts: 1
Default HTA's in Vista


"Pete Gomersall" wrote in message
...
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
...
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.




I have never used Vista either
But I would suggest that HTA scrips are not enabled by default


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2004-2024 Vista Banter.
The comments are property of their posters.