MSFN Forum: Winamp @ Autoit - 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
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Winamp @ Autoit Rate Topic: -----

#1 User is offline   smeko 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 21-August 07

Posted 02 May 2009 - 08:07 PM

Hello. I will make a Nlite addon with Autoit with Winamp. When I run the script normally everything works all right.
I have configured that there should not be any desktop icons and startmeny group. When in making a cab/7z file im using the switch /S. After t-13 theres is a desktop icon and a programgroup and winamp Toolbar and all the other stuffs that i have removed

I hope someone can help me :huh:

Attached File(s)


This post has been edited by smeko: 02 May 2009 - 08:08 PM



#2 User is offline   MHz 

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

  Posted 04 May 2009 - 02:17 AM

Hi,

Perhaps it is how you are missing some window waits before using Send() that maybe causing the issue. I have cleaned up your code some and made some minor changes. Hopefully it may solve your problem. You could use FileDelete to remove any shortcuts and DirRemove to remove the group folder from the startmenu. I would also delete the toolbar installer if possible (something for you to consider).
 
#RequireAdmin

Opt ('SendKeyDelay', 1500); pauses between sent keystrokes
Opt ('TrayIconDebug', True)

$pid = Run ("winamp.exe")
If @error Then Exit 1

;Language
_WinWaitActive ("Installer Language" , "")
Send ("{ENTER}")

;Välkommen till installationsprogrammet för Winamp
_WinWaitActive ("Installationsprogram för Winamp" , "")
ControlClick  ("Installationsprogram för Winamp" , "" , "Button2")

;Licens
_WinWaitActive ("Installationsprogram för Winamp" , "")
ControlClick  ("Installationsprogram för Winamp" , "" , "Button2")

;Installationsprogram för Winamp
_WinWaitActive ("Installationsprogram för Winamp" , "")
ControlClick  ("Installationsprogram för Winamp" , "" , "Button2")

;Välj komponenter
_WinWaitActive ( "Installationsprogram för Winamp" , "" )
Send ("{TAB}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}")
ControlClick  ( "Installationsprogram för Winamp" , "" , "Button2")

;Välj startalternativ
_WinWaitActive ( "Installationsprogram för Winamp" , "" ); added (correct title?)
Send ("{TAB 3}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}")
ControlClick  ( "Installationsprogram för Winamp" , "" , "Button2")

;Utnyttja hela potentialen hos Winamp
_WinWaitActive ( "Installationsprogram för Winamp" , "" ); added (correct title?)
Send ("{TAB 2}{DOWN}{SPACE}{DOWN}{SPACE}{DOWN}{SPACE}")
ControlClick  ( "Installationsprogram för Winamp" , "" , "Button2")

;Installationen är klar
Sleep(4000)
_WinWaitActive ("Installationsprogram för Winamp" , "")
Send ("{ENTER}")

;Välj Skal
_WinWaitActive ("Installera Winamp" , "")
ControlClick  ("Installera Winamp" , "" , "Button5")

;Inställningar
_WinWaitActive ( "Installera Winamp" , "" )
Send ("{DOWN 2}{RIGHT}{DOWN}{SPACE}{DOWN}{SPACE}")
ControlClick  ( "Installera Winamp" , "" , "Button5")

;Sista inställnigar
_WinWaitActive ( "Installera Winamp" , "" )
Send ("{TAB 3}{SPACE}")
ControlClick  ( "Installera Winamp" , "" , "Button6")

ProcessWaitClose($pid, 300)

;Waits for winamp to start, then silently kills it
If ProcessWait('winamp.exe', 120) Then
	For $i = 1 To 2
		ProcessClose('winamp.exe')
		If Not ProcessExists('winamp.exe') Then
			ExitLoop
		EndIf
		Sleep(1000)
	Next
EndIf

Exit

Func OnAutoItStart()
	; single script instance only
	If WinExists(@ScriptName & '_Interpreter') Then Exit
	AutoItWinSetTitle(@ScriptName & '_Interpreter')
EndFunc

Func _WinWaitActive($title, $text = '')
	; window wait functions
	WinWait($title, $text)
	WinActivate($title, $text)
	WinWaitActive($title, $text)
EndFunc
 


#3 User is offline   radix 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 715
  • Joined: 08-February 07

Posted 04 May 2009 - 03:21 PM

And another one :)
 
; Intaller file name
$Installer = "winamp5552_pro_all.exe"
; Create Start Menu folder
$StartMenuFolder = 0
; Keep the Desktop icon
$DesktopIcon = 0
; Keep the Quick Launch icon
$QuickLaunchIcon = 0

; Installation folder
$InstallDir = @ProgramFilesDir & "\Winamp"
$PreviousInstallation = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winamp", "UninstallString")
If StringRight($PreviousInstallation, 1) = '"' Then
	$PreviousInstallation = StringTrimRight($PreviousInstallation, 1)
EndIf
If StringLeft($PreviousInstallation, 1) = '"' Then
	$PreviousInstallation = StringTrimLeft($PreviousInstallation, 1)
EndIf
If FileExists($PreviousInstallation) Then
	MsgBox(0x40010, @ScriptName, "Please uninstall previous version of Winamp before using this script", 4)
	Exit
EndIf
	
; Start checking for Winamp Remote, Mozilla Firefox toolbar and Internet Explorer (7 or 8) toolbar installation processes
AdlibEnable('_Adlib')

; Run the installer
RunWait($Installer & " /S /D=" & $InstallDir)

; Uninstall 50 FREE MP3s +1 Free Audiobook! (bundle3.exe installer work too fast to be stopped)
RunWait($InstallDir & "\eMusic\Uninst-eMusic-promotion.exe" & " /S")

; Create Start Menu folder
If $StartMenuFolder = 1 Then
	DirCreate(@ProgramsCommonDir & "\Winamp")
	FileCreateShortcut($InstallDir & "\UninstWA.exe", @ProgramsCommonDir & "\Winamp\Uninstall Winamp.lnk", $InstallDir & "\Lang")
	FileCreateShortcut($InstallDir & "\whatsnew.txt", @ProgramsCommonDir & "\Winamp\What's New.lnk", $InstallDir & "\Lang")
	FileCreateShortcut($InstallDir & "\winamp.exe", @ProgramsCommonDir & "\Winamp\Winamp.lnk", $InstallDir & "\Lang")
EndIf

; Delete the Desktop icon
If $DesktopIcon = 0 Then
	FileDelete(@DesktopCommonDir & "\Winamp.lnk")
EndIf

; Delete the Quick Launch icon
If $QuickLaunchIcon = 0 Then
	FileDelete(@AppDataDir & "\Microsoft\Internet Explorer\Quick Launch\Winamp.lnk")
EndIf

Sleep(3000)
	
; Close Au_.exe process
$PID = ProcessExists("Au_.exe")
If $PID Then
	ProcessClose($PID)
EndIf

; Stop checking for Winamp Remote, Mozilla Firefox toolbar and Internet Explorer (7 or 8) toolbar installation processes
AdlibDisable()

; Clean the Temp folder
#include 
;#include 
$avDirList1 = _FileListToArray(@TempDir, "n*.tmp", 2)
;_ArrayDisplay($avDirList2)
If IsArray($avDirList1) Then
	For $n = 1 To $avDirList1[0]
		$sPath = @TempDir & "\" & $avDirList1[$n]
		If FileExists($sPath & "\") Then
			DirRemove($sPath, 1)
		EndIf
	Next
EndIf
$avDirList1 = _FileListToArray(@TempDir, "~nsu.tmp", 2)
;_ArrayDisplay($avDirList2)
If IsArray($avDirList1) Then
	For $n = 1 To $avDirList1[0]
		$sPath = @TempDir & "\" & $avDirList1[$n]
		If FileExists($sPath & "\") Then
			DirRemove($sPath, 1)
		EndIf
	Next
EndIf

Func _Adlib()
	; Kill Winamp Remote installation process
    ProcessClose("bundle1.exe")
	; Kill Mozilla Firefox toolbar installation process
    ProcessClose("bundle2.exe")
	; Kill Internet Explorer 7 or 8 toolbar installation process
    ProcessClose("winamp_toolbar_ie.exe")
EndFunc 

Silent installation, all icons, Winamp Remote and toolbars will be removed.

This post has been edited by radix: 04 May 2009 - 03:22 PM


#4 User is offline   smeko 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 21-August 07

Posted 05 May 2009 - 05:57 AM

Thanks guys i will try it and tell you later ;)

#5 User is offline   smeko 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 21-August 07

Posted 05 May 2009 - 06:52 AM

Hello Radix and MHZ again

Im trying to use this at T-13 silently, first im trying in windows and its doesnt work. The codes u gives give apears do same thing Winamp Remote. FreeMusic,Desktopicon and groupmenu icon. Here is MHZ Code:

Winamp.exe /S in Autoit code

Posted Image


Here is Radix Code: Using Winamp.exe /S

Posted Image


And here is my original file:

This is when i run without /S
This is how i want it its Perfect but when im using /S it ruins everything

Posted Image

#6 User is offline   radix 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 715
  • Joined: 08-February 07

Posted 05 May 2009 - 02:36 PM

Try again with this:
 
; Intaller file name
$Installer = "winamp5552_pro_all.exe"
; Create Start Menu folder
$StartMenuFolder = 0
; Keep the Desktop icon
$DesktopIcon = 0
; Keep the Quick Launch icon
$QuickLaunchIcon = 0

; Installation folder
$InstallDir = @ProgramFilesDir & "\Winamp"
$PreviousInstallation = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winamp", "UninstallString")
If StringRight($PreviousInstallation, 1) = '"' Then
$PreviousInstallation = StringTrimRight($PreviousInstallation, 1)
EndIf
If StringLeft($PreviousInstallation, 1) = '"' Then
$PreviousInstallation = StringTrimLeft($PreviousInstallation, 1)
EndIf
If FileExists($PreviousInstallation) Then
MsgBox(0x40010, @ScriptName, "Please uninstall previous version of Winamp before using this script", 4)
Exit
EndIf

; Start checking for Winamp Remote, Mozilla Firefox toolbar and Internet Explorer (7 or 8) toolbar installation processes
AdlibEnable('_Adlib')

; Run the installer
RunWait($Installer & " /S /D=" & $InstallDir)

; Uninstall 50 FREE MP3s +1 Free Audiobook! (bundle3.exe installer work too fast to be stopped)
RunWait($InstallDir & "\eMusic\Uninst-eMusic-promotion.exe" & " /S")

; Create Start Menu folder
If $StartMenuFolder = 1 Then
DirCreate(@ProgramsCommonDir & "\Winamp")
FileCreateShortcut($InstallDir & "\UninstWA.exe", @ProgramsCommonDir & "\Winamp\Uninstall Winamp.lnk", $InstallDir & "\Lang")
FileCreateShortcut($InstallDir & "\whatsnew.txt", @ProgramsCommonDir & "\Winamp\What's New.lnk", $InstallDir & "\Lang")
FileCreateShortcut($InstallDir & "\winamp.exe", @ProgramsCommonDir & "\Winamp\Winamp.lnk", $InstallDir & "\Lang")
EndIf

; Delete the Desktop icon
If $DesktopIcon = 0 Then
FileDelete(@DesktopCommonDir & "\Winamp.lnk")
EndIf

; Delete the Quick Launch icon
If $QuickLaunchIcon = 0 Then
FileDelete(@AppDataDir & "\Microsoft\Internet Explorer\Quick Launch\Winamp.lnk")
EndIf

; Stop checking for Winamp Remote, Mozilla Firefox toolbar and Internet Explorer (7 or 8) toolbar installation processes
AdlibDisable()

Func _Adlib()
; Kill Winamp Remote installation process
ProcessClose("bundle1.exe")
; Kill Mozilla Firefox toolbar installation process
ProcessClose("bundle2.exe")
; Kill Internet Explorer 7 or 8 toolbar installation process
ProcessClose("winamp_toolbar_ie.exe")
EndFunc 

This post has been edited by radix: 05 May 2009 - 02:37 PM


#7 User is offline   MHz 

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

  Posted 05 May 2009 - 09:48 PM

[quote name='radix' post='854957' date='May 6 2009, 06:36 AM']Try again with this:
 
#RequireAdmin

; Installer file name
$Installer = "winamp5552_pro_all.exe"
; Create Start Menu folder
$StartMenuFolder = 0
; Keep the Desktop icon
$DesktopIcon = 0
; Keep the Quick Launch icon
$QuickLaunchIcon = 0

; Installation folder
$InstallDir = @ProgramFilesDir & "\Winamp"
$PreviousInstallation = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winamp", "UninstallString")
_QuoteRemove($PreviousInstallation)
If FileExists($PreviousInstallation) Then
	MsgBox(0x40010, @ScriptName, "Please uninstall previous version of Winamp before using this script", 4)
	Exit
EndIf

; create file to block eMusic install folder creation
FileWrite($InstallDir & '\eMusic', 'dummy file')

; Start checking for Winamp Remote, Mozilla Firefox toolbar and Internet Explorer (7 or 8) toolbar installation processes
AdlibEnable('_Adlib')

; Run the installer
RunWait($Installer & " /S /D=" & $InstallDir)

; Uninstall 50 FREE MP3s +1 Free Audiobook! (bundle3.exe installer work too fast to be stopped)
If FileExists($InstallDir & "\eMusic\Uninst-eMusic-promotion.exe") Then
	RunWait($InstallDir & "\eMusic\Uninst-eMusic-promotion.exe" & " /S")
EndIf

; Create Start Menu folder
If $StartMenuFolder = 1 Then
	DirCreate(@ProgramsCommonDir & "\Winamp")
	FileCreateShortcut($InstallDir & "\UninstWA.exe", @ProgramsCommonDir & "\Winamp\Uninstall Winamp.lnk", $InstallDir & "\Lang")
	FileCreateShortcut($InstallDir & "\whatsnew.txt", @ProgramsCommonDir & "\Winamp\What's New.lnk", $InstallDir & "\Lang")
	FileCreateShortcut($InstallDir & "\winamp.exe", @ProgramsCommonDir & "\Winamp\Winamp.lnk", $InstallDir & "\Lang")
EndIf

; Delete all associated Desktop icons
If $DesktopIcon = 0 Then
	FileDelete(@DesktopDir & "\Winamp.lnk")
	FileDelete(@DesktopDir & "\Winamp Remote.lnk")
	FileDelete(@DesktopDir & "\50 Free MP3s*.lnk")
	FileDelete(@DesktopCommonDir & "\Winamp.lnk")
	FileDelete(@DesktopCommonDir & "\Winamp Remote.lnk")
	FileDelete(@DesktopCommonDir & "\50 Free MP3s*.lnk")
EndIf

; Delete the Quick Launch icon
If $QuickLaunchIcon = 0 Then
	FileDelete(@AppDataDir & "\Microsoft\Internet Explorer\Quick Launch\Winamp.lnk")
EndIf

; Clean eMusic from system after block attempt
$eMusic_Uninstall = RegRead('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\eMusic Promotion', 'UninstallString')
If Not @error Then
	; Strip double quotes
	_QuoteRemove($eMusic_Uninstall)
	; Remove uninstall key if the uninstall file does not exist
	If $eMusic_Uninstall <> '' And Not FileExists($eMusic_Uninstall) Then
		RegDelete('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\eMusic Promotion')
	EndIf
	; If eMusic exists and is not a folder then delete it
	If FileExists($InstallDir & '\eMusic') And Not StringInStr(FileGetAttrib($InstallDir & '\eMusic'), 'D') Then
		FileDelete($InstallDir & '\eMusic')
	EndIf
	; Remove 50 Free MP3s shortcuts
	FileDelete(@ProgramsDir & '\50 Free MP3s +1 Free Audiobook!.lnk')
	FileDelete(@ProgramsCommonDir & '\50 Free MP3s +1 Free Audiobook!.lnk')
EndIf

; Stop checking for Winamp Remote, Mozilla Firefox toolbar and Internet Explorer (7 or 8) toolbar installation processes
Sleep(2000)
AdlibDisable()

Exit

Func _Adlib()
	; Kill Winamp Remote installation process
	ProcessClose("bundle1.exe")
	; Kill Mozilla Firefox toolbar installation process
	ProcessClose("bundle2.exe")
	; Kill Internet Explorer 7 or 8 toolbar installation process
	ProcessClose("winamp_toolbar_ie.exe")
	; Kill process running in temp directory
	ProcessClose('EMusicClient.exe')
EndFunc

Func _QuoteRemove(ByRef $string)
	; Remove double quotes from a string stored in a variable
	If StringLeft($string, 1) = '"' And StringRight($string, 1) = '"' Then
		$string = StringTrimLeft(StringTrimRight($string, 1), 1)
	EndIf
EndFunc

Func OnAutoItStart()
	; allow only single script instance
	If WinExists(@ScriptName & '_Interpreter') Then Exit
	AutoItWinSetTitle(@ScriptName & '_Interpreter')
EndFunc
 


Edit: changed quote change code with StringReplace() on the variable "$eMusic_Uninstall" to intended "_QuoteRemove($eMusic_Uninstall)"

This post has been edited by MHz: 05 May 2009 - 10:56 PM


#8 User is offline   radix 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 715
  • Joined: 08-February 07

Posted 06 May 2009 - 07:41 AM

View PostMHz, on May 6 2009, 06:48 AM, said:

@radix
Your script looks better to use so if I may makes some changes to enhance it some. :)
I have tested with the "winamp5552_full_emusic-7plus_en-us.exe" version of WinAmp so subtle code additions may have been added.

Good work. ;)

#9 User is offline   smeko 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 21-August 07

Posted 06 May 2009 - 09:20 AM

[quote name='MHz' post='855020' date='May 5 2009, 10:48 PM'][quote name='radix' post='854957' date='May 6 2009, 06:36 AM']Try again with this:


Edit: changed quote change code with StringReplace() on the variable "$eMusic_Uninstall" to intended "_QuoteRemove($eMusic_Uninstall)"
[/quote]


Thanks guys, I appreciate everything you have done:) One thing to Winamp icon on the desktop, but it is not the whole world, can make a batch script to delete the



#10 User is offline   radix 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 715
  • Joined: 08-February 07

Posted 07 May 2009 - 06:15 AM

View Postsmeko, on May 6 2009, 06:20 PM, said:

DEL "%AllUsersProfile%\Skrivbord\Winamp.ink"

We can write a function which search and delete that icon.

#11 User is offline   MHz 

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

  Posted 07 May 2009 - 11:01 AM

View Postsmeko, on May 7 2009, 01:20 AM, said:

Thanks guys, I appreciate everything you have done:) One thing to Winamp icon on the desktop, but it is not the whole world, can make a batch script to delete the

DEL "%AllUsersProfile%\Skrivbord\Winamp.ink"

The path used in your CMD script seems strange for a desktop shortcut path.

If you will check the additions that I added to the previous script from radix, then you notice that removal of all associated desktop shortcuts are removed by the code block shown below

Quote

; Delete all associated Desktop icons
If $DesktopIcon = 0 Then
FileDelete(@DesktopDir & "\Winamp.lnk")
FileDelete(@DesktopDir & "\Winamp Remote.lnk")
FileDelete(@DesktopDir & "\50 Free MP3s*.lnk")
FileDelete(@DesktopCommonDir & "\Winamp.lnk")
FileDelete(@DesktopCommonDir & "\Winamp Remote.lnk")
FileDelete(@DesktopCommonDir & "\50 Free MP3s*.lnk")
EndIf

So, is there an issue with a WinAmp desktop shortcut still existing after execution of the script?

#12 User is offline   smeko 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 21-August 07

Posted 29 May 2009 - 01:56 AM

View PostMHz, on May 7 2009, 11:01 AM, said:

View Postsmeko, on May 7 2009, 01:20 AM, said:

Thanks guys, I appreciate everything you have done:) One thing to Winamp icon on the desktop, but it is not the whole world, can make a batch script to delete the

DEL "%AllUsersProfile%\Skrivbord\Winamp.ink"

The path used in your CMD script seems strange for a desktop shortcut path.

If you will check the additions that I added to the previous script from radix, then you notice that removal of all associated desktop shortcuts are removed by the code block shown below

Quote

; Delete all associated Desktop icons
If $DesktopIcon = 0 Then
FileDelete(@DesktopDir & "\Winamp.lnk")
FileDelete(@DesktopDir & "\Winamp Remote.lnk")
FileDelete(@DesktopDir & "\50 Free MP3s*.lnk")
FileDelete(@DesktopCommonDir & "\Winamp.lnk")
FileDelete(@DesktopCommonDir & "\Winamp Remote.lnk")
FileDelete(@DesktopCommonDir & "\50 Free MP3s*.lnk")
EndIf

So, is there an issue with a WinAmp desktop shortcut still existing after execution of the script?





It does not erase the icon on the desktop :(

This post has been edited by smeko: 29 May 2009 - 01:57 AM


#13 User is offline   radix 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 715
  • Joined: 08-February 07

Posted 29 May 2009 - 05:56 AM

Write the path of that icon if you want to solve the problem.

Share this topic:


Page 1 of 1
  • 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