Jump to content

Windows Blinds & BSPlayer


Tristec

Recommended Posts

First sorry for my bad English ...

I have a problem took several attempts to create scripts to silence two programs:

Windows Blinds 6.02

BSPlayer 2.34

I failed to create the perfect script to install without my intervention, when I was hanging with one hand and runs out of order but the script, I hope to achieve and help ^ ^ thank you very much

Link to comment
Share on other sites


Well WinBlinds is a major pain in the a**...with AutoIt depending on how much you wish to tweak things...as the skinned interface is really not AutoIt friendly.

Course I haven't messed with any of this stuff in years...plus AutoIt isn't exactly silent...mostly just automated.

Exactly what are you getting hung up on?

Link to comment
Share on other sites

@Tristec

AutoIt script for BS Player:

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.0.0
Author: myName

Webteh BSplayer Pro 2.34.980
Application site: [url="http://www.bsplayer.org/"]http://www.bsplayer.org/[/url]

Script Function:
Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

Opt("TrayIconDebug", 1)

; Installer file name
$Installer = "setup.exe"
; Detect the Operating System type (32 bit or 64 bit)
$OS = _OSBit()

If $OS = 32 Then
$PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\BSPlayerp", "UninstallString")
If StringRight($PreviousInstallation, 4) = '"' Then
$PreviousInstallation = StringTrimRight($PreviousInstallation, 4)
EndIf
If StringLeft($PreviousInstallation, 1) = '"' Then
$PreviousInstallation = StringTrimLeft($PreviousInstallation, 1)
EndIf
If FileExists($PreviousInstallation) Then
MsgBox(0x40010, @ScriptName, "Please uninstall previous version of BS Player before using this script", 4)
Exit
EndIf
EndIf

If $OS = 64 Then
$PreviousInstallation = RegRead("HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\BSPlayerp", "UninstallString")
If StringRight($PreviousInstallation, 4) = '"' Then
$PreviousInstallation = StringTrimRight($PreviousInstallation, 4)
EndIf
If StringLeft($PreviousInstallation, 1) = '"' Then
$PreviousInstallation = StringTrimLeft($PreviousInstallation, 1)
EndIf
If FileExists($PreviousInstallation) Then
MsgBox(0x40010, @ScriptName, "Please uninstall previous version of BS Player before using this script", 4)
Exit
EndIf
EndIf

; Start checking for bspcodecdl.exe process
AdlibEnable('_Adlib')

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

; Stop checking for bspcodecdl.exe process
AdlibDisable()

Func _Adlib()
; Close bspcodecdl.exe process
$PID = ProcessExists("bspcodecdl.exe")
If $PID Then
ProcessClose($PID)
EndIf
EndFunc

Func _OSBit()
Local $tOS = DllStructCreate("char[256]")
Local $aGSWD = DllCall("Kernel32.dll", "int", "GetSystemWow64Directory", "ptr", DllStructGetPtr($tOS), "int", 256)
If IsArray($aGSWD) And DllStructGetData($tOS, 1) Then Return 64
Return 32
EndFunc

Edited by radix
Link to comment
Share on other sites

WindowBlinds 6.3 build 67 free:

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.0.0
Author: myName

WindowBlinds 6.3 build 67
Application site: [url="http://www.stardock.com/products/windowblinds/"]http://www.stardock.com/products/windowblinds/[/url]
Does not have support for Windows XP Professional 64 bit

Script Function:
Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

Opt("TrayIconDebug", 1)

; Installer file name
$Installer = "WindowBlinds6_public.exe"

$PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\WindowBlinds", "UninstallString")
If $PreviousInstallation Then
MsgBox(0x40010, @ScriptName, "Please uninstall previous version of WindowBlinds before using this script", 4)
Exit
EndIf

; Start checking for wbconfig.exe process
AdlibEnable('_Adlib')

; Run the installer
RunWait($Installer & " /s")

; Wait to finish installation
ProcessWaitClose($Installer)

; Block WindowBlinds to run after the next reboot
RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce", "WindowBlinds")

; Stop checking for wbconfig.exe process
AdlibDisable()

Func _Adlib()
; Close wbconfig.exe process
$PID = ProcessExists("wbconfig.exe")
If $PID Then
ProcessClose($PID)
EndIf
EndFunc

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
  • Recently Browsing   0 members

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