Jump to content

Using .cmd To Remove A Start Menu Link


Recommended Posts

Posted (edited)

To perfect my unattended install I just need to remove the 'Remote Assistance' link that Windows XP puts there by default. I have searched the forums and it seems the way for this is to use a .cmd file.

My searching also tells me that the file needs to be prepared in 'Notepad' and that the default .txt is renamed to .cmd. One suggestion is to use the following in 'Notepad':

erase "%AllUsersProfile%\..\Default User\Start Menu\Programs\Remote Assistance.lnk"

My questions are as follows:

(1) Is the example given the full wording/code or do I need to add more for the full entry?

(2) If the example is just one line of the entry, what else do I need for the complete command?

(3) I believe the .cmd file is then saved in the $OEM$ folder or is there some other location for the file?

In addition to the entry example I gave, I also found the following variations:

erase "%UserProfile%\Start Menu\Programs\Remote Assistance.lnk" and:

erase "%UserProfile%\\Start Menu\\Programs\\Remote Assistance.lnk" or

erase "%AllUsersProfile%\\..\\Default User\\Start Menu\\Programs\\Remote Assistance.lnk"

(4) Which is better to use, %UserProfile% or %AllUsersProfile%?

(5) Which is better to use, the single \ or the double \\ or doesn't this make any difference?

(6) My first example includes \..\ which is missing in the second example. Should this be included?

Finally, how would I set my cmd file to delete itself when finished?

I would really appreciate any help with this.

Many thanks.

Edited by ClassicMan

Posted

There are a few ways to do this, I think the easiest way to do something simple like this would be to put this into a .txt document:

@echo off

del /f /q "%AllUsersProfile%\..\Default User\Start Menu\Programs\Remote Assistance.lnk"

Save the .txt file as a .cmd file, go here and download nLite addon maker and make a .cab file and add it as a hotfix with nLite.

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