Instructs Setup to load the settings from the specified file after having checked the command line. RegWrite("HKLM\Software\Ashampoo\Ashampoo Magical Snap 2", "RegistrationKey", "REG_SZ", $SN) RegWrite("HKLM\Software\Ashampoo\Ashampoo Magical Snap 2", "defaultLangID", "REG_SZ", $LangID) RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2\ash_inet", "InfoChannel_-updates-_Enabled", "REG_DWORD", "0") RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2\ash_inet", "InfoChannel_ashnews_Enabled", "REG_DWORD", "0") RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2", "IntroWindowWelcomeShow", "REG_DWORD", "0") RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2", "GeneralShowSplashScreen", "REG_DWORD", "1") RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2", "GeneralStartWithWindows", "REG_DWORD", "0") RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2", "SkinName", "REG_SZ", $SkinName) RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2", "LanguageFile", "REG_SZ", $LangID) RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2", "LanguageDetected", "REG_DWORD", "1") RegWrite("HKCU\Software\Ashampoo\Ashampoo Magical Snap 2", "RegistrationKey", "REG_SZ", $SN) MsgBox(0x40010, "Please uninstall previous version of Ashampoo Magical Snap before using this script", 4)
Choose skin (look in X:\Program Files\Ashampoo\Ashampoo Magical Snap 2\Skins e.g. Choose language (look in X:\Program Files\Ashampoo\Ashampoo Magical Snap 2\lang e.g. $INSTALLLOCATION = & "\Ashampoo\Ashampoo Magical Snap 2" $EXECUTABLE = "ashampoo_magicalsnap230_sm.exe" RegWrite("HKCR\HTTP\shell\open\command\", "", "REG_SZ", $REG) RegWrite("HKLM\Software\Ashampoo\Ashampoo Burning Studio 7", "RegKey", "REG_SZ", $SN) RegWrite("HKCU\Software\Ashampoo\Ashampoo Burning Studio 7\ash_inet", "FirstStart", "REG_DWORD", "0")
RegWrite("HKCU\Software\Ashampoo\Ashampoo Burning Studio 7\ash_inet", "InfoChannel_-updates-_Enabled", "REG_DWORD", "0") RegWrite("HKCU\Software\Ashampoo\Ashampoo Burning Studio 7\ash_inet", "InfoChannel_ashnews_Enabled", "REG_DWORD", "0") RegWrite("HKCU\Software\Ashampoo\Ashampoo Burning Studio 7", "RegKey", "REG_SZ", $SN) $PID = ProcessExists("burningstudio.exe")
RunWait($EXECUTABLE & " /sp- /verysilent /norestart") RegDelete("HKCR\HTTP\shell\open\command\", "") $REG = RegRead("HKCR\HTTP\shell\open\command\", "") Disable the default internet browser (to prevent Ashampoo Burning Studio installer to open it at the end of installation) MsgBox(0x40010, "Please uninstall previous version of Ashampoo Burning Studio before using this script", 4) $INSTALLLOCATION = & "\Ashampoo\Ashampoo Burning Studio 7" $EXECUTABLE = "ashampoo_burningstudio721_sm.exe" If using by Name, the name must be exact and is case sensitive.#cs. WinHwnd := FindWindowB圜lassName(strProg) ClassName can be found with Spy++ included with Visual C++. If the application has Mutex, uncomment the line below, comment the InitializeSetup function out, and use the AppMutex.
Here's a link to the a KB article that mentions several methods: Īlternatively, you might try this (UNTESTED) code in the InitializeSetup: You might be able to find the Mutex (if it's got one) by using SysInternals Process Explorer and selecting the program / process and looking at the Handles (CTRL-H) in the Lower Pane. If the application has a Mutex, you can add an AppMutex value in your Inno Setup installer and it will display a message telling the user to stop the program.