MSFN Forum: How can i tell autoit to del shortcuts from desktop? - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

How can i tell autoit to del shortcuts from desktop? (if the installer doesnt have a choice for shortcuts) Rate Topic: -----

#1 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

  Posted 26 February 2006 - 01:01 PM

My question is in the topic :)
i dont know how to make scripts and i'm making scripts with ScriptWriter :blushing:
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! :realmad:
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 it
i have searched for that and didnt find nothing :(


#2 User is offline   shooter468 

  • Junior
  • Pip
  • Group: Members
  • Posts: 62
  • Joined: 20-May 05

Posted 26 February 2006 - 01:17 PM

well i dont really know what your talking about...
but extension for shortcuts is .lnk not .ink

#3 User is offline   mrshark 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 09-September 05

Posted 26 February 2006 - 01:28 PM

rm "%USERPROFILE%"\Desktop\LINKNAME.lnk
rm "%ALLUSERSPROFILE%"\Desktop\LINKNAME.lnk

for single user and all users, respectively

#4 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

Posted 26 February 2006 - 01:38 PM

View Postmrshark, on Feb 26 2006, 09:28 PM, said:

rm "%USERPROFILE%"\Desktop\LINKNAME.lnk
rm "%ALLUSERSPROFILE%"\Desktop\LINKNAME.lnk

for single user and all users, respectively


Thanks a lot mrshark!
You are my hero! :thumbup
d**m... i'm searching for that about 5-6 hours...! :wacko:

#5 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

Posted 26 February 2006 - 02:28 PM

that didnt work...
thanks anyway for your reply
i will continue my searching
and if i find how to do it i will post it here
(if anyone cares for that)

#6 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,115
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 26 February 2006 - 04:39 PM

In AutoIT, I believe that something along these lines will do it.
FileDelete(@DesktopCommonDir & "\shortcut.lnk")
and /or
FileDelete(@DesktopDir & "\shortcut.lnk")
In batch type language you would require something like this
DEL "%AllUsersProfile%\Desktop\shortcut.lnk">NUL
and /or
DEL "%UserProfile%\Desktop\shortcut.lnk">NUL


#7 User is offline   mrshark 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 09-September 05

Posted 27 February 2006 - 12:11 AM

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 :-)

#8 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

Posted 27 February 2006 - 01:11 AM

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 apologize
you just made a little mistake
but you reply to me and i thank you for that

#9 User is offline   ajua 

  • Custom Installer Maker
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,260
  • Joined: 16-April 05

Posted 27 February 2006 - 05:33 PM

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)

#10 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

Posted 27 February 2006 - 05:59 PM

View Postelajua, on Feb 28 2006, 01:33 AM, said:

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 script
but 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! :thumbup

#11 User is offline   ajua 

  • Custom Installer Maker
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,260
  • Joined: 16-April 05

Posted 28 February 2006 - 04:54 PM

Quote

its easier for me to add FileDelete("dir\filename") @ the end of the script
but 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.gif
thanks for your suggestion, you just gave me a nice idea! thumbup.gif


if 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.

#12 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

Posted 28 February 2006 - 05:32 PM

well... i had a very nice idea today!
i'm adding ccleaner to install with all the autoit setups that i have made
and 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 menu
but d**n... its trouble to do that :(
but i'm gona make this cause i like to have my start-programs
without folders, but only with the shortcuts of the progs that i use
its looks very nike like this
and i was thinking maybe... if i copy my start menu/progs to cd
and tell auto it to del the files inisde c:/start menu/all users/progs
and then copy the ones from cd there will that work?
hmmm i can try that on vmware to see if it will work
i'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?! :crazy:
d**n i love autoit! since i learned it (before 3 days :blushing: ) 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 make
wish me luck
thanks for the idea for start menu!
i like it! :thumbup

hmmm i just find out that i can add only 4 emoticons in each post : (

This post has been edited by InViSibLe Gr: 28 February 2006 - 05:35 PM


#13 User is offline   ajua 

  • Custom Installer Maker
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,260
  • Joined: 16-April 05

Posted 01 March 2006 - 02:00 AM

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.

#14 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

Posted 01 March 2006 - 07:10 AM

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?

#15 User is online   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,652
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 01 March 2006 - 07:18 AM

shutdown.exe -r -f -t 30 -c "To finish installations WPI will now reboot in 30 sec..."

#16 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

Posted 01 March 2006 - 07:28 AM

thanks kelsenellenelvian! :)
i was really needed that one

EDIT
it wasnt working with the -c in the end
cmd saw me the usage of shutdown.exe and -c wasnt there so i removed it and it worked
what is -c doing?

This post has been edited by InViSibLe Gr: 01 March 2006 - 08:01 AM


#17 User is online   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,652
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 01 March 2006 - 07:31 PM

Hmmmm no clue that is just the code I use in WPI.

#18 User is offline   ajua 

  • Custom Installer Maker
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,260
  • Joined: 16-April 05

Posted 01 March 2006 - 11:13 PM

-c stands for Comment.
-r shuts down and reboot your computer
-f forces the closing of running processes and programs.
-t xx where xx is the time you want to wait before the shutdown sequence is started. must be i seconds. NOTE: i used between 90-120 seconds to be sure everything that i just installed silently and windows are initialized correctly before shutting all down. it all depends on how much do you installed (oh yes, i install a LOT of stuff ;) )

-c "Your Custom Message"
in the syntax it makes the shutdown window display your custom message. your msg cant exceed 127 characters.

hope this covers your question.

#19 User is offline   InViSibLe Gr 

  • huh?
  • PipPip
  • Group: Members
  • Posts: 131
  • Joined: 01-January 06

Posted 02 March 2006 - 06:59 AM

oh! yeah that covers me!
so i guess -c "message" is for wpi, not for batch files
but i dont use it cause i dont know it and cant understant how it works :blushing:
i only use batch and autoit
before that i was using addon cabs (but setup was slow cause it took a lot of time to extract them)
i have 53 progs to install... :) and i could not find the switches for all of them
but i thing its easier with autoit cause i dont need to search for switches and its faster from cabs
and batch files are very simple to make (for me) so i thing i stack with those 2
now i keep the setups in my second HD and only add the batch file to cd to run them and its a lot faster
anywayz...
thanks a lot for your help guys
you were very helfull :thumbup :hello:

This post has been edited by InViSibLe Gr: 02 March 2006 - 07:02 AM


#20 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 02 March 2006 - 08:09 AM

View PostInViSibLe Gr, on Mar 2 2006, 10:59 PM, said:

oh! yeah that covers me!
so i guess -c "message" is for wpi, not for batch files
but i dont use it cause i dont know it and cant understant how it works :blushing:
i only use batch and autoit

The switches for Shutdown.exe have nothing to do with WPI as shown above. Type Shutdown /? at a cmd prompt to see for yourself.

You may also want to checkout my CMenu program. It has some nice abilities built in for making AutoIt install scripts quickly. Also can identify installers for known switches...

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy