Airwolf Posted April 13, 2006 Share Posted April 13, 2006 I am trying to delete a *.lnk shortcut file from the desktop at the end of my script. Since the script will be run in different user accounts, I need to know how to get to the current user's desktop. I tried: FileDelete("@DesktopDir\Delete AutoPatcher folder.lnk") Any Ideas? Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
JSThePatriot Posted April 13, 2006 Share Posted April 13, 2006 I am trying to delete a *.lnk shortcut file from the desktop at the end of my script. Since the script will be run in different user accounts, I need to know how to get to the current user's desktop. I tried: FileDelete("@DesktopDir\Delete AutoPatcher folder.lnk") Any Ideas? First things first your code should be more like... FileDelete(@DesktopDir & "\Delete AutoPatcher folder.lnk") Notice the use of the & and where the quotes are placed. Now if the above doesnt work for you then you may want to swap @DesktopDir with @DesktopCommonDir. I could have swore it wouldnt have worked in my case, but it did! So give it a try and let me know. Hope this helps some, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Airwolf Posted April 13, 2006 Author Share Posted April 13, 2006 Thanks a lot! It worked! Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt 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