November 14, 200520 yr During cleanup I randel /q "%UserProfile%\Mine dokumenter\Mine bilder\Eksempelbilder.lnk"del /q "%UserProfile%\Mine dokumenter\Mine musikk\Eksempelmusikk.lnk"Paths are correct -Norwegian Windows XP. The shortcuts was still there after computers last reboot.I tried to manually run the two lines from cmd and the shortcuts were removed... Any idea?
November 14, 200520 yr Perhaps the cmd exit beforce these two line, for example because another cause an error and exit without running these lines, try to insert a "pause" and echo on to look all the command and the result.
November 14, 200520 yr When you run your cmd ? This must run in a session .. not at cmdlines.txt for example ...
November 14, 200520 yr Try removing the folders from the %AllUsersProfile% first and then delete the link. In my cleanup command I use the followingRD /S /Q "%AllUsersProfile%\Documents\My Music"RD /S /Q "%AllUsersProfile%\Documents\My Pictures"RD /S /Q "%AllUsersProfile%\Documents\My Videos"DEL /F "%UserProfile%\My Documents\My Music\Sample Music.lnk"DEL /F "%UserProfile%\My Documents\My Pictures\Sample Pictures.lnk"DEL /F "%UserProfile%\My Documents\My Videos\Sample Videos.lnk"
November 14, 200520 yr Try this vbs script I have used the directory you have provided, I do nothave a way to test this. Save As Remove_MusicLinks.VBSOn Error Resume NextDim Act, Fso, UPSet Act = CreateObject("WScript.Shell")Set Fso = CreateObject("Scripting.FileSystemObject")UP = Act.ExpandEnvironmentStrings("%UserProfile%")Fso.DeleteFile(UP & "Mine dokumenter\Mine bilder\Eksempelbilder.lnk")Fso.DeleteFile(UP & "Mine dokumenter\Mine bilder\Eksempelmusikk.lnk")
Create an account or sign in to comment