Paul
Tue May 06 10:58:44 CDT 2008
"billhallsb" <billhallsb@discussions.microsoft.com> wrote in message
news:654F72EF-5B23-4A66-9F38-6E94ABC71AA5@microsoft.com...
>I have a very simple script that is crashing on me with an error code
> 80004005. I am running the script on a Windows Vista machine from
> the my
> documents folder with a standard user account
>
> here is the code snippet
>
> SET objShell = WScript.CREATEOBJECT("SHELL.Application")
> SET objFolder = objShell.BrowseForFolder(0,"Select a File",
> &H4000,
> strpath)
>
> I can browse to and select the file I need, the crash occurs once
> the file
> is selected and points to the SET objFolder line.
>
> Thanks for any help you can provide.
Microsoft's common dialog interface is a licensed application. It
does much more than just navigate to and open or save files and
folders. You probably have it on your system, licensed for use by the
many applications that open and save files. You probably don't have a
license to use it from scripts. Until recently, M$ had a download for
a scripted HTML editor, which included the code to automatically
obtain a free scripting license when you run the editor. Info about
it is here:
http://msdn.microsoft.com/en-us/library/ms537834.aspx
The link on this web page to download the HTML editor package is
broken, but other links, such as the one for "How To Set Up Internet
Download for Comdlg32.ocx" may give you the info required to set up
and install a free single-user scripting license. As of a few years
ago, the freely downloadable Windows Platform SDK also included the
HTML editor package.
-Paul Randall