Jump to content

2 Quick Questions About My Autoit Script


Recommended Posts

Run("AC3 Filter 1.01a RC5.exe /S")

Sleep(4000)

DirRemove( @ProgramsDir & "\AC3Filter", 1)

Witout the Sleep command it won't delete the Start Menu folder with shortcuts :no:

There should be some other way to do this witout using the sleep command...

Waiting the sleep procedure is annoying and wasting time (I use quite a few silent installers) :(

Any ideas?

Also:

$Title_1 = "Setup - EVEREST Ultimate Edition"

; Destination Location
WinWaitActive   ( $Title_1 , "Select Destination Location" )
ControlSetText  ( $Title_1 , "" , "TEdit1" , @ProgramFilesDir & "\Everest" )
ControlClick     ( $Title_1 , "" , "TButton3" )

; Start Menu Location
WinWaitActive   ( $Title_1 , "Select Start Menu Folder" )
ControlSetText  ( $Title_1 , "" , "TEdit2" , "\Everest" )
;ControlClick   ( $Title_1 , "" , "TButton4" )

It won't change the default locations. What's wrong?

Posted Image

Please help to the AutoIt n00b :think:

Link to comment
Share on other sites

Thanks a lot, gafrost!

1st one - RunWait did the job :(

2nd one - Send did the job :)

Installed silently Everest, regged it, and removed some useless shortcuts from the StartMenu.

; Delete Shortcuts
FileDelete(@ProgramsCommonDir & "\Everest" & "\EVEREST Ultimate Edition Documentation.lnk")
FileDelete(@ProgramsCommonDir & "\Everest" & "\EVEREST Ultimate Edition on the Web.lnk")
FileDelete(@ProgramsCommonDir & "\Everest" & "\Uninstall EVEREST Ultimate Edition.lnk")

AutoIt is just great :think:

How can I rename the remaining (in the StartMenu) shortcut "EVEREST Ultimate Edition" to Everest 2.80.534?

And delete the shortcut from the desktop?

Link to comment
Share on other sites

How can I rename the remaining (in the StartMenu) shortcut "EVEREST Ultimate Edition" to Everest 2.80.534?

And delete the shortcut from the desktop?

Look into the @desktop macro

Filedelete(@desktop & "\foo.lnk")

FileMove("\startmenu\foo.lnk", "\startmenu\bar.lnk", 1)

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

You guys are just awesome!

; Delete Desktop's Shortcut
Filedelete ( @DesktopDir & "\EVEREST Ultimate Edition.lnk" )

And no more desktop shortcut :(

; Rename StartMenu's Shortcut
FileMove   ( "C:\Documents and Settings\All Users\Start Menu\Programs\Everest\EVEREST Ultimate Edition.lnk", "C:\Documents and Settings\All Users\Start Menu\Programs\Everest\Everest 2.80.534.lnk", 1 )

And StartMenu's shortcut renamed successfully :)

However %systemdrive% instead of C: doesn't seem to work...

My first fully customized silent installer (Everest Ultimate Edition 2.80.534) is done :think:

It will install, reg, config, del/rename shortcuts!

Link to comment
Share on other sites

You guys are just awesome!

; Delete Desktop's Shortcut
Filedelete ( @DesktopDir & "\EVEREST Ultimate Edition.lnk" )

And no more desktop shortcut :(

; Rename StartMenu's Shortcut
FileMove   ( "C:\Documents and Settings\All Users\Start Menu\Programs\Everest\EVEREST Ultimate Edition.lnk", "C:\Documents and Settings\All Users\Start Menu\Programs\Everest\Everest 2.80.534.lnk", 1 )

And StartMenu's shortcut renamed successfully :)

However %systemdrive% instead of C: doesn't seem to work...

My first fully customized silent installer (Everest Ultimate Edition 2.80.534) is done :think:

It will install, reg, config, del/rename shortcuts!

Might try the macro @HomeDrive in replacement of %systemdrive%

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Might try the macro @HomeDrive in replacement of %systemdrive%

; Rename StartMenu's Shortcut
FileMove   ( @HomeDrive & "\Documents and Settings\All Users\Start Menu\Programs\Everest\EVEREST Ultimate Edition.lnk", @HomeDrive & "\Documents and Settings\All Users\Start Menu\Programs\Everest\Everest 2.80.534.lnk", 1 )

It works!!!

:think:

Link to comment
Share on other sites

; Rename StartMenu's Shortcut
FileMove   ( @HomeDrive & "\Documents and Settings\All Users\Start Menu\Programs\Everest\EVEREST Ultimate Edition.lnk", @HomeDrive & "\Documents and Settings\All Users\Start Menu\Programs\Everest\Everest 2.80.534.lnk", 1 )

It works!!!

:think:

This should work also

FileMove   ( @ProgramsCommonDir & "\Everest\EVEREST Ultimate Edition.lnk", @ProgramsCommonDir & "\Everest\Everest 2.80.534.lnk", 1 )

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

This should work also

FileMove   ( @ProgramsCommonDir & "\Everest\EVEREST Ultimate Edition.lnk", @ProgramsCommonDir & "\Everest\Everest 2.80.534.lnk", 1 )
Will give it a try, thanks!

Looks more clean and optimized :think:

P.S.: it works!

Edited by rado354
Link to comment
Share on other sites

  • 1 month later...
  • Moderators

Quick question:

or

It deletes all shortcuts in the AC3Filter menu, but not the cascade menu itself :D

How to delete AC3Filter?

Thanks again :wacko:

DirRemove()?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...