BoardBabe Posted January 25, 2006 Posted January 25, 2006 I'm having problems deleting some files and shortcuts, as they reappear after final reboot. (If I remove after final reboot, they will not reappear).e.g removing favourites will not stick.for /d %%g in ("%UserProfile%\Favoritter\*") do rd /s /q "%%g"for %%g in ("%UserProfile%\Favoritter\*") do del /f /q "%%g"Any ide how to solve this?
Sonic Posted January 25, 2006 Posted January 25, 2006 your commands are executed @ RunOnceEx or cmdlines.txt ? because at RunOnceEx no users are created yet ...
BoardBabe Posted January 25, 2006 Author Posted January 25, 2006 They are run after WPI, im guessing that is after RunOnceEx. They are run when desktop and all is loaded and waiting for final reboot.
Sonic Posted January 25, 2006 Posted January 25, 2006 They are run when desktop and all is loaded and waiting for final reboot.The start menu is loaded too ? if not ... no users are logged so you can try this :CleanUp.cmdyour commands here.del /f %0Copy this file in $OEM$\All users\Start menu\StartupSo when any first user will be logged the batch will be executed and cleans and delete itself.
BoardBabe Posted January 25, 2006 Author Posted January 25, 2006 Yep, I actually already prepped a file like that as a "last resort" hehe But couldn't this be done a bit smoother, like add another RunOnceEx entry where I would normally have the cleanup commands run, that runs the same batch? Would look a bit better, and if it would work reg entries would also apply.What do you think?
RogueSpear Posted January 26, 2006 Posted January 26, 2006 I'm not sure exactly what shortcuts you're trying to clean up, but I believe there some that are created from registry commands or something. They're a complete pain in the butt too. I've basically got all of them taken care of with the exception of "Address Book". Having the following in your WINNT.SIF will eliminate a lot of the bothersome shortcuts:[Components] IEAccess=off OEAccess=off WMAccess=off WMPOCM=off
Sonic Posted January 26, 2006 Posted January 26, 2006 Yep, I actually already prepped a file like that as a "last resort" hehe But couldn't this be done a bit smoother, like add another RunOnceEx entry where I would normally have the cleanup commands run, that runs the same batch? Would look a bit better, and if it would work reg entries would also apply.What do you think?You can make a batch executed at the end of the first roex and inside the batchSetFinalCleanup.cmd@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Final Cleanup" /fREG ADD %KEY%\001 /VE /D "Cleanup" /fREG ADD %KEY%\001 /V 1 /D "%systemdrive%\Cleanup.cmd" /f::Fix a reboot after 1min of the logon process ...::So the runoncex will be re-executed with the new commandshutdown -r -t 60The content of Cleanup.cmd is same as my previous post.
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