Hello, again.
As there seems to be no volunteer to fill in the gap answering your question after I'd posted above, I can, nevertheless, provide you a script which takes it the hard way.
First, a few words on the easy way in line with my above posting. You can specify the fixed directory choices in the inputbox message and let the user to make a multiple choice characterized by a series of numbers corresponding to the directories themselves. Then you may parse those numbers to determine what have been chosen. So, it is only a couple of obvious steps forward to develop it from that I posted.
The hard way I am going to post here is to use the IE frondend. I was hesitating to post it because it looks really silly because it is long script. For a simple job of the kind, it may look really out of proportion. Even though the script below is not of production grade, I had built quite a few dynamical features in it which are applicable to a very broad multiple choice jobs. The core of the script is the function <checkedTableArray> which return a boolean array holding the information of the choice the user made. The main part calling the function is scripted for illustration purpose only. You can change it to more complicated & reasonable situations as you like and the function has the built-in functionality to handle that.
(Use highlight-copy-paste to make a copy of the script to avoid misleading linewrap etc.)
Try the script out, in particular use the function in stressing environment, and see how you like it.
regards - tsuji
PS I would invite other members to try it out and feedback your testing comments. I like to know that too to make future improvements. So, any comments are much appreciated.
'------------/tsuji/---------------------
Option Explicit
Dim strRequest, errcode, i
strRequest = "Exposed Directories"
Dim exDirArray, exDirPassArray
exDirArray = Array( "E:\DataBank\Financial","E:\DataBank\Managerial",_
"E:\DataBank\Personnel","E:\Databank\Vendors",_
"E:\DataBank\Customers","E:\DataBank\Board_Minutes"
exDirPassArray = checkedTableArray(exDirArray, strRequest, errcode)
Dim info
info = ""
If errcode<>0 Then
WScript.Echo "Unexpected error occurred. Operation aborted." & vbCrLf &_
"Error Code = " & errcode
Else
For i=0 to UBound(exDirArray)
info=info & exDirArray(i) & vbTab & exDirPassArray(i) & vbCrLf
Next
WScript.Echo info
End If
WScript.Quit
'----------------/return checkbox table/-----------------------------------------------------------------
Function checkedTableArray(ByVal strOptionArray, strCaption, ByRef errcode) 'as boolean array
errcode = 0 'reset errcode
Dim option_dim
option_dim = UBound(strOptionArray)
Dim i
ReDim InputNameArray(option_dim)
ReDim takeInputValueArray(option_dim)
ReDim InputValueArray(option_dim)
For i = 0 to option_dim
InputNameArray(i) = chr(65+i) 'chr(65)="A"
InputValueArray(i) = cstr(i)
takeInputValueArray(i) = False
Next
Dim InputForm
InputForm = "InputForm"
Dim html
html = ""
html=html & "<html><head></head><body>" & vbCrLf
html=html & "<Script Language=""VBScript"">"&vbCrLf
html=html &"<!--"&vbCrLf&"Dim done"&vbCrLf&"Public TheForm"&vbCrLf
html=html & "Sub buttonsubmit_onClick"&vbCrLf&"done=True"&vbCrLf&"End Sub"&vbCrLf
html=html & "Sub window_onLoad()"&vbCrLf&"Set TheForm = document.InputForm"&vbCrLf &"done=False"&vbCrLf&"End Sub"&vbCrLf
html=html & "Public Function CheckVal()"&vbCrLf&"CheckVal=done"&vbCrLf&"End Function"&vbCrLf
html=html &chr(39)&"--></Script>" &vbCrLf
html=html & "<form name=" & chr(34) & InputForm & chr(34) & "><center><p>"&vbCrLf
html=html & "<table BORDER==0 CELLSPACING=4 CELLPADDING=4 WIDTH=220 >"&vbCrLf
html=html & "<caption align=""top""><strong>" & strCaption & "</strong></caption>"&vbCrLf
html=html & "<tr><td COLSPAN=2>"&vbCrLf
ReDim strTbl(option_dim)
For i =0 to option_dim
strTbl(i) = "<input type=""checkbox"" name=" & chr(34) & InputNameArray(i) & chr(34) & _
" "&"value=" & chr(34) & InputValueArray(i) & chr(34) & ">" & _
"<font size=-1>" & strOptionArray(i) & "</font><br>"&vbCrLf
Next
For i = 0 to option_dim
html=html & strTbl(i)
Next
html=html & "</td></tr>"&vbCrLf
html=html & "<tr><td COLSPAN=2 bgcolor=990000><center><font color =""white"">"&vbCrLf
html=html & "<input type=""button"" name=""buttonsubmit"" value=""Submit"">"&vbCrLf
html=html & "</center></font></td></tr></table></p></center></form>"&vbCrLf
html=html & "</body></html>"
Dim oIE
Set oIE = WScript.CreateObject("InternetExplorer.Application"
Dim BoxWidth, BoxHeight
Const unitWidth = 8
Const unitHeight = 28
Dim maxchar
maxchar = 0
For i = 0 to option_dim
If (maxchar <= len(strOptionArray(i))) Then maxchar = len(strOptionArray(i))
Next
If maxchar<len("Submit"

Then maxchar = len("Submit"

If maxchar<len("strCaption"

Then maxchar = len("strCaption"
BoxWidth = (maxchar + 8) * unitWidth
BoxHeight = (option_dim + 4) * unitHeight
oIE.width = BoxWidth
oIE.height = BoxHeight
oIE.menubar = 0
oIE.toolbar = 0
oIE.navigate("about:blank"

While oIE.Busy : WScript.Sleep 100 : WEnd
oIE.document.write( html )
oIE.document.close
oIE.FullScreen = True
oIE.document.ParentWindow.resizeto BoxWidth, BoxHeight
oIE.document.ParentWindow.moveto oIE.document.ParentWindow.screen.width - BoxWidth -60,0
oIE.document.ParentWindow.document.body.style.backgroundcolor="lightsteelblue" '"Lavender"
If option_dim < 25 Then
oIE.document.ParentWindow.document.body.scroll="no"
Else
oIE.document.ParentWindow.document.body.scroll="yes"
End If
oIE.visible = True
While oIE.Busy : WScript.Sleep 100 : WEnd
On Error Resume Next
Do
WScript.Sleep 200
Loop While (oIE.document.script.CheckVal()=False)
If Err <> 0 Then
oIE.Quit(1)
Set oIE = Nothing
errcode=Err
checkedTableValueArray = takeInputValueArray
Exit Function
End If
On Error Goto 0
For i =0 to option_dim
takeInputValueArray(i)=oIE.document.InputForm(i).checked 'True= -1, False = 0
Next
oIE.Quit()
Set oIE = Nothing
checkedTableArray = takeInputValueArray
End Function 'checkedTableArray as boolean array
'------------------------------------------------------------------------------------------------------
'------------/tsuji/---------------------