Thanks for your reply. But it does not work in my PC (win2k):(. I just copy your script belows to a vbs file, and run it by double click it. Here is WSH error prompt.
Move, copy, and rename folders and files. Delete files and folders. Empty the Recycle Bin. Exercise 1 Managing a Desktop and Windows. Grammar Exercises: Verb Tenses. Consistence of tense explanation.
![Msjavx86 Msjavx86](https://bd23.https.cdn.softlayer.net/80BD23/142.4.51.106/blog/wp-content/uploads/2016/03/vb6-setup-data-access-change-option.png)
Windows Script Host - Script: G: Documents and Settings Administrator Desktop a.vbs Line: 1 Char: 1 Error: ActiveX component can't create object: 'UserAccounts.CommonDialog' Code: 800A01AD Source: Microsoft VBScript runtime error - OK. Hi, 'Tony' wrote in message news:[email protected]. Thanks for your reply. But it does not work in my PC (win2k):(. I just copy your script belows to a vbs file, and run it by double click it. Unfortunately, the solution that Rob posted is WinXp-only.
I don't know the ASP implications, but the Common-Dialog file browsing common dialogs require a bit of consideration in WSH-hosted vbs. Pick your poison: The MS Common Dialog Object (MSComDlg.CommonDialog) The MSComDlg object is the best alternative, is present on all installations and is exposed through the comdlg32.ocx file. While this file is supplied with all versions of Windows, it requires a license for scripting use, which is typically derived from the installation of an MS development or programming application, such as VB or VideoStudio. Fortunately, VBCCE, which MS provides as a free download, also installs a license (credit Tom Lavedas).
Most installations, however, will not have VBCCE or another development tool installed, and so will not have access to the MSComDlg object dialogs. The Java File Objects (java:com.ms.wfc.ui.OpenFileDialog and java:com.ms.wfc.ui.SaveFileDialog) Prior to the MS settlement with Sun, versions of the MS CommonDialog class file dialogs were available on all Windows installations with IE, through the Java file objects, which were exposed through the msjava.dll file, and which could be called from VBS through the MS Java VM. Beginning in February 2003, new installations of Win2k (essentially new SP4 installations) and WinXp (essentially new SP1a installations) no longer implement the MS Java VM.
Prior versions of Windows, and all versions of Win2k and WinXp installed prior to these SP versions, regardless of whether they have been updated to current versions, can still access these object dialogs through the MS Java VM. (Credit Alessandro Angeli MVP for the access method).
The WinXp File Objects (UserAccounts.CommonDialog and SAFRCFileDlg.FileSave) These objects are available only on WinXp, and are exposed through the nusrmgr.cpl control panel applet and safrcdlg.dll. They are somewhat more limited versions of the CommonDialog, but adequate.
The Open dialog is almost complete, except for no retitling, no flag return and an archaic multi-select function. (Credit Alex Angelopoulos MVP for first posting their existence.) The Choose File HTML File Control Object This is a Tom Lavedas-Walter Zachery workaround. It runs a zero-sized IeApp window with a file control, uses AppActivate and SendKeys to feed a default value to the control, then clicks the control to open the HTML Choose File box to select a single existing file. Only selects existing files, has few options, requires AppActivate and SendKeys, and has set file filtering for HTML-type files (though it pops up to.
All Files). The least controlable, but operates across all OS's and may be the only solution for newer Win2k OS's. BrowseForFolder Prior to Win2k, the Shell BrowseForFolder object could be used to select files. That ability became problematic in Win2k and impossible in WinXp. MS recommends that it not be used for file selection, though it's still available for older OS's. Many months ago, I posted a file dialog function that would test for all four of the file dialog objects in order, to see what was available on a particular computer, using a single set of options.
Fairly complex, though. Since then, I've improved it and limited to the three true Common-Dialog pairs of objects, but I've also incorporated all my standard scripts into a WSC file, with properties and methods and CHM file instructions, and they are not be thoroughly error-tested since the conversion. If you find one of the above that works on your system, I'll post back some sample code and the MSDN references (if any). Again, however, I have no idea how this translates into ASP availability. Joe Earnest - Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (Version: 6.0.521 / Virus Database: 319 - Release Date: 09-23-03. The foregoing was a cut and paste from an earlier reply, and didn't include an update on the MS Java VM option. Prior to the MS settlement with Sun, these versions of the MS CommonDialog class file dialogs were available on all Windows installations with IE, through the MS Java Virtual Machine (MSJVM) msjava.dll file. Here it gets murky. Beginning in February 2003, pursuant to the MS-Sun settlement agreement, new installations of Win2k (essentially new SP4 installations) and WinXp (essentially new SP1a installations) no longer implemented the MSJVM. MS soon found, however, that many older apps and websites rely on MSJVM routines.
Problems with transitioning to the Sun Java VM resulted in MS support of the MSJVM being extended through September 2004. So some new installations may still include the MSJVM. In any event, prior versions of Windows, and all versions of Win2k and WinXp installed (or compiled, for CD versions) prior to the subject SP versions, regardless of whether they have been updated to current versions, retain the MSJVM and can still access these object dialogs. (The MSJVM is not deleted by upgrades.) MS apparently previously licensed the MSJVM to third-party vendors and (as I understand it) the licenses apparently continue to be valid under the settlement. So the installation file (msjavx86.exe) can be legally downloaded for the indefinite future, free of charge from numerous third-party sites, if not available on a particular installation.
Unlike the MS CommonDialog VBCEE installation, this is not an overly large or otherwise useless download, and may even be a wise precaution, as many older applications appear to rely on routines in the MSJVM. Joe Earnest - Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (Version: 6.0.521 / Virus Database: 319 - Release Date: 09-23-03. Save the text below as an HTML or HTA file: - Sub ButBrowseonclick '- show browse window and Get file path: Dim sFile sFile = Browse If (sFile < ') Then '-Do something with file.