sahra Posted February 2, 2010 Posted February 2, 2010 i have a problem in script that i found in this forumthe script:#cs ----------------------------------------------------------------------------AutoIt Version: 3.3.0.0Author: myNameAshampoo Burning Studio 9.20Application site: http://www2.ashampoo.com/webcache/html/1/product_2_2210___USD.htmScript Function: Template AutoIt script.#ce ----------------------------------------------------------------------------; Script Start - Add your code below hereOpt("TrayIconDebug", 1); Installer file name$Installer = "ashampoo_burning_studio_9_9.20_sm.exe"; Serial number$SN = "xxxxxx-xxxxxx-xxxxxx"$PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Ashampoo Burning Studio 9_is1", "InstallLocation")If StringRight($PreviousInstallation, 1) = '\' Then $PreviousInstallation = StringTrimRight($PreviousInstallation, 1)EndIfIf FileExists($PreviousInstallation & "\burningstudio9.exe") Then MsgBox(0x40010, @ScriptName, "Please uninstall previous version of Ashampoo Burning Studio before using this script", 4) ExitEndIf; Save and disable the default internet browser (to prevent Ashampoo Burning Studio installer to open it at the end of installation)$DefaultHttpBrowser = RegRead("HKCR\http\shell\open\command\", "")$DefaultHttpsBrowser = RegRead("HKCR\https\shell\open\command\", "")RegDelete("HKCR\http\shell\open\command\", "")RegDelete("HKCR\https\shell\open\command\", ""); Start checkingAdlibEnable('_Adlib'); Run the installerRunWait($Installer & " /sp- /verysilent /norestart")Sleep(2000); SettingsRegWrite("HKLM\Software\Ashampoo\Ashampoo Burning Studio 9", "RegKey", "REG_SZ", $SN)RegWrite("HKLM\Software\Ashampoo\Ashampoo Burning Studio 9", "InfoChannelsEnabled", "REG_DWORD", "0")RegWrite("HKLM\Software\Ashampoo\Ashampoo Burning Studio 9\ash_inet", "Enabled", "REG_DWORD", "0"); Restore the default internet browserRegWrite("HKCR\http\shell\open\command\", "", "REG_SZ", $DefaultHttpBrowser)RegWrite("HKCR\https\shell\open\command\", "", "REG_SZ", $DefaultHttpsBrowser); Delete page folder and Desktop iconDirRemove(@AppDataCommonDir & "\page", 1)FileDelete(@DesktopCommonDir & "\Go to WWW.THE-PAGE.COM.lnk"); Stop checkingAdlibDisable()Func _Adlib() ; Close MSN toolbar installation process $PID = ProcessExists("toolbarsetup_SL1.0_ash_de-DE.exe") If $PID Then ProcessClose($PID) EndIf ; Close Ashampoo Burning Studio process $PID = ProcessExists("burningstudio9.exe") If $PID Then ProcessClose($PID) EndIf ; Close Internet Explorer process if was started $PID = ProcessExists("IEXPLORE.EXE") If $PID Then ProcessClose($PID) EndIfEndFuncFunc OnAutoItStart() ; One script instance only If WinExists(@ScriptName & '_Interpreter') Then Exit AutoItWinSetTitle(@ScriptName & '_Interpreter')EndFuncnow when i run the script a msg show up that AdlibEnable('_Adlib') ^ERRORwhat is wrong in this script?
radix Posted February 13, 2010 Posted February 13, 2010 (edited) Try this script with the latest stable AutoIt release:#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: myName Ashampoo Burning Studio 9.21 Application site: http://www2.ashampoo.com/webcache/html/1/product_2_2210___USD.htm Script Function: Template AutoIt script.#ce ----------------------------------------------------------------------------; Script Start - Add your code below here#include <Misc.au3>If _Singleton("Ashampoo Burning Studio 9.21",1) = 0 Then ExitEndIfOpt("TrayIconDebug", 1); Installer file name$Installer = "ashampoo_burning_studio_9_9.21_sm.exe"; Disable InfoChannel$DisableInfoChannel = 1; Serial number$SN = ""$PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Ashampoo Burning Studio 9_is1", "InstallLocation")If StringRight($PreviousInstallation, 1) = '\' Then $PreviousInstallation = StringTrimRight($PreviousInstallation, 1)EndIfIf FileExists($PreviousInstallation & "\burningstudio9.exe") Then MsgBox(0x40010, @ScriptName, "Please uninstall previous version of Ashampoo Burning Studio before using this script", 4) ExitEndIf; Save and disable the default internet browser (to prevent Ashampoo Burning Studio installer to open it at the end of installation)$DefaultHttpBrowser = RegRead("HKCR\http\shell\open\command\", "")$DefaultHttpsBrowser = RegRead("HKCR\https\shell\open\command\", "")RegDelete("HKCR\http\shell\open\command\", "")RegDelete("HKCR\https\shell\open\command\", ""); Start checkingAdlibRegister("_Adlib"); Run the installerRunWait($Installer & " /sp- /verysilent /norestart")Sleep(2000); Disable InfoChannelIf $DisableInfoChannel = 1 Then RegWrite("HKCU\Software\Ashampoo\Ashampoo Burning Studio 9\ash_inet", "InfoChannel_-updates-_Enabled", "REG_DWORD", 0) RegWrite("HKCU\Software\Ashampoo\Ashampoo Burning Studio 9\ash_inet", "InfoChannel_ashnews_Enabled", "REG_DWORD", 0) RegWrite("HKCU\Software\Ashampoo\Ashampoo Burning Studio 9\General", "FirstStart", "REG_DWORD", 0)EndIf; RegistrationRegWrite("HKLM\Software\Ashampoo\Ashampoo Burning Studio 9", "RegKey", "REG_SZ", $SN); Restore the default internet browserRegWrite("HKCR\http\shell\open\command\", "", "REG_SZ", $DefaultHttpBrowser)RegWrite("HKCR\https\shell\open\command\", "", "REG_SZ", $DefaultHttpsBrowser); Stop checkingAdlibUnRegister("_Adlib")Func _Adlib() ; Close MyAshampoo Toolbar for Mozilla Firefox installation process $PID = ProcessExists("MyAshampoo.exe") If $PID Then ProcessClose($PID) EndIf ; Close Ashampoo Burning Studio process $PID = ProcessExists("burningstudio9.exe") If $PID Then ProcessClose($PID) EndIf ; Close Internet Explorer process if was started $PID = ProcessExists("IEXPLORE.EXE") If $PID Then ProcessClose($PID) EndIf ; Close Mozilla Firefox process if was started $PID = ProcessExists("firefox.exe") If $PID Then ProcessClose($PID) EndIf ; Close Opera process if was started $PID = ProcessExists("opera.exe") If $PID Then ProcessClose($PID) EndIfEndFuncEdit Edited March 9, 2010 by radix
sahra Posted February 14, 2010 Author Posted February 14, 2010 OK thanks you very match but i don't understand for what is that code:#includeIf _Singleton("Nullsoft Winamp 5.5.7.2830",1) = 0 ThenExitEndIfwhat its does?or i just need to replace this :; Start checkingAdlibEnable('_Adlib')in this:; Start checkingAdlibRegister("_Adlib")and it should work?
radix Posted February 15, 2010 Posted February 15, 2010 _Singleton is a function which prevent to run multiple instance of the same script or compiled script (this mean that you can double click as many times you want on the file, only one instance will run).AdlibEnable and AdlibDisable is deprecated. Download the last stable version and read the changelog.
sahra Posted February 17, 2010 Author Posted February 17, 2010 _Singleton is a function which prevent to run multiple instance of the same script or compiled script (this mean that you can double click as many times you want on the file, only one instance will run).AdlibEnable and AdlibDisable is deprecated. Download the last stable version and read the changelog.OK thanks you very match you really help mesomething last:#includeIf _Singleton("Nullsoft Winamp 5.5.7.2830",1) = 0 ThenExitEndIfi need to change "Nullsoft Winamp 5.5.7.2830" to my software Or it does not matter?
sahra Posted February 17, 2010 Author Posted February 17, 2010 (edited) Doesn't matter. gfhdfghdfh is good also. thanks you but the "#include" is important? because its say Error :#includeError:Cannot parse #includeand if i remove the "#include"its say Error:If _Singleton("Nullsoft Winamp 5.5.7.2830",1) = 0 ThenIf ^ ERRORError: Unknown function name.what is the problem? Edited February 17, 2010 by sahra
DaRk MaDnEsS Posted February 17, 2010 Posted February 17, 2010 Doesn't matter. gfhdfghdfh is good also. thanks you but the "#include" is important? because its say Error :#includeError:Cannot parse #includeand if i remove the "#include"its say Error:If _Singleton("Nullsoft Winamp 5.5.7.2830",1) = 0 ThenIf ^ ERRORError: Unknown function name.what is the problem?make it #Include <Misc.au3>that should fix the problem
sahra Posted February 17, 2010 Author Posted February 17, 2010 Doesn't matter. gfhdfghdfh is good also. thanks you but the "#include" is important? because its say Error :#includeError:Cannot parse #includeand if i remove the "#include"its say Error:If _Singleton("Nullsoft Winamp 5.5.7.2830",1) = 0 ThenIf ^ ERRORError: Unknown function name.what is the problem?make it #Include <Misc.au3>that should fix the problemthanks you very match its fix the problemthanks you to radix !!
Raoul90 Posted March 4, 2010 Posted March 4, 2010 I am using AutoIT v3.3.4.0, and both scripts give errors?
DaRk MaDnEsS Posted March 5, 2010 Posted March 5, 2010 (edited) I am using AutoIT v3.3.4.0, and both scripts give errors?#cs ----------------------------------------------------------------------------AutoIt Version: 3.3.4.0Author: myNameAshampoo Burning Studio 9.20Application site: http://www2.ashampoo.com/webcache/html/1/product_2_2210___USD.htmScript Function: Template AutoIt script.#ce ----------------------------------------------------------------------------; Script Start - Add your code below here#Include <Misc.au3>If _Singleton("Nullsoft Winamp 5.5.7.2830",1) = 0 Then ExitEndIfOpt("TrayIconDebug", 1); Installer file name$Installer = "ashampoo_burning_studio_9_9.20_sm.exe"; Serial number$SN = "xxxxxx-xxxxxx-xxxxxx"$PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Ashampoo Burning Studio 9_is1", "InstallLocation")If StringRight($PreviousInstallation, 1) = '\' Then $PreviousInstallation = StringTrimRight($PreviousInstallation, 1)EndIfIf FileExists($PreviousInstallation & "\burningstudio9.exe") Then MsgBox(0x40010, @ScriptName, "Please uninstall previous version of Ashampoo Burning Studio before using this script", 4) ExitEndIf; Save and disable the default internet browser (to prevent Ashampoo Burning Studio installer to open it at the end of installation)$DefaultHttpBrowser = RegRead("HKCR\http\shell\open\command\", "")$DefaultHttpsBrowser = RegRead("HKCR\https\shell\open\command\", "")RegDelete("HKCR\http\shell\open\command\", "")RegDelete("HKCR\https\shell\open\command\", ""); Start checkingAdlibRegister("_Adlib"); Run the installerRunWait($Installer & " /sp- /verysilent /norestart")Sleep(2000); SettingsRegWrite("HKLM\Software\Ashampoo\Ashampoo Burning Studio 9", "RegKey", "REG_SZ", $SN)RegWrite("HKLM\Software\Ashampoo\Ashampoo Burning Studio 9", "InfoChannelsEnabled", "REG_DWORD", "0")RegWrite("HKLM\Software\Ashampoo\Ashampoo Burning Studio 9\ash_inet", "Enabled", "REG_DWORD", "0"); Restore the default internet browserRegWrite("HKCR\http\shell\open\command\", "", "REG_SZ", $DefaultHttpBrowser)RegWrite("HKCR\https\shell\open\command\", "", "REG_SZ", $DefaultHttpsBrowser); Delete page folder and Desktop iconDirRemove(@AppDataCommonDir & "\page", 1)FileDelete(@DesktopCommonDir & "\Go to WWW.THE-PAGE.COM.lnk"); Stop checkingAdlibUnRegister("_Adlib")Func _Adlib() ; Close MSN toolbar installation process $PID = ProcessExists("toolbarsetup_SL1.0_ash_de-DE.exe") If $PID Then ProcessClose($PID) EndIf ; Close Ashampoo Burning Studio process $PID = ProcessExists("burningstudio9.exe") If $PID Then ProcessClose($PID) EndIf ; Close Internet Explorer process if was started $PID = ProcessExists("IEXPLORE.EXE") If $PID Then ProcessClose($PID) EndIfEndFuncthis should work fine and if there is any error submit it in here and i will have a lookABS.au3ABS.au3 Edited March 9, 2010 by DaRk MaDnEsS
Raoul90 Posted March 8, 2010 Posted March 8, 2010 (edited) Hi,Thanks.But now I get this when compiling: Edited March 8, 2010 by Raoul90
DaRk MaDnEsS Posted March 9, 2010 Posted March 9, 2010 (edited) Hi,Thanks.But now I get this when compiling:well there was a small thing while i copied the codemake this line$PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Ashampoo Burning Studio 9_is1", "InstallLocation")like this $PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Ashampoo Burning Studio 9_is1", "InstallLocation")after the Uninstall\Ashampoo Edited March 9, 2010 by DaRk MaDnEsS
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