kyuuzo Posted October 6, 2004 Share Posted October 6, 2004 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" Link to comment Share on other sites More sharing options...
MCT Posted October 6, 2004 Share Posted October 6, 2004 DEL /Q "%appdata%\Microsoft\Internet Explorer\Quick Launch\Launch Internet Explorer Browser.lnk" Link to comment Share on other sites More sharing options...
kyuuzo Posted October 6, 2004 Author Share Posted October 6, 2004 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? Link to comment Share on other sites More sharing options...
MCT Posted October 6, 2004 Share Posted October 6, 2004 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! Link to comment Share on other sites More sharing options...
kyuuzo Posted October 6, 2004 Author Share Posted October 6, 2004 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... Link to comment Share on other sites More sharing options...
MCT Posted October 6, 2004 Share Posted October 6, 2004 u still dont have 2 reinstall 2 have something run in runonceex add the entries in runonceex & restart Link to comment Share on other sites More sharing options...
jjn1056 Posted October 6, 2004 Share Posted October 6, 2004 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 Link to comment Share on other sites More sharing options...
jdoe Posted October 6, 2004 Share Posted October 6, 2004 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 Link to comment Share on other sites More sharing options...
MCT Posted October 6, 2004 Share Posted October 6, 2004 also, maybe making a small autoit script 2 start hidden, that way the user doesnt know its happening Link to comment Share on other sites More sharing options...
kyuuzo Posted October 6, 2004 Author Share Posted October 6, 2004 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. Link to comment Share on other sites More sharing options...
RogueSpear Posted October 6, 2004 Share Posted October 6, 2004 How about putting IEAccess=off in the winnt.sif file? Link to comment Share on other sites More sharing options...
SexyStud Posted October 13, 2004 Share Posted October 13, 2004 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 Link to comment Share on other sites More sharing options...
Alpheratz13 Posted October 13, 2004 Share Posted October 13, 2004 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 Link to comment Share on other sites More sharing options...
kyuuzo Posted October 14, 2004 Author Share Posted October 14, 2004 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. Link to comment Share on other sites More sharing options...
buletov Posted October 14, 2004 Share Posted October 14, 2004 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% 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