Handy to read about dlgcdir — thanks!

Note as you're calling from the macro environment, you don't need (and shouldn't have?) the quotes. e.g. this works fine:

%let rc=%sysfunc(dlgcdir(C:\Program Files));