October 24, 200421 yr Greetings all. Thanks for such great efforts and answers from knowledgeable people.I'm writing a script to install a group of maintenance apps (Ad-aware, Spybot, etc.). The install part is perfect now and does all I need it to do. However, I'm working on the cleanup part now. After all the apps are installed they create shortcuts all over the desktop and start menu. Is there any way to determine via a script or command what user profile the script was run under and automatically have it delete the shortcuts and folders from the startup menu?something like:Del \documents and settings\%currentuser%\desktop\ad-aware se personal
October 25, 200421 yr Well you can make use of the USERPROFILE and USERNAME environment variables to determine the profile paths...
October 25, 200421 yr %userprofile% = C:\documents and settings\FRED (Fred is the current user logged on)%AllUsersProfile% = C:\documents and settings\All Usersmake sure u add quotes around itDEL /Q /S "%userprofile%\something.lnk"
October 25, 200421 yr Author DUDE! You rock! :-) I can't wait to get home and try this out. The script is coming along nicely. I ahev a few qerks to work through, but so far it's proving a HUGE time saver.I have a question. I was trying to delete "Ad-aware SE Personal" icon from my desktop via a DOS prompt and was having NO luck.I tried:del C:\my path\ad-awa~1.lnkdel C:\my path\ad~1.linkdel C:\my path\ad-aware SE Personal.lnkdel C:\my path\"ad-aware SE Personal.lnk"del C:\my path\'ad-aware SE Personal.lnk'and about 90 other versions and never could determine the right file name.Is there any way to make 2K or XP display the DOS name of a file? It showed me the long file name in my directory (Which of course I could not delete using.)Thanks again for such great help.joe
Create an account or sign in to comment