enviro var for logged on user desktop
Guys, I need to script a path to the logged on user's desktop and to their start menu folder.
%USERPROFILE%\desktop\
does not work.. it tried to resolve it but it doesn't like the long-file-names in "documents and settings".
Easy one for you.
Thanks.
%USERPROFILE%\desktop\
does not work.. it tried to resolve it but it doesn't like the long-file-names in "documents and settings".
Easy one for you.
Thanks.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
turbokitty
19 years ago
Posted by:
turbokitty
19 years ago
And here's a script snippet that goes through all the userprofiles..
' Get a list of all existing profiles
Set f = fso.GetFolder("C:\Documents and Settings")
Set sf = f.SubFolders
For Each f1 in sf
If (fso.FileExists("C:\Documents and Settings\" + f1.name + "\{some path}")) Then
fso.DeleteFile "C:\Documents and Settings\" + f1.name + "\{some path}", True
End If
Next
' Get a list of all existing profiles
Set f = fso.GetFolder("C:\Documents and Settings")
Set sf = f.SubFolders
For Each f1 in sf
If (fso.FileExists("C:\Documents and Settings\" + f1.name + "\{some path}")) Then
fso.DeleteFile "C:\Documents and Settings\" + f1.name + "\{some path}", True
End If
Next
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.