Jump to content

Recommended Posts

Posted

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.


Posted

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.

Posted
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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...