ClassicMan Posted June 22, 2008 Share Posted June 22, 2008 Could someone please post what I would need to put into a .reg file to delete a shortcut (.lnk) in the Start/Programs list of Windows XP. In particular I want to remove the 'Powertoys for Windows XP' link.The reason why I want to do this using a .reg file is so that I can include this in an unattended install. I have added Tweakui with a control panel icon to my unattended install but it also adds an entry in the Start/Programs list.I'm not even sure if this can be done with a .reg file.Thanks. Link to comment Share on other sites More sharing options...
shahed26 Posted June 22, 2008 Share Posted June 22, 2008 (edited) I dont know if it can be done by a reg file, never tried it, But i do it with a bat file.For deleting a shortcut link :del /s/q "%userprofile%\desktop\*VLC media player.lnk"For deleting a directory or folder in start menu:RD /S /Q "%systemdrive%\Documents and Settings\Administrator\Start Menu\Programs\Eset\" Edited June 22, 2008 by shahed26 Link to comment Share on other sites More sharing options...
ClassicMan Posted June 22, 2008 Author Share Posted June 22, 2008 (edited) I dont know if it can be done by a reg file, never tried it, But i do it with a bat file.For deleting a shortcut link :del /s/q "%userprofile%\desktop\*VLC media player.lnk"For deleting a directory or folder in start menu:RD /S /Q "%systemdrive%\Documents and Settings\Administrator\Start Menu\Programs\Eset\"Thanks for you quick reply shahed26, it's much appreciated.I've never created my own batch file before so could you give me more info on:(1) How is this done. Is it done in Notepad or some other way and do I need to include any other code for the complete batch file?(2) How would I add this batch file to nLite, is it still through the Unattended-RunOnce or is added some other way.I much appreciate your help with this. Edited June 22, 2008 by ClassicMan Link to comment Share on other sites More sharing options...
shahed26 Posted June 22, 2008 Share Posted June 22, 2008 (edited) (1) How is this done. Is it done in Notepad or some other way and do I need to include any other code for the complete batch file?Yes it done in notepad. But when it comes to saving, use "save as" option and save it with the extension "bat"(2) How would I add this batch file to nLite, is it still through the Unattended-RunOnce or is added some other way.I prefer my way, which is the through GuiRunOnce by editing the "winnt.sif" file.Open "winnt.sif" with notepad, and add this (winnt.sif file is inside folder i386)[GuiRunOnce]%SystemDrive%\xxxxx.batNote:In your bat file add this at the end del %0This will delete your bat file from HDD as well when its finish running your commandsIn order to do it this way you need to create a new folder in your xp cd.Create a new folder and name it $OEM$, and inside this folder create another new folder and name it $1, thats where you must put your bat file in order for it to workeg.@echo offdel /s/q "%userprofile%\desktop\*VLC media player.lnk"RD /S /Q "%systemdrive%\Documents and Settings\Administrator\Start Menu\Programs\Eset\"del %0On xp there are many ways of running bat files, but thats the way i prefer and i do itGood Luck! Edited June 22, 2008 by shahed26 Link to comment Share on other sites More sharing options...
Quisquose Posted July 7, 2008 Share Posted July 7, 2008 On xp there are many ways of running bat files, but thats the way i prefer and i do itJust out of interest, why do you prefer that method over others? I'd be interested to know because I am unfamiliar with the pros and cons of the different methods. Link to comment Share on other sites More sharing options...
BikinDutchman Posted July 7, 2008 Share Posted July 7, 2008 For the official way of doing this see: here and related chapters.Good luck 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