InViSibLe Gr Posted February 26, 2006 Posted February 26, 2006 My question is in the topic i dont know how to make scripts and i'm making scripts with ScriptWriter can i delete a shortcut from desktop with autoit if the installer doesnt have a choice for that and creates them without asking? d**n i hate that! and if i can how to do it?i was thinking something like DelShortcut("C:\Documents and Settings\Admin\Desktop\shortcut name")will that one work?and can you tell me whats the extension of shortcuts? is it .ink?please help me if someone knows iti have searched for that and didnt find nothing
shooter468 Posted February 26, 2006 Posted February 26, 2006 well i dont really know what your talking about...but extension for shortcuts is .lnk not .ink
mrshark Posted February 26, 2006 Posted February 26, 2006 rm "%USERPROFILE%"\Desktop\LINKNAME.lnkrm "%ALLUSERSPROFILE%"\Desktop\LINKNAME.lnkfor single user and all users, respectively
InViSibLe Gr Posted February 26, 2006 Author Posted February 26, 2006 rm "%USERPROFILE%"\Desktop\LINKNAME.lnkrm "%ALLUSERSPROFILE%"\Desktop\LINKNAME.lnkfor single user and all users, respectivelyThanks a lot mrshark! You are my hero! d**m... i'm searching for that about 5-6 hours...!
InViSibLe Gr Posted February 26, 2006 Author Posted February 26, 2006 that didnt work...thanks anyway for your replyi will continue my searchingand if i find how to do it i will post it here(if anyone cares for that)
Yzöwl Posted February 26, 2006 Posted February 26, 2006 In AutoIT, I believe that something along these lines will do it.FileDelete(@DesktopCommonDir & "\shortcut.lnk")and /orFileDelete(@DesktopDir & "\shortcut.lnk")In batch type language you would require something like thisDEL "%AllUsersProfile%\Desktop\shortcut.lnk">NULand /orDEL "%UserProfile%\Desktop\shortcut.lnk">NUL
mrshark Posted February 27, 2006 Posted February 27, 2006 ehm, my fault... i have UnixUtils installed ( http://unxutils.sourceforge.net ), because i use linux too, and i like to have my commands and scripts also in windows... the right commands for a pure windows command shell are those in the Yzöwl post, the last two... sorry :-(BTW, install UnixUtils, they are great and useful :-)
InViSibLe Gr Posted February 27, 2006 Author Posted February 27, 2006 Thanks a lot Yzöwl!This one worked! I have searching in the google all day yesterday...You saved me!Thank you!!!@mrshark np m8 no need to apologizeyou just made a little mistakebut you reply to me and i thank you for that
ajua Posted February 27, 2006 Posted February 27, 2006 just a suggestion. its not easier to delete them just using del DOS command than usgin an autoit script?. if you want you can have a cmd file for each setup routine so you're better organized.i use one cmd file to delete and copy all the shorcuts i want so that my start menu is organized neatly and my desktop is cleaned.just use DEL PATHTOSHORCUT\shorcut.lnk (you can use system variables as userprofile or alluserprofiles)
InViSibLe Gr Posted February 27, 2006 Author Posted February 27, 2006 just a suggestion. its not easier to delete them just using del DOS command than usgin an autoit script?. if you want you can have a cmd file for each setup routine so you're better organized.i use one cmd file to delete and copy all the shorcuts i want so that my start menu is organized neatly and my desktop is cleaned.just use DEL PATHTOSHORCUT\shorcut.lnk (you can use system variables as userprofile or alluserprofiles)its easier for me to add FileDelete("dir\filename") @ the end of the scriptbut i can use your way for something else! i'll make one batch file to run @ the end of ALL setups and del all the files in %temp% thanks for your suggestion, you just gave me a nice idea!
ajua Posted February 28, 2006 Posted February 28, 2006 its easier for me to add FileDelete("dir\filename") @ the end of the scriptbut i can use your way for something else!i'll make one batch file to run @ the end of ALL setups and del all the files in %temp% newwink.gifthanks for your suggestion, you just gave me a nice idea! thumbup.gifif you use autoit scripts is truth. much easier to add FileDelete at the end.i use a cmd for making the final steps, deleting files, organizing star menu, cleaning temp dir, disabling zip folders and cabview and many other stuff like this that dont deserve to be put in tweaks or on other smd files i use.definitively is very useful to delte tons of stuff that are useless at the end of any installation.
InViSibLe Gr Posted February 28, 2006 Author Posted February 28, 2006 (edited) well... i had a very nice idea today!i'm adding ccleaner to install with all the autoit setups that i have madeand in the end i'm autoit running it to auto-remove all the crap!but i want too, to make a cmd that will organize start menubut d**n... its trouble to do that but i'm gona make this cause i like to have my start-programswithout folders, but only with the shortcuts of the progs that i useits looks very nike like thisand i was thinking maybe... if i copy my start menu/progs to cdand tell auto it to del the files inisde c:/start menu/all users/progsand then copy the ones from cd there will that work?hmmm i can try that on vmware to see if it will worki'll make an iso with the start/program files, load it on vmware's xp and will try to see if it works ...you're saying now... is he freaked out?! d**n i love autoit! since i learned it (before 3 days ) and i have stack with it!and i'm converting all my progs to autoit...i have spend 2 days for that and i have more to makewish me luckthanks for the idea for start menu!i like it! hmmm i just find out that i can add only 4 emoticons in each post : ( Edited February 28, 2006 by InViSibLe Gr
ajua Posted March 1, 2006 Posted March 1, 2006 i make winrar sfx for many things and its very easy.1) for start menu folder menu structure i keep a folder with all the folders i use (example: Design, system, DVD, Video, Audio)2) for programs that dont need installer (many freeware apps i use. i always extract them to a folder in program files so i keep another folder like the star menu one with all the freeware so i can update them easily.3) i have the star menu shorcuts of the freeware apps in the folder mentioned above.4) to find out wich shorcuts a program install i test them first the use in cleanup.cmd xcopy and del commands to organize my start menu.and finally, when im about to compile my iso image, i just make sfx archives for the freeware apps (and others that use installer but i found that doesn copy other files outside their installed directory) the start menu structure and everything is neatly organized.you can use this tips i guess. good luck.
InViSibLe Gr Posted March 1, 2006 Author Posted March 1, 2006 hmmm yeah winrar sfx is nice for that!i didnt think about that.thanks for the tip! i'll try that one.btw do you know the command for restart?
Kelsenellenelvian Posted March 1, 2006 Posted March 1, 2006 shutdown.exe -r -f -t 30 -c "To finish installations WPI will now reboot in 30 sec..."
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