Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

desktop icons

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
23 replies to this topic

#1
Lost Soul

Lost Soul

    Snap ... Crackle ... Pop

  • Member
  • PipPipPipPipPipPipPip
  • 1,719 posts
  • Joined 12-December 03
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

This is not the end. It is not even the beginning of the end. But, it is, perhaps, the end of the beginning.

- Winston Churchill


How to remove advertisement from MSFN

#2
WwTIPPYwW

WwTIPPYwW

    Advanced Member

  • Member
  • PipPipPip
  • 330 posts
  • Joined 15-February 04
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

#3
mazin

mazin

    MSFN Addict

  • MSFN Sponsor
  • 1,948 posts
  • Joined 12-January 04
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.
Posted Image

#4
Lost Soul

Lost Soul

    Snap ... Crackle ... Pop

  • Member
  • PipPipPipPipPipPipPip
  • 1,719 posts
  • Joined 12-December 03
thank you mazin for the endepth tut on locating and deleteing desktop icons i appreciate your help :)

This is not the end. It is not even the beginning of the end. But, it is, perhaps, the end of the beginning.

- Winston Churchill

#5
Nick2588

Nick2588

    Newbie

  • Member
  • 39 posts
  • Joined 28-May 04
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.

#6
mazin

mazin

    MSFN Addict

  • MSFN Sponsor
  • 1,948 posts
  • Joined 12-January 04

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"
Posted Image

#7
Nick2588

Nick2588

    Newbie

  • Member
  • 39 posts
  • Joined 28-May 04

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.

#8
mazin

mazin

    MSFN Addict

  • MSFN Sponsor
  • 1,948 posts
  • Joined 12-January 04
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.
Posted Image

#9
mazin

mazin

    MSFN Addict

  • MSFN Sponsor
  • 1,948 posts
  • Joined 12-January 04
It works on my PC in this form, too:

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

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

#10
mazin

mazin

    MSFN Addict

  • MSFN Sponsor
  • 1,948 posts
  • Joined 12-January 04
We need a third tester. Anyone?
Posted Image

#11
SiMoNsAyS

SiMoNsAyS

    C'mon you apes! You wanna live forever!?

  • Patrons
  • 3,414 posts
  • Joined 17-May 04
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).

#12
mazin

mazin

    MSFN Addict

  • MSFN Sponsor
  • 1,948 posts
  • Joined 12-January 04
Thank you SiMoNsAyS for your time. I think you're right. I even forgot to ask Nick2588 about his system.
Posted Image

#13
jrzycrim

jrzycrim

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 769 posts
  • Joined 17-March 04
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.
Jim Roberts

"Knowledge is chimera, for beyond it ever lies other knowledge, and the incompleteness of what is known renders the knowing false."

#14
rootfixxxer

rootfixxxer

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 14-July 04
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"....?????

#15
Cee-Kay

Cee-Kay

    Member

  • Member
  • PipPip
  • 123 posts
  • Joined 20-May 04
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. :)
AMD Phenom II x3 720 Black Edition // GIGABYTE GA-MA790FXT-UD5P // Sapphire HD 4770 512MB // Mushkin Xtreme 996657 4GB (2x2GB) // WD Raptor 150GB // Corsair HX620W // Antec Three Hundred

Secunia Software Inspector // Filehippo Update Checker

#16
jrzycrim

jrzycrim

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 769 posts
  • Joined 17-March 04

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

"Knowledge is chimera, for beyond it ever lies other knowledge, and the incompleteness of what is known renders the knowing false."

#17
rootfixxxer

rootfixxxer

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 14-July 04
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?!!?

#18
jrzycrim

jrzycrim

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 769 posts
  • Joined 17-March 04
Refer to this for info about the "default user".

http://www.mvps.org/...stomprofile.htm
Jim Roberts

"Knowledge is chimera, for beyond it ever lies other knowledge, and the incompleteness of what is known renders the knowing false."

#19
rootfixxxer

rootfixxxer

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 14-July 04
thks for the link very usefull info there

#20
Zahriki

Zahriki

    The man in black fled across the desert...

  • Member
  • 29 posts
  • Joined 15-August 04
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"


#21
jrzycrim

jrzycrim

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 769 posts
  • Joined 17-March 04
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.
Jim Roberts

"Knowledge is chimera, for beyond it ever lies other knowledge, and the incompleteness of what is known renders the knowing false."

#22
chyronn

chyronn

    Still A Noob

  • Member
  • Pip
  • 90 posts
  • Joined 12-October 04
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.

#23
sHaDYvB

sHaDYvB

    Newbie

  • Member
  • 33 posts
  • Joined 12-May 05
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 .....

#24
war59312

war59312

    Will's Blog

  • Member
  • PipPipPipPipPip
  • 933 posts
  • Joined 07-June 02
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. ;)

Statistics for Ad Muncher v4.94.34121/5629 (Free) 

Adverts removed: 6,649,007
Bandwidth saved: 195,746 MB 
Counter started: April 2, 2003