Lost Soul Posted June 26, 2004 Share Posted June 26, 2004 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 Link to comment Share on other sites More sharing options...
WwTIPPYwW Posted June 26, 2004 Share Posted June 26, 2004 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 Link to comment Share on other sites More sharing options...
mazin Posted June 26, 2004 Share Posted June 26, 2004 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.lnkdel "%USERSPROFILE%\Desktop\Ad-aware 6.0.lnk"del "%USERSPROFILE%\Desktop\Ad-watch 3.0.lnk"del %USERSPROFILE%\Desktop\FlashGet.lnkC:\Documents and Settings\Administrator\Start Menu\- I can't see any.lnk 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.lnkdel "%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.lnkdel "%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.lnkdel "%ALLUSERSPROFILE%\Desktop\Adobe Reader 6.0.lnk"del %ALLUSERSPROFILE%\Desktop\Mozilla.lnkdel "%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.lnkdel "%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.lnkdel "%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.lnkdel "%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.lnkdel "%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\ToolbarExamples:- 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 ButtonREG ADD "HKCU\Software\Microsoft\Internet Explorer\Toolbar" /v ShowDiscussionButton /t REG_SZ /d No /f2- 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\RunHKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunExamples:- Winamp AgentREG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /f- QuickTime TaskREG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "QuickTime Task" /f- Mozilla Quick LaunchREG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Mozilla Quick Launch" /f- Internet Download ManagerREG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IDMan /fSpecial Case:- MSN MessengerYou 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 /fREG ADD HKLM\SOFTWARE\Policies\Microsoft\Messenger\Client /v PreventAutoRun /t REG_DWORD /d 1 /fSince 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} /fREG DELETE "HKLM\SOFTWARE\Microsoft\Internet Explorer\Toolbar" /v {E0E899AB-F487-11D5-8D29-0050BA6940E3} /fREG ADD "HKCU\Software\Microsoft\Internet Explorer\Toolbar" /v ShowDiscussionButton /t REG_SZ /d No /fREG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /fREG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "QuickTime Task" /fREG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Mozilla Quick Launch" /fREG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IDMan /fREG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MsnMsgr /fREG ADD HKLM\SOFTWARE\Policies\Microsoft\Messenger\Client /v PreventAutoRun /t REG_DWORD /d 1 /fYou're advised to make those strings be the latest commands executed by your batch.Stay tuned. Link to comment Share on other sites More sharing options...
Lost Soul Posted June 28, 2004 Author Share Posted June 28, 2004 thank you mazin for the endepth tut on locating and deleteing desktop icons i appreciate your help Link to comment Share on other sites More sharing options...
Nick2588 Posted June 28, 2004 Share Posted June 28, 2004 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. Link to comment Share on other sites More sharing options...
mazin Posted June 28, 2004 Share Posted June 28, 2004 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" Link to comment Share on other sites More sharing options...
Nick2588 Posted June 29, 2004 Share Posted June 29, 2004 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. Link to comment Share on other sites More sharing options...
mazin Posted June 29, 2004 Share Posted June 29, 2004 Strange, really! --------------------------------------------------------------This was only a suggestion because I didn't have the shortcut to test:ren "%AllUsersProfile%\Desktop\Alcohol 120%.lnk" alc.lnkdel "%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. Link to comment Share on other sites More sharing options...
mazin Posted June 29, 2004 Share Posted June 29, 2004 It works on my PC in this form, too:del "%AllUsersProfile%\Desktop\Alcohol 120%%.lnk"Last night, it didn't work in this form! Link to comment Share on other sites More sharing options...
mazin Posted June 30, 2004 Share Posted June 30, 2004 We need a third tester. Anyone? Link to comment Share on other sites More sharing options...
SiMoNsAyS Posted June 30, 2004 Share Posted June 30, 2004 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). Link to comment Share on other sites More sharing options...
mazin Posted June 30, 2004 Share Posted June 30, 2004 Thank you SiMoNsAyS for your time. I think you're right. I even forgot to ask Nick2588 about his system. Link to comment Share on other sites More sharing options...
jrzycrim Posted August 6, 2004 Share Posted August 6, 2004 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 offdel /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..." /fREG ADD %KEY%\240 /V 1 /D "%systemdrive%\Install\CleanUp1.cmd" /fREG ADD %KEY%\240 /V 2 /D "\"%systemdrive%\Documents and Settings\Shortcuts.exe\" -y" /fREG ADD %KEY%\240 /V 3 /D "%systemdrive%\install\CleanUp2.cmd" /fObviously 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. Link to comment Share on other sites More sharing options...
rootfixxxer Posted August 7, 2004 Share Posted August 7, 2004 i have a question?!!??%userprofile% is what?? my account name or defualt user???jrzycrimthe 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"....????? Link to comment Share on other sites More sharing options...
Cee-Kay Posted August 7, 2004 Share Posted August 7, 2004 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. 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