Page 1 of 1 1
Topic Options
#207386 - 2013-05-31 01:30 AM Delete files on redirected appdata folder
cmturner20 Offline
Just in Town

Registered: 2009-10-20
Posts: 2
Loc: Brisbane Queensland Australia
Hi,

Some of our users have their appdata folder redirected to a server share. Within our kix login script we have a command that deletes all Office templates and copies updated templates from a DFS share to their local %appdata%\Microsoft\Templates folder depending on the AD group they are a member of.

I have noticed though the line that should delete the template files doesn't work for the users whose appdata folder sits on the server share. If i'm logged in as the user i can browse to their appdata folder (using %appdata%) and delete files through windows explorer so i don't believe it is a permissions issue. I'm just wondering if i have the correct syntax:

If (InGroup("MYDOMAIN\_STUDIO1"))
DEL "%USERPROFILE%\%AppData%\Microsoft\Templates\*.*" /f /c
COPY "\\mydomain.local\_asia\Graphics\Templates\Office\Word\_Studio1\*.*" "%userprofile%\%AppData%\Microsoft\Templates\*.*" /c /r

The %userprofile%\%appdata% resolves correctly to \\server\share\userfolder\Appdata\Roaming

We are using the following:

KIX version: 4.63
Windows 7 Enterprise x64

Thanks in advance for any advice.

Top
#207387 - 2013-05-31 01:56 AM Re: Delete files on redirected appdata folder [Re: cmturner20]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
For me %appdata% includes the profile directory, so you may have some other configuration...

Please run the following and post your results...


 Code:
? "%userprofile%"
? "%appdata%"
? exist("%USERPROFILE%\%AppData%\Microsoft\Templates\")

_________________________
(... better days ahead)

Top
#207388 - 2013-05-31 02:40 AM Re: Delete files on redirected appdata folder [Re: Allen]
cmturner20 Offline
Just in Town

Registered: 2009-10-20
Posts: 2
Loc: Brisbane Queensland Australia
Thanks Allen, Appdata does contain the profile directory, my bad!!

This worked as expected:

If (InGroup("MYDOMAIN\_Studio1"))
DEL "%Appdata%\Microsoft\Templates\*.*" /f /c

Thanks for the prompt reply.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.051 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org