set_df_path: handle cancel correctly

develop
Kelly Kinkade 2023-01-06 12:01:01 -06:00
parent 42d572cd03
commit 83e5bc120a
2 changed files with 8 additions and 2 deletions

@ -11,7 +11,10 @@ if args.count > 0 Then
Set ObjF = fso.GetFolder(args.Item(0)) Set ObjF = fso.GetFolder(args.Item(0))
else else
Set objDlg = WScript.CreateObject("Shell.Application") Set objDlg = WScript.CreateObject("Shell.Application")
Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs).Self Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs)
if IsValue(objF) Then
set ObjF = objF.self
end if
end if end if
If fso.FileExists("DF_PATH.txt") Then If fso.FileExists("DF_PATH.txt") Then

@ -11,7 +11,10 @@ if args.count > 0 Then
Set ObjF = fso.GetFolder(args.Item(0)) Set ObjF = fso.GetFolder(args.Item(0))
else else
Set objDlg = WScript.CreateObject("Shell.Application") Set objDlg = WScript.CreateObject("Shell.Application")
Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs).Self Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs)
if IsValue(objF) Then
set ObjF = objF.self
end if
end if end if
If fso.FileExists("DF_PATH.txt") Then If fso.FileExists("DF_PATH.txt") Then