Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access the 'Application Data' folder when using Folder Redirection

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\"
like image 227
David Gard Avatar asked Sep 13 '13 08:09

David Gard


1 Answers

You could use the environment variable

Set objShell = CreateObject( "WScript.Shell" )
appDataLocation=objShell.ExpandEnvironmentStrings("%APPDATA%")
quick_launch_location = appDataLocation & "\Microsoft\Internet Explorer\Quick Launch\"
like image 160
ServerGuy Avatar answered Sep 18 '22 17:09

ServerGuy