chyronn Posted June 22, 2006 Share Posted June 22, 2006 hi alli'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. Link to comment Share on other sites More sharing options...
Yzöwl Posted June 22, 2006 Share Posted June 22, 2006 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>NULIt 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>NULIt 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. Link to comment Share on other sites More sharing options...
chyronn Posted June 23, 2006 Author Share Posted June 23, 2006 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>NULIt 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>NULIt 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. Link to comment Share on other sites More sharing options...
Yzöwl Posted June 23, 2006 Share Posted June 23, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now