John Doe Posted January 8, 2005 Share Posted January 8, 2005 I need some help how to remove all shortcuts from the desktop and the start menu.Can it be done with a cmd file?Thanks Link to comment Share on other sites More sharing options...
Astalavista Posted January 8, 2005 Share Posted January 8, 2005 pls read http://unattended.msfn.org this has already been covered before. this is a very simple batch command.DEL "%AllUsersProfile%\Desktop\*.lnk"pls use the search function in the future Link to comment Share on other sites More sharing options...
sixpack Posted January 8, 2005 Share Posted January 8, 2005 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:QUOTE 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"QUOTE 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:QUOTE 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 /f You're advised to make those strings be the latest commands executed by your batch. Link to comment Share on other sites More sharing options...
John Doe Posted January 8, 2005 Author Share Posted January 8, 2005 Thanks! but why can`t i use this command:del c:\windows\document and settings\all users\*.* ? Link to comment Share on other sites More sharing options...
Astalavista Posted January 8, 2005 Share Posted January 8, 2005 del c:\windows\document and settings\all users\*.* ?huh? i suggest that u go visit http://unattended.msfn.orgunless u modified your installation, there is no such location. Link to comment Share on other sites More sharing options...
John Doe Posted January 8, 2005 Author Share Posted January 8, 2005 ooops I have a swedish version, that explains all my problems... Link to comment Share on other sites More sharing options...
Astalavista Posted January 9, 2005 Share Posted January 9, 2005 it doesn't matter if it is suwahili xp is setup the same way.go to runthen typesetpost the results here Link to comment Share on other sites More sharing options...
John Doe Posted January 9, 2005 Author Share Posted January 9, 2005 it doesn't matter if it is suwahili xp is setup the same way.go to runthen typesetpost the results herecan`t find file...and by the way, I can`t use this commands:C:\Documents and Settings\Administrator\Desktop\C:\Documents and Settings\Administrator\Start Menu\I have to use this (in Swedish) C:\Documents and Settings\Administratör\SkrivbordC:\Documents and Settings\Administratör\Start-menyThanks for all the help! Link to comment Share on other sites More sharing options...
Astalavista Posted January 10, 2005 Share Posted January 10, 2005 go to starttype cmdtype setloOk 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