Guest Redback Posted June 10, 2005 Share Posted June 10, 2005 I'm new too this , so be patient with me , thanks. I'm trying to delete a shortcut directory from the start program menu but I have tried two commands and both don't seem to remove the folder link ( this is in XP) . Maybe someone can enlighten me ? P.S as ya can see , I have tried both @ProgramsCommonDir & @StartMenuCommonDir to no avail . ; ---------------------------------------------------------------------------- ; Language: English ; Platform: NT /XP Server 2003 ; Author: Redback ; Script Function: ; Ad-aware SE Pro Edition 1.06 ; ---------------------------------------------------------------------------- ; ---------------------------------------------------------------------------- ; End User Var's ; ---------------------------------------------------------------------------- $SF_1 = "Ad-aware.exe" ; Setup File Name $SM_1 = "\Security\System - Scanners\Ad-Aware Se Professional\" ; Location For Start Menu $DL_1 = @ProgramFilesDir & "\Security\System - Scanners\Ad-Aware Se Professional\" ; Location For Installation $DD_1 = "daemonB1"; Bus driver name $DD_2 = "daemonP1"; Miniport driver name $Opt_1 = "N"; (Y)es or (N)o - Perform a full system scan now $Opt_2 = "N"; (Y)es or (N)o - Open the help file now $Opt_3 = "N"; (Y)es or (N)o - Update definition file now ; Delete Ad-aware Shortcuts $SC_1 = "N" ; (Y)es or (N)o - Delete Shortcut For Ad-Aware SE Manual $SC_2 = "N" ; (Y)es or (N)o - Delete Shortcut For Ad-Aware SE Professional $SC_3 = "N" ; (Y)es or (N)o - Delete Shortcut Ad-Watch SE Professional $SC_4 = "N" ; (Y)es or (N)o - Delete Shortcut Uninstall Ad-Aware SE Professional $SC_5 = "N" ; (Y)es or (N)o - Delete Shortcut Ad-Aware SE Professional ; ---------------------------------------------------------------------------- ; Prevent Duplicates From Running ; ---------------------------------------------------------------------------- $g_szVersion = "Ad-Aware SE Professional" If WinExists($g_szVersion) Then Exit ; It"s already running AutoItWinSetTitle($g_szVersion) ; ---------------------------------------------------------------------------- ; Script Defaults ; ---------------------------------------------------------------------------- opt("CaretCoordMode", 1) ;1=absolute, 0=relative opt("ExpandEnvStrings", 0) ;0=don"t expand, 1=do expand opt("MouseClickDelay", 10) ;10 milliseconds opt("MouseClickDownDelay", 10) ;10 milliseconds opt("MouseClickDragDelay", 250) ;250 milliseconds opt("MouseCoordMode", 0) ;1=absolute, 0=relative opt("MustDeclareVars", 0) ;0=no, 1=require pre-declare opt("PixelCoordMode", 1) ;1=absolute, 0=relative opt("RunErrorsFatal", 1) ;1=fatal, 0=silent set @error opt("SendAttachMode", 0) ;0=don"t attach, 1=doattach opt("SendCapslockMode", 1) ;1=store and restore, 0=don"t opt("SendKeyDelay", 1) ;5 milliseconds opt("SendKeyDownDelay", 1) ;1 millisecond opt("TrayIconDebug", 1) ;0=no info, 1=debug line info opt("TrayIconHide", 0) ;0=show, 1=hide tray icon opt("WinDetectHiddenText", 0) ;0=don"t detect, 1=do detect opt("WinSearchChildren", 1) ;0=no, 1=search children also opt("WinTitleMatchMode", 3) ;1=start, 2=subStr, 3=exact, 4=... opt("WinWaitDelay", 250) ;250 milliseconds ; ---------------------------------------------------------------------------- ; Script Start ; ---------------------------------------------------------------------------- Run(@ComSpec & " /c " & "start " & $SF_1, "", @SW_HIDE) $Title_1 = "Ad-Aware SE Professional" ; Welcome WinWaitActive($Title_1, "Welcome") ControlClick($Title_1, "", "Button1") ; License Agreement WinWaitActive($Title_1, "I accept the license agreement") ControlClick($Title_1, "", "Button4") ControlClick($Title_1, "", "Button1") ; Check Installation ControlClick($Title_1, "", "Button5") ControlClick($Title_1, "", "Button1") ; Desination Location WinWaitActive($Title_1, "different folder") ControlClick($Title_1, "", "Button5") ControlSetText("", "", "Edit1", $DL_1) Send("{ENTER}") ControlClick($Title_1, "", "Button1") ; Install options WinWaitActive($Title_1, "Anyone who uses this computer") ControlClick($Title_1, "", "Button4") ControlClick($Title_1, "", "Button1") Send("{ENTER}") WinWaitActive ( $Title_1 , "&Finish " ) If $Opt_1 = "n" Then ControlClick( $Title_1 , "" , "Button7" ) If $Opt_2 = "n" Then ControlClick( $Title_1 , "" , "Button9" ) If $Opt_3 = "n" Then ControlClick( $Title_1 , "" , "Button8" ) Send("{ENTER}") ; Create Directorys if Non-Existant If FileExists ( @ProgramsCommonDir & "\System - Scanners\" & $SM_1 ) = 0 Then DirCreate ( @ProgramsCommonDir & "\" & $SM_1 ) ; Move Files FileMove ( @ProgramsCommonDir & "\Lavasoft Ad-Aware SE Professional\Ad-Aware SE Manual.lnk" , @ProgramsCommonDir & "\" & $SM_1 & "\Ad-Aware SE Manual.lnk" , 1 ) FileMove ( @ProgramsCommonDir & "\Lavasoft Ad-Aware SE Professional\Ad-Aware SE Professional.lnk" , @ProgramsCommonDir & "\" & $SM_1 & "\Ad-Aware SE Professional.lnk" , 1 ) FileMove ( @ProgramsCommonDir & "\Lavasoft Ad-Aware SE Professional\Ad-Watch SE Professional.lnk" , @ProgramsCommonDir & "\" & $SM_1 & "\Ad-Watch SE Professional.lnk" , 1 ) FileMove ( @ProgramsCommonDir & "\Lavasoft Ad-Aware SE Professional\Uninstall Ad-Aware SE Professional.lnk" , @ProgramsCommonDir & "\" & $SM_1 & "\Uninstall Ad-Aware SE Professional.lnk" , 1 ) ; Delete Ad-aware Shortcuts $local = @ProgramsCommonDir & "\" & $SM_1 & "\" If $SC_1 = "y" Then FileDelete ( $local & "Ad-Aware SE Manual.lnk" ) If $SC_2 = "y" Then FileDelete ( $local & "Ad-Aware SE Professional.lnk" ) If $SC_3 = "y" Then FileDelete ( $local & "Ad-Watch SE Professional.lnk" ) If $SC_4 = "y" Then FileDelete ( $local & "Uninstall Ad-Aware SE Professional.lnk" ) If $SC_5 = "y" Then FileDelete ( @ProgramsCommonDir & "\Lavasoft Ad-Aware SE Professional.lnk" ) Exit Link to comment Share on other sites More sharing options...
MHz Posted June 10, 2005 Share Posted June 10, 2005 (edited) You have the @StartMenuDir macro, or the @StartMenuCommonDir macro.You have not tried the 1st, as of yet?Edit: Just did a test install of Adaware 1.06 personal. The startmenu location is @StartMenuDir Edited June 10, 2005 by MHz Link to comment Share on other sites More sharing options...
Guest Redback Posted June 10, 2005 Share Posted June 10, 2005 tried all these ! still to no avail ! If $SC_5 = "y" Then FileDelete ( @StartMenuDir & "\Lavasoft Ad-Aware SE Professional.lnk" ) If $SC_6 = "y" Then FileDelete ( @ProgramsCommonDir & "\Lavasoft Ad-Aware SE Professional.lnk" ) If $SC_7 = "y" Then FileDelete ( @ProgramsDir & "\Lavasoft Ad-Aware SE Professional.lnk" ) If $SC_8 = "y" Then FileDelete ( @StartupCommonDir & "\Lavasoft Ad-Aware SE Professional.lnk" ) Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 10, 2005 Share Posted August 10, 2005 One this should be in the Support Forum (I think)? I am having a similar problem, in the fact I cannot get any shortcuts to delete. I try it without the .lnk and with it, to no avail. If anyone has a solution for deleteing shortcuts that would be wonderful. 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...
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