Wb-FreeKill Posted January 30, 2005 Share Posted January 30, 2005 How can i delete this shortcut? Filedelete(@StartupDir & "\MyFile.exe") It works with an non shortcut file... Link to comment Share on other sites More sharing options...
therks Posted January 30, 2005 Share Posted January 30, 2005 MyFile.exe is hardly a shortcut. It's an executable file. Perhaps the shortcut is "MyFile.exe.lnk" and you just have extensions hidden? If not, check to see if the file is readonly, perhaps FileDelete can't delete readonly files. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 30, 2005 Author Share Posted January 30, 2005 It is a shortcut, its full name is MyFile.exe, dunno if it readonly or not... Ive used the "GUIctrlcreateshortcut" to put it in the startupdir... Link to comment Share on other sites More sharing options...
zcoacoaz Posted January 30, 2005 Share Posted January 30, 2005 all shortcuts end in .lnk no matter what, and thats an L not I so like saunders says, tell it to delete "MyFile.exe.lnk" [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
therks Posted January 30, 2005 Share Posted January 30, 2005 ... You used "GUIctrlcreateshortcut" to put it in the startup folder? Praytell, what is this function "GUIctrlcreateshortcut" ? Perhaps you meant "FileCreateShortcut" ? If you did, then I'd like to you to see something... AutoIt: FileCreateShortcut('C:\', 'C:\TestDir\MyFile.exe') Cmd: C:\>dir C:\TestDir Volume in drive C is Primary Volume Serial Number is 349F-9788 Directory of C:\TestDir 30/01/2005 09:06 AM <DIR> . 30/01/2005 09:06 AM <DIR> .. 30/01/2005 09:06 AM 288 MyFile.exe.lnk 1 File(s) 288 bytes 2 Dir(s) 7,577,804,800 bytes free See? MyFile.exe.lnk So if you used FileCreateShortcut to make your shortcut, it automatically puts .lnk on the end. WinXP hides the extension of .lnk files, even if you have extensions unhidden. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
CyberSlug Posted January 30, 2005 Share Posted January 30, 2005 WinXP hides the extension of .lnk files, even if you have extensions unhidden.<{POST_SNAPBACK}>Actually all versions of Windows have the feature: Info can be found here Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 30, 2005 Author Share Posted January 30, 2005 Damn, i wrote I instead if L, that was the whole problem, thx guys - your the best Link to comment Share on other sites More sharing options...
therks Posted January 30, 2005 Share Posted January 30, 2005 Actually all versions of Windows have the feature: Info can be found here<{POST_SNAPBACK}>That's twice you corrected me today CyberSlug, damn you're on a roll. My AutoIt Stuff | My Github 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