Welcome to MSFN

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Sign in to follow this  
Followers 0
Lost Soul

desktop icons

24 posts in this topic

hi im trying to clean up some of my deak top icons put on by a few of my programs . now im not exactly sure whats the best way to go about doing this, is there a switch that can be used to stop a program icon from being placed on the desk top when instillation occurs ?

and if there isnt can some one point me to the right folder in the registry to remove these icons, theres only about 3 or so icons i dont want on there

thanks

0

Share this post


Link to post
Share on other sites

some apps might have a switch.

There is no registry setting.

You'll have to delete the shortcut from the desktop using the DEL command. And some variation of the following variables (unless you explicity say it):

%ALLUSERSPROFILE%\Desktop or %USERSPROFILE%\Desktop

0

Share this post


Link to post
Share on other sites

I'd like to add some explanation to what WwTIPPYwW said.

1- Icon Issues.

After you finish installing all your apps, there are nine locations at which you need to have a look for shortcuts and shortcut folders you want to delete:

C:\Documents and Settings\Administrator\Desktop\

C:\Documents and Settings\Administrator\Start Menu\

C:\Documents and Settings\Administrator\Start Menu\Programs\

C:\Documents and Settings\Administrator\Start Menu\Programs\Startup\

C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\

C:\Documents and Settings\All Users\Desktop\

C:\Documents and Settings\All Users\Start Menu\

C:\Documents and Settings\All Users\Start Menu\Programs\

C:\Documents and Settings\All Users\Start Menu\Programs\Startup\

(I assume you log in as the Administrator.)

These are examples:

--------------------------

C:\Documents and Settings\Administrator\Desktop\

- Ad-aware 6.0.lnk

- Ad-watch 3.0.lnk

- FlashGet.lnk

del "%USERSPROFILE%\Desktop\Ad-aware 6.0.lnk"

del "%USERSPROFILE%\Desktop\Ad-watch 3.0.lnk"

del %USERSPROFILE%\Desktop\FlashGet.lnk

C:\Documents and Settings\Administrator\Start Menu\

- I can't see any.lnk :rolleyes:

del "%USERSPROFILE%\Start Menu\I can't see any.lnk"

C:\Documents and Settings\Administrator\Start Menu\Programs\

- Internet Explorer.lnk

- Windows Media Player.lnk

- Remote Assistance.lnk

del "%USERSPROFILE%\Start Menu\Programs\Internet Explorer.lnk"

del "%USERSPROFILE%\Start Menu\Programs\Windows Media Player.lnk"

del "%USERSPROFILE%\Start Menu\Programs\Remote Assistance.lnk"

C:\Documents and Settings\Administrator\Start Menu\Programs\Startup\

- I can't see any.lnk :)

del "%USERSPROFILE%\Start Menu\Programs\Startup\I can't see any.lnk"

C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\

-Windows Media Player.lnk

del "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Windows Media Player.lnk"

C:\Documents and Settings\All Users\Desktop\

- Adobe Reader 6.0.lnk

- Mozilla.lnk

- QuickTime Player.lnk

- DAEMON Tools.lnk

del "%ALLUSERSPROFILE%\Desktop\Adobe Reader 6.0.lnk"

del %ALLUSERSPROFILE%\Desktop\Mozilla.lnk

del "%ALLUSERSPROFILE%\Desktop\QuickTime Player.lnk"

del "%ALLUSERSPROFILE%\Desktop\DAEMON Tools.lnk"

C:\Documents and Settings\All Users\Start Menu\

- New Office Document.lnk

- Open Office Document.lnk

- Set Program Access and Defaults.lnk

- Windows Catalog.lnk

- Windows Update.lnk

del "%ALLUSERSPROFILE%\Start Menu\New Office Document.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Open Office Document.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Set Program Access and Defaults.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Windows Catalog.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Windows Update.lnk"

C:\Documents and Settings\All Users\Start Menu\Programs\

- Adobe Reader 6.0.lnk

- MSN Messenger 6.2.lnk

- PrintMe Internet Printing (shortcut folder)

- WinZip (shortcut folder)

del "%ALLUSERSPROFILE%\Start Menu\Programs\Adobe Reader 6.0.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Programs\MSN Messenger 6.2.lnk"

RD /S /Q "%ALLUSERSPROFILE%\Start Menu\Programs\PrintMe Internet Printing"

RD /S /Q "%ALLUSERSPROFILE%\Start Menu\Programs\WinZip"

C:\Documents and Settings\All Users\Start Menu\Programs\Startup\

- InstallRite.lnk

del "%ALLUSERSPROFILE%\Start Menu\Programs\Startup\InstallRite.lnk"

As you can see, some apps install for the current user (the log-in user) and others install for all users (per machine).

So, you'll probably use both variables: %USERSPROFILE% and %ALLUSERSPROFILE%.

If the above examples are applicable to your situation, then you should plan to add these lines to your batch file for a future installation:

del "%USERSPROFILE%\Desktop\Ad-aware 6.0.lnk"

del "%USERSPROFILE%\Desktop\Ad-watch 3.0.lnk"

del %USERSPROFILE%\Desktop\FlashGet.lnk

del "%USERSPROFILE%\Start Menu\Programs\Internet Explorer.lnk"

del "%USERSPROFILE%\Start Menu\Programs\Windows Media Player.lnk"

del "%USERSPROFILE%\Start Menu\Programs\Remote Assistance.lnk"

del "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Windows Media Player.lnk"

del "%ALLUSERSPROFILE%\Desktop\Adobe Reader 6.0.lnk"

del %ALLUSERSPROFILE%\Desktop\Mozilla.lnk

del "%ALLUSERSPROFILE%\Desktop\QuickTime Player.lnk"

del "%ALLUSERSPROFILE%\Desktop\DAEMON Tools.lnk"

del "%ALLUSERSPROFILE%\Start Menu\New Office Document.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Open Office Document.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Set Program Access and Defaults.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Windows Catalog.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Windows Update.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Programs\Adobe Reader 6.0.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Programs\MSN Messenger 6.2.lnk"

RD /S /Q "%ALLUSERSPROFILE%\Start Menu\Programs\PrintMe Internet Printing"

RD /S /Q "%ALLUSERSPROFILE%\Start Menu\Programs\WinZip"

del "%ALLUSERSPROFILE%\Start Menu\Programs\Startup\InstallRite.lnk"

However, the following strings can be replaced with this one:

del "%ALLUSERSPROFILE%\Start Menu\*.lnk"

del "%ALLUSERSPROFILE%\Start Menu\New Office Document.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Open Office Document.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Set Program Access and Defaults.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Windows Catalog.lnk"

del "%ALLUSERSPROFILE%\Start Menu\Windows Update.lnk"

2- Registry Issues.

1- Links: Some applications get integrated to Explorer shell by default or on purpose. If this is the case, I think there is no need for those apps to have links in Windows Explorer Toolbar or Internet Explorer Toolbar. Also, there are useless links.

Toolbar links are found under this registry tree:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Toolbar

Examples:

- Norton AntiVirus (Pro 2004 English Version)

REG DELETE "HKLM\SOFTWARE\Microsoft\Internet Explorer\Toolbar" /v {42CDD1BF-3FFB-4238-8AD1-7859DF00B1D6} /f

- FlashGet Bar (needs more testing!)

REG DELETE "HKLM\SOFTWARE\Microsoft\Internet Explorer\Toolbar" /v {E0E899AB-F487-11D5-8D29-0050BA6940E3} /f

- Discuss Button

REG ADD "HKCU\Software\Microsoft\Internet Explorer\Toolbar" /v ShowDiscussionButton /t REG_SZ /d No /f

2- Run: Some applications start with Windows and reside in memory. If those apps are integrated to the shell or are not used frequently by you , I think there is no need for those apps to start with your machine occupying a portion of memory.

Locations of "Run" strings in your Registry are here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Examples:

- Winamp Agent

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /f

- QuickTime Task

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "QuickTime Task" /f

- Mozilla Quick Launch

REG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Mozilla Quick Launch" /f

- Internet Download Manager

REG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IDMan /f

Special Case:

- MSN Messenger

You can prevent MSN Messenger from starting with Windows by executing these commands from your batch file:

REG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MsnMsgr /f

REG ADD HKLM\SOFTWARE\Policies\Microsoft\Messenger\Client /v PreventAutoRun /t REG_DWORD /d 1 /f

Since the default value data is 0, you change it to 1.

If the above examples are applicable to your situation, then you should plan to add these lines to your batch file for a future installation:

REG DELETE "HKLM\SOFTWARE\Microsoft\Internet Explorer\Toolbar" /v {42CDD1BF-3FFB-4238-8AD1-7859DF00B1D6} /f

REG DELETE "HKLM\SOFTWARE\Microsoft\Internet Explorer\Toolbar" /v {E0E899AB-F487-11D5-8D29-0050BA6940E3} /f

REG ADD "HKCU\Software\Microsoft\Internet Explorer\Toolbar" /v ShowDiscussionButton /t REG_SZ /d No /f

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /f

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "QuickTime Task" /f

REG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Mozilla Quick Launch" /f

REG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IDMan /f

REG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MsnMsgr /f

REG ADD HKLM\SOFTWARE\Policies\Microsoft\Messenger\Client /v PreventAutoRun /t REG_DWORD /d 1 /f

You're advised to make those strings be the latest commands executed by your batch.

Stay tuned.

0

Share this post


Link to post
Share on other sites

thank you mazin for the endepth tut on locating and deleteing desktop icons i appreciate your help :)

0

Share this post


Link to post
Share on other sites

How can I delete a link with a % sign in the file name?

I want to remove %AllUsersProfile%\Desktop\Alcohol 120%.lnk, but I cannot seem to do this. Running DEL "%AllUsersProfile%\Desktop\Alcohol 120%.lnk" manually from the command line works, but executing it in a .cmd file doesn't remove the icon.

0

Share this post


Link to post
Share on other sites
How can I delete a link with a % sign in the file name?

I want to remove %AllUsersProfile%\Desktop\Alcohol 120%.lnk, but I cannot seem to do this. Running DEL "%AllUsersProfile%\Desktop\Alcohol 120%.lnk" manually from the command line works, but executing it in a .cmd file doesn't remove the icon.

It should work this way:

del "%systemdrive%\Documents and Settings\All Users\Desktop\Alcohol 120%%.lnk"

0

Share this post


Link to post
Share on other sites
It should work this way:

del "%systemdrive%\Documents and Settings\All Users\Desktop\Alcohol 120%%.lnk"

That doesn't work, but your previous suggestion to do rename and then delete did work. Very strange.

Manually entering %% for the percent sign in the file name (on the command line) produces errors, even, saying the file cannot be found.

0

Share this post


Link to post
Share on other sites

Strange, really! --------------------------------------------------------------

This was only a suggestion because I didn't have the shortcut to test:

ren "%AllUsersProfile%\Desktop\Alcohol 120%.lnk" alc.lnk

del "%AllUsersProfile%\Desktop\alc.lnk"

But, I said to myself why not creating a shortcut to test. I tested and it didn't work!

I tried this and it worked:

del "%systemdrive%\Documents and Settings\All Users\Desktop\Alcohol 120%%.lnk"

Now, on your PC, the first worked and the secong didn't!

Strange, really! --------------------------------------------------------------

However, you need to test the second method from a cmd file put in C:\Install\xxxx.cmd because it gives real testing. Putting the cmd file elsewhere might be deceiving.

0

Share this post


Link to post
Share on other sites

It works on my PC in this form, too:

del "%AllUsersProfile%\Desktop\Alcohol 120%%.lnk"

Last night, it didn't work in this form! :)

0

Share this post


Link to post
Share on other sites

We need a third tester. Anyone?

0

Share this post


Link to post
Share on other sites

it works on both ways. probably the difference it's that one would not work on xp installation because windows it's not fully loaded and some system variables are not defined (i think).

0

Share this post


Link to post
Share on other sites

Thank you SiMoNsAyS for your time. I think you're right. I even forgot to ask Nick2588 about his system.

0

Share this post


Link to post
Share on other sites

The last thing I did before finishing my CD was organize all my shortcuts. Desktop, quick launch, Start menu. I then made an SFX archive which contains all of my shortcuts for each of these areas. I just deleted everything and extracted my archive which contains all of my shortcuts.

@echo off

del /Q /F "%userprofile%\Desktop\*.*"
del /Q /F "%allusersprofile%\Desktop\*.*"
del /Q /F "%userprofile%\Application Data\Microsoft\Internet Explorer\Quick Launch\*.*"
RD /Q /S "%userprofile%\Start Menu\"
RD /Q /S "%allusersprofile%\Start Menu\"

For my archive, I created the folders 'Administrator' and 'All Users'. Then In Each of those I placed a copy of the Start Menu folder and Desktop Folder. And then added the appropriate folder for Quick Launch. 7zipped everything and placed it in $OEM$\$Docs.

The above cmd file I named Cleanup1.cmd. I call it from RunOnceEx, then extract my 7zip archive, then a second cleanup cmd file:

REG ADD %KEY%\240 /VE /D "Organizing Desktop, Start Menu and Cleaning Up..." /f
REG ADD %KEY%\240 /V 1 /D "%systemdrive%\Install\CleanUp1.cmd" /f
REG ADD %KEY%\240 /V 2 /D "\"%systemdrive%\Documents and Settings\Shortcuts.exe\" -y" /f
REG ADD %KEY%\240 /V 3 /D "%systemdrive%\install\CleanUp2.cmd" /f

Obviously this can be done any number of ways and of course, you can easily add things for 'Default User', 'All Users' or any other User you need.

Cleanup2.cmd is just your standard cleanup batch. Nothing special happening there...

Originally I tried placing an archive inside $OEM$\$Docs\User name but when setup sees that there is already a particular user folder present it will create a new folder called user name-computer name and everything ends up in the wrong place. That's why I placed it in $Docs and extracted everything after setup creates these folders. You could probably place the archive anywhere and just extract to the appropriate path. I just opted to do it this way.

I like this method because you do not have to deal with individual shortcuts and it makes organizing a lot easier.

0

Share this post


Link to post
Share on other sites

i have a question?!!??

%userprofile% is what?? my account name or defualt user???

jrzycrim

the method that u use is excelent....

just del all links in the desktop,quick launch and start menu... then extract one file with all links that really matter...

the compressed file can be made with the winrar (Sfx file wih the default path set ex: C:\documents and settings...)

and then with /s make a silent "copy"....?????

0

Share this post


Link to post
Share on other sites

An alternative method to delete the pesky Alcohol shortcut (and others like it) would be:

Del "%systemdrive%\Documents and Settings\All Users\Desktop\Alcohol 120*.lnk"

This was the first workaround I thought of, since all my shortcuts were getting deleted as expected, except Alcohol 120%.

This method works for all the usual commands (as far as I know) including copying, moving, renaming etc. as you can use the '*' to represent where the filename differs. For example to delete Filename001.txt, Filename002.doc and Filename003.jpg you could use...

Del "[File Path]\Filename***.***"

This would delete all three forementioned filenames in one hit.

I hope you guys find this information useful. :)

0

Share this post


Link to post
Share on other sites
i have a question?!!??

%userprofile% is what?? my account name or defualt user???

jrzycrim

the method that u use is excelent....

just del all links in the desktop,quick launch and start menu... then extract one file with all links that really matter...

the compressed file can be made with the winrar (Sfx file wih the default path set ex: C:\documents and settings...)

and then with /s make a silent "copy"....?????

%userprofile% would be the currently logged on user. I do mine from RunOnceEx while logged on as Administrator. Before logon, say from cmdlines.txt, the default user would apply.

I'd recommend doing it from GUIRunOnce or RunOnceEx since doing it before the guisetup finishes wouldn't work so well.

I've never used Winrar so I'm not sure.

0

Share this post


Link to post
Share on other sites

let me see i create the autologn file with my account...

accounts.cmd... with a reg file associated!

i have sure that when i run the Guirunonce i 'm logged in with my profile created and not the administrator....

but all the apps i install runs in the guirunonce... so i just have to add something in the end of my start .cmd (that's the name of the batch file :) ) something like this:

RD /Q /S %allusersprofile%\Desktop (removes the dir and all subdir)

RD /Q /S %allusersprofile%\Start Menu

RD /Q /S c:\docs_settings\Defualt user\Application Data\Microsoft\Internet Explorer\Quick Launch

RD /Q /S %userprofile%\Desktop (removes the dir and all subdir)

RD /Q /S %userprofile%\Start Menu

...

about the winrar it should work... in the options when creating the archive

just have to select to decompress in c:\documents and setings and select to overwrite

by the way whats the diference between the default user and the account name that is logged in?!!?

0

Share this post


Link to post
Share on other sites

how about deleting \Program Compatibility Wizard.lnk

I tried this in my batch file but it didn't have any effect.

del "%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\Program Compatibility Wizard.lnk"

0

Share this post


Link to post
Share on other sites

I believe that shortcut is in the Defaut User Start Menu. It will be copied over to any new account which is created. You'll probably need to delete it from "%userprofile%\Start Menu\Programs\Accessories\Program Compatibility Wizard.lnk" and from "%systemdrive%\documents and settings\default user\Start Menu\Programs\Accessories\Program Compatibility Wizard.lnk" if you don't want it to be copied to new accounts.

Can't remember if there is a variable for the Default User directory.

0

Share this post


Link to post
Share on other sites

i don't get it...i'm sure it's been said before but my brain is fried. all i see in the Docs and Settings folder are three folders, one named "All Users" one named "Default User" and another named "Mr X" (my name). the Default User is hidden by default (no pun), which one is the Admin account?

i use RunOnceEx.

0

Share this post


Link to post
Share on other sites
It is really strang , it works in all ways ,,

as though i've experienced that issue before , and ended with deleting all Alcohol*.lnk files , which worked for me then .....
0

Share this post


Link to post
Share on other sites
Well chyronn, Mr X would be the admin then. Seeing as windows requries at least one admin account. Or is Administor idden too? ;)

I only use DEL "%UserProfile%\Start Menu\Programs\Accessories\Program Compatibility Wizard.lnk" myself. ;)
0

Share this post


Link to post
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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.