jorsak Posted October 24, 2004 Share Posted October 24, 2004 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 Link to comment Share on other sites More sharing options...
ardnelias Posted October 25, 2004 Share Posted October 25, 2004 Well you can make use of the USERPROFILE and USERNAME environment variables to determine the profile paths... Link to comment Share on other sites More sharing options...
MCT Posted October 25, 2004 Share Posted October 25, 2004 %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" Link to comment Share on other sites More sharing options...
jorsak Posted October 25, 2004 Author Share Posted October 25, 2004 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 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