Jump to content

Creating a reg file to remove a Start/Programs entry.


ClassicMan

Recommended Posts

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


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 by shahed26
Link to comment
Share on other sites

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 by ClassicMan
Link to comment
Share on other sites

(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.bat

Note:

In your bat file add this at the end

del %0

This will delete your bat file from HDD as well when its finish running your commands

In 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 work

eg.

@echo off

del /s/q "%userprofile%\desktop\*VLC media player.lnk"
RD /S /Q "%systemdrive%\Documents and Settings\Administrator\Start Menu\Programs\Eset\"

del %0

On xp there are many ways of running bat files, but thats the way i prefer and i do it

Good Luck!

Edited by shahed26
Link to comment
Share on other sites

  • 3 weeks later...
On xp there are many ways of running bat files, but thats the way i prefer and i do it

Just 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...