October 6, 200421 yr During RunOnceEx using cleanup.cmd, I'm trying to delete the Internet Explorer link from QuickLaunch. I've tried this but it doesn't seem to work. After RunOnceEx runs and my computer reboots, if I run it then it is deleted. However, I'd like it deleted during this RunOnceEx phase. Anyone have any ideas?Here's the relevant part of my RunOnceEx.cmdREG ADD %KEY%\145 /V 2 /D "%systemdrive%\install\cleanup.cmd" /fHere's the relevant part of my cleanup.cmdDEL /F /Q "C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\Launch Internet Explorer Browser.lnk"
October 6, 200421 yr DEL /Q "%appdata%\Microsoft\Internet Explorer\Quick Launch\Launch Internet Explorer Browser.lnk"
October 6, 200421 yr Author DEL /Q "%appdata%\Microsoft\Internet Explorer\Quick Launch\Launch Internet Explorer Browser.lnk"Just tried an install with this, didn't work. Launch Internet Explorer Browser.lnk is still in the Administrator's QuickLaunch. Any other ideas?
October 6, 200421 yr try adding /S tooDEL /S /Q "%appdata%\Microsoft\Internet Explorer\Quick Launch\Launch Internet Explorer Browser.lnk"u dont need 2 reinstall just 2 test that!
October 6, 200421 yr Author u dont need 2 reinstall just 2 test that! Like I said in my first post, if I run it normally it works. However when I run it during RunOnceEx it doesn't work. I'm trying to make it work during RunOnceEx...
October 6, 200421 yr u still dont have 2 reinstall 2 have something run in runonceex add the entries in runonceex & restart
October 6, 200421 yr The problem is that this shortcut is not created until the first boot of the user who's quick launch directory you are trying to edit.This gave me a big headache for a while too You can verify this by doing a "dir .../*.lnk > quicklinks_log.txt" in your cleanup.cmd on the directory you are doing "del *.lnk" on.If you really want to go all the way, you'll need to create a login script that runs the first time someone logs in and deletes it.It's probably not worth it though... Both IE and Media Player have an annoying habit of reappearing in the quick launch and startmenu every time there is an upgrade to those applications. MS really wants to have those shortcuts put in that spot!Good luck!__John
October 6, 200421 yr The Internet Explorer icon in Quick Launch seem to be created when the user profile is fully loaded so the reason it is not deleted is not because your DEL command is wrong, it's just because there's nothing to delete.Maybe you could try with the STARTUP folder by running a batch from there.The execution order of RunOnce are...1) HKLM - RunOnceEx2) HKLM - RunOnce3) HKCU - RunOnce4) STARTUP folder
October 6, 200421 yr also, maybe making a small autoit script 2 start hidden, that way the user doesnt know its happening
October 6, 200421 yr Author Thanks for everyone's advice. I realized that the shortcut was created after Windows fully loads, so deleting it during the RunOnceEx phase is impossible. However during the RunOnceEx phase I added another key to the RunOnceEx so that after it rebooted and fully loaded into Windows another RunOnceEx would start and delete the link.
October 13, 200421 yr Dunno, but if you set your batch to copy a batch file that dels the quick launch to the admin desktop? This way, the 1st time you log on another profile, you will have that batch on your desktop. just run it and u r done =P
October 13, 200421 yr Thanks for everyone's advice. I realized that the shortcut was created after Windows fully loads, so deleting it during the RunOnceEx phase is impossible. However during the RunOnceEx phase I added another key to the RunOnceEx so that after it rebooted and fully loaded into Windows another RunOnceEx would start and delete the link.Hi,I have the same probleme How do you make an RunOnceEx to call second RunOnceEx after first reboot?I hope that you understand what i mean?ThanksIrving
October 14, 200421 yr Author Here's the relevant line in RunOnceEx.cmdThis calls another file to add more registry keysREG ADD %KEY%\145 /V 2 /D "%systemdrive%\install\extracleanup.cmd" /fHeres extracleanup.cmd (Will run after second reboot, after Administrator is fully logged on)cmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY%\002 /VE /D "Cleaning Up and Rebooting" /fREG ADD %KEY%\002 /V 1 /D "%systemdrive%\install\selfcleanup.bat" /fEXITIt might be a good idea to not use any numbers that you've used in your first RunOnceEx, I'm not sure though.
October 14, 200421 yr this is how i delete windows media player link, which has the same issue:@echo offcmdow @ /hiddel /F "%userprofile%\Start Menu\Programs\Windows Media Player.lnk":gosleep 1if exist "%userprofile%\Start Menu\Programs\Windows Media Player.lnk" goto doitecho.Waiting...goto go:doitecho.Deleting...del /F "%userprofile%\Start Menu\Programs\Windows Media Player.lnk"echo %errorlevel%
Create an account or sign in to comment