Link to home
Create AccountLog in
Avatar of Sean Meyer
Sean MeyerFlag for United States of America

asked on

Script not working - Delete and create icons in allusersproflie with login script

Hello,
Environment - Server 2003, clients XPsp2

I have a login script I want to update and it is not working. The added the DEL line and it does not seem to be doing anything.  I had the script located in GPMC - Computer Config / Windows settings / startup script.  That worked until I added the DEL line.  It gives me an error of UNC paths not supported.  I tried adding the script instead to - User Config / windows settings / startup.  It does not seem to do anything in this location. I have tried variations on the DEL line.  DEL "c:\documents and settings\%ALLUSERSPROFILE%\Desktop\*.*"

The copy function still works but it does not delete anything.

Error -
 '\\domain.org\sysvol\domain.org\policies\ {12312312}\machine\scripts\startup'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
**Additional error if I throw this in User Configuration**
The filename,directory name, or volume label syntax is incorrect.

***************************************************************************
@echo off

REM -- Copy icons to desktop

DEL "%ALLUSERSPROFILE%\Desktop\*.*"

xcopy /y "\\domain.org\NETLOGON\desktopIcons\Users\*.*" "%allusersprofile%\desktop"

:exit
exit
************************************************************************************************


Thanks for any help.
ASKER CERTIFIED SOLUTION
Avatar of purplepomegranite
purplepomegranite
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.