문제

We use Folder Redirection at my work, and I'm trying to simplify a script that runs when users log on to a Terminal Server.

Is there a way, through SpecialFolders, to access the Application Data folder?

I ask because if we have to move the location of the Folder Redirection (due to storage limitations), I'd rather not have to go through scripts and manually change things.

Set objShell = WScript.CreateObject("WScript.Shell")

desktop_location = objShell.SpecialFolders.Item("Desktop")
quick_launch_location = "\\videss\TSUsers\" & user_name & "\Application Data\Microsoft  \Internet Explorer\Quick Launch\"
도움이 되었습니까?

해결책

You could use the environment variable

Set objShell = CreateObject( "WScript.Shell" )
appDataLocation=objShell.ExpandEnvironmentStrings("%APPDATA%")
quick_launch_location = appDataLocation & "\Microsoft\Internet Explorer\Quick Launch\"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top