We help IT Professionals succeed at work.

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

214 Views
Last Modified: 2010-04-16
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.
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.