Mikep7779 Posted November 22, 2005 Share Posted November 22, 2005 Well, the line in my .cmd saysDEL "%AllUsersProfile%\desktop\*.lnk"However some icons are made at first login and rent deleted. How can i fix this. BTW, this is ran via runonce. Link to comment Share on other sites More sharing options...
Mikep7779 Posted November 23, 2005 Author Share Posted November 23, 2005 bump. Link to comment Share on other sites More sharing options...
Fencer128 Posted November 23, 2005 Share Posted November 23, 2005 Hi,Maybe you need to look towards stopping the creation of the shortcuts, rather than deleting them after the event. If RunOnce is too early to run your cleanup script then it might start to get tricky.Good luck,Andy Link to comment Share on other sites More sharing options...
AndreK Posted November 23, 2005 Share Posted November 23, 2005 Well, the line in my .cmd saysDEL "%AllUsersProfile%\desktop\*.lnk"However some icons are made at first login and rent deleted. How can i fix this. BTW, this is ran via runonce.You could set this command in an other batch file, that is triggered in the main_batch file that you run at GUIRUNONCE. But make sure that you use a program that sleeps te batch file for a few seconds (sleep.exe) does the trick.This is to make sure the system is completely booted and wrote all the dir's and files..Hope this will help you Link to comment Share on other sites More sharing options...
MHz Posted November 23, 2005 Share Posted November 23, 2005 (edited) Well, the line in my .cmd saysDEL "%AllUsersProfile%\desktop\*.lnk"However some icons are made at first login and rent deleted. How can i fix this. BTW, this is ran via runonce.Is that HKLM Runonce or HKCU RunOnce. Or do you actually run it from HKLM RunOnceEx, like alot of people seem to do?These 3 registry keys run at different times and have different characteristics. HKCU RunOnce runs when the desktop is active and that is when I run a script to cleanup shortcuts... Edited November 23, 2005 by MHz Link to comment Share on other sites More sharing options...
maxXPsoft Posted November 23, 2005 Share Posted November 23, 2005 For those harda$$ lnks don't want to disappear just simply add then to a .cmd file and run it as last thing Cleanup.cmd runsMy zzCleaningUp.cmdColor 0ASET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "UnattendXP - Cleaning Up Links" /fREM //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\REG ADD %KEY%\DelShrtCuts /VE /D "Cleanup" /fREG ADD %KEY%\DelShrtCuts /V 1 /D "CMD /C DEL \"%USERPROFILE%\Application Data\Microsoft\Internet Explorer\Quick Launch\Ad-Aware SE Personal.lnk\"" /fREG ADD %KEY%\DelShrtCuts /V 2 /D "CMD /C DEL \"%USERPROFILE%\Application Data\Microsoft\Internet Explorer\Quick Launch\IncrediMail.lnk\"" /fREG ADD %KEY%\DelShrtCuts /V 3 /D "CMD /C DEL \"%USERPROFILE%\Start Menu\Programs\Startup\Winamp Agent.lnk\"" /fREG ADD %KEY%\DelShrtCuts /V 4 /D "CMD /C DEL \"%USERPROFILE%\Desktop\Winamp.lnk"" /fREG ADD %KEY%\DelShrtCuts /V 1 /D "CMD /C DEL \"%USERPROFILE%\Application Data\Microsoft\Internet Explorer\Quick Launch\Winamp.lnk\"" /frundll32.exe iernonce.dll,RunOnceExProcessEXITBeen there and done that and so this file takes care of them but you name them separatelyGive it a try 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