1lln3ss
05-19-2005, 03:16 PM
Hi, me again!
I found this code that works great with WIN XP :
Set objDialog = Createobject("Useraccounts.Commondialog")
objDialog.Filter = "All files|*.*"
objDialog.Filterindex = 1
objDialog.dialogTitle = "Select a file"
intResult = objDialog.Showopen
IF(intResult = 0) THEN
Wscript.quit
ELSE
Wscript.echo objDialog.FileName
END IF
Now I need to make this work with WIN 2000 and earlier if possible. I know that BrowseForFolder(...) can be set to select files also, but it doesn't work when selecting a file from the ROOT (throws an error).
If you have any advice for me, I would appreciate it.
I found this code that works great with WIN XP :
Set objDialog = Createobject("Useraccounts.Commondialog")
objDialog.Filter = "All files|*.*"
objDialog.Filterindex = 1
objDialog.dialogTitle = "Select a file"
intResult = objDialog.Showopen
IF(intResult = 0) THEN
Wscript.quit
ELSE
Wscript.echo objDialog.FileName
END IF
Now I need to make this work with WIN 2000 and earlier if possible. I know that BrowseForFolder(...) can be set to select files also, but it doesn't work when selecting a file from the ROOT (throws an error).
If you have any advice for me, I would appreciate it.