MSFN Forum: Cleanup.cmd not deleting icons on desktop - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cleanup.cmd not deleting icons on desktop Rate Topic: -----

#1 User is offline   chyronn 

  • Still A Noob
  • Pip
  • Group: Members
  • Posts: 90
  • Joined: 12-October 04

Posted 22 June 2006 - 03:00 PM

hi all
i'm having a problem getting cleanup.cmd to delete some icons i have on my desktop, post install. i've tried "AllUsersProfile" "UserProfile" and "Default User" but none of those succeed in deleting the icons. in my host install of XP (i.e. this one) i have listed the same admin profile name (my name), All Users and Default User (hidden). i've tried putting my name as the profile cleanup should use but that doesn't work either. is there another name i need to put in so that cleanup knows i'm the full-admin account that it can use to delete the icons and other bits?
Any help is greatly appreciated.
Thanks.


#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 22 June 2006 - 04:44 PM

Try one of these in your cleanup.cmd:
    1.   This will get rid of all non read-only and non-system shortcuts from all non-hidden and non-system non-redirected profiles desktops.
    FOR /D %%? IN ("%ALLUSERSPROFILE%\..\*") DO DEL/Q "%%?\Desktop\*.lnk" 2>NUL
    
    It should all be on one line.

    2.   To delete all shortcuts from all non-redirected profiles desktops.
    FOR /F "DELIMS=" %%? IN ('DIR/B/AD "%ALLUSERSPROFILE%\.."') DO DEL/F/A/Q "%%?\Desktop\*.lnk" 2>NUL
    
    It should also all be on one line.
Use the first example first, it is the safer option.

If the problem is still there after this then your shortcuts are not LNKs; likely URLs or created by CLSIDs.

#3 User is offline   chyronn 

  • Still A Noob
  • Pip
  • Group: Members
  • Posts: 90
  • Joined: 12-October 04

Posted 23 June 2006 - 05:27 AM

View PostYzöwl, on Jun 22 2006, 11:44 PM, said:

Try one of these in your cleanup.cmd:
    1.   This will get rid of all non read-only and non-system shortcuts from all non-hidden and non-system non-redirected profiles desktops.
    FOR /D %%? IN ("%ALLUSERSPROFILE%\..\*") DO DEL/Q "%%?\Desktop\*.lnk" 2>NUL
    
    It should all be on one line.

    2.   To delete all shortcuts from all non-redirected profiles desktops.
    FOR /F "DELIMS=" %%? IN ('DIR/B/AD "%ALLUSERSPROFILE%\.."') DO DEL/F/A/Q "%%?\Desktop\*.lnk" 2>NUL
    
    It should also all be on one line.
Use the first example first, it is the safer option.

If the problem is still there after this then your shortcuts are not LNKs; likely URLs or created by CLSIDs.


Thanks for your reply,
for 1. do i just copy and paste what you've written or do i replace any of the %%s? i'm still not totally up on the syntax of these things. Thanks fot your help.

#4 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 23 June 2006 - 06:29 AM

Copy and Paste the exact contents of the code box, into a new line within your existing cleanup.cmd. There is nothing to change in my text.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy