Page 1 of 1

[RESOLVED] Skype Standard version - sharing and improvements

Published: July 3, 2018 - 1:38 PM
by Root
Good morning,
We use user accounts that do not have admin rights on the PCs.
And with each Skype update available, users had a login window to authorize the software to perform the update.
The solution for me was to delete the executable file that downloads the update:

I'm sharing my solution, which is rather crude but it works. If you have any ideas for improving it, I'm all ears.

Code: Select all

# -*- coding: utf-8 -*-
#  [Rechercher dans le domaine get.skype.com] https://get.skype.com/go/getskype-full
# Fonctionne aussi avec le downloader
from setuphelpers import *
import os
import shutil
import time
# import all modules
uninstallkey = ["Skype_is1"]

def install():
    print('installing lam-skype')
    #run(r'"SkypeSetupFull.exe" /VERYSILENT /NOLAUNCH')
    install_exe_if_needed('SkypeSetupFull.exe',silentflags='/VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH',killbefore=['Skype.exe'])
#   NOW DISABLE AUTO UPDATE
    time.sleep(5)
    killalltasks('Skype.exe')
    time.sleep(5)
    os.system("reg import disable-skype-update.reg")
    os.system("powershell Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force")
    os.system("powershell -f skype-patch.ps1")
    os.system("powershell Set-ExecutionPolicy -ExecutionPolicy restricted -Scope CurrentUser -Force")
    print("done")
# SkypeSetupFull.exe /VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH

Code: Select all

# Get users
$users = Get-ChildItem -Path "C:\Users"

# Loop through users and delete the file
$users | ForEach-Object {
    Remove-Item -Path "C:\Users\$($_.Name)\AppData\Roaming\Microsoft\Skype for Desktop\Skype-Setup.exe" -Force
    New-Item -ItemType directory -Path "C:\Users\$($_.Name)\AppData\Roaming\Microsoft\Skype for Desktop\Skype-Setup.exe"
}
echo("done")

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Skype\Phone]
"DisableVersionCheck"=dword:00000001

Re: Skype standard version - sharing and improving the code

Published: July 3, 2018 - 3:34 PM
by htouvet
Without using PowerShell scripts:

Code: Select all

uninstallkey=[]

def install():
    install_exe_if_needed('SkypeSetupFull.exe',silentflags='/VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH',
        killbefore=['Skype.exe'],key='Skype_is1',min_version='8.21')
    remove_desktop_shortcut('Skype')

    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Skype\Phone','DisableVersionCheck',1,REG_DWORD)

    for profile in local_users_profiles():
        skype_setup = r"{profile}\AppData\Roaming\Microsoft\Skype for Desktop\Skype-Setup.exe".format(profile=profile)
        if isfile(skype_setup):
            remove_file(skype_setup)


Re: Skype standard version - sharing and improving the code

Published: July 5, 2018 - 10:07 AM
by Root
htouvet wrote: July 3, 2018 - 3:34 PM Without using PowerShell scripts:

Code: Select all

uninstallkey=[]

def install():
    install_exe_if_needed('SkypeSetupFull.exe',silentflags='/VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH',
        killbefore=['Skype.exe'],key='Skype_is1',min_version='8.21')
    remove_desktop_shortcut('Skype')

    registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Skype\Phone','DisableVersionCheck',1,REG_DWORD)

    for profile in local_users_profiles():
        skype_setup = r"{profile}\AppData\Roaming\Microsoft\Skype for Desktop\Skype-Setup.exe".format(profile=profile)
        if isfile(skype_setup):
            remove_file(skype_setup)


Excellent script, entirely in Python!

I'll try it in the next update ;-)

Re: [SOLVED] Skype Standard Version - Sharing and Improvements

Published: September 12, 2018 - 11:37
by sergead
Good morning,

I have the same problem with Skype trying to update itself with the Skype from the Wapt store.
To block updates to this package, I added the following to the install() section of the official package, as mentioned here:

Code: Select all

registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Skype\Phone','DisableVersionCheck',1,REG_DWORD)
But it's not working, it keeps updating....

Should I remove the official package and create a completely new package with the Python definition mentioned above?