New
#1
How do I enable %UserProfile% for scripting with Folder Redirection?
I'm experimenting with Folder Redirection and after getting it set up, I quickly realized that any VBS scripts that have environmental variables such as %UserProfile% become unusable.
A simple example:
AndCode:C:\CD %UserProfile%\Desktop
These no longer work when using Folder Redirection. I'm hoping there is a work around for this because a lot of my existing scripts depend on this variable remaining valid. Any help is appreciated. Thanks!Code:'Place to deposit excel output file Depo=oShell.ExpandEnvironmentStrings("%userprofile%" & "\Desktop\Folder_This_User_Needs_Easy_Access_To\") if not objfso.folderexists(Depo) then objFSO.CreateFolder(Depo) end if