Code will not run in debuger

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 12 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
edpatterson
Posts: 21
Last visit: Fri Jun 14, 2019 3:36 am

Code will not run in debuger

Post by edpatterson »

The following script direct from MSDN runs fine from the command line using either cscript or wscript but just 'hangs' when run from within PrimalScript. It is like the dialog is opened just not visible.

Is there a config setting or perhaps another way to open a folder browser that will work from within PrimalScript? I have become spoiled by the Ctrl-F5 functionality :-)

Code: Select all

Const WINDOW_HANDLE = 0
Const OPTIONS = 0

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder _
    (WINDOW_HANDLE, "Select a folder:", OPTIONS, "C:") 

If objFolder Is Nothing Then
    Wscript.Quit
End If

Set objFolderItem = objFolder.Self
objPath = objFolderItem.Path

Wscript.Echo objPath
This topic is 12 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked