I tried to access on the APPDATA folder, which does function with the following code perfectly (run as the current logon user):
Set objShellApp = CreateObject("Shell.Application")
Const ssfAPPDATA = &H1A
sAppDataPath = objShellApp.NameSpace(ssfAPPDATA).Self.Path
The result of sAppDataPath is: C:\Users\ Peter \AppData\Roaming
Now the problem is, I have to run the Script as the Administrator account. And if I run this script as the Administrator on Clients, than the result is allways following: C:\Users\ Administrator \AppData\Roaming
How can I change that? I want, that he should take the Appdata folder path of the current logon user. In spite of running the script as the Administrator. And i have to run the script as Administrator because of some permission.
How can I realize that?