-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from grubyhs/feature/placzykowski/moving-dell-t…
…o-external-def Feature/placzykowski/moving dell to external def
- Loading branch information
Showing
4 changed files
with
72 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import os | ||
import winreg | ||
from utilities import * | ||
# Define the URL to download Dell SupportAssist | ||
support_assist_download_url = "https://downloads.dell.com/serviceability/catalog/SupportAssistInstaller.exe" | ||
|
||
# Set the installer path to the specified download folder | ||
user_download_folder = os.path.join(os.path.expanduser("~"), "Downloads") | ||
dell_support_assist_installer_filename = "SupportAssistInstaller.exe" | ||
support_assist_installer_path = os.path.join(user_download_folder, dell_support_assist_installer_filename) | ||
def launch_dell_support_assist(): | ||
try: | ||
ps_command = ( | ||
"Get-AppxPackage | Where-Object {$_.Name -like 'DellSupportAssist'} | " | ||
"Foreach-Object {" | ||
"$packageName = $_.PackageFamilyName;" | ||
"Start-Process shell:AppsFolder\\$packageName!App;" | ||
"}" | ||
) | ||
subprocess.run(["powershell", "-Command", ps_command], check=True) | ||
except subprocess.CalledProcessError as e: | ||
print(f"Error launching the UWP app: {e}") | ||
|
||
|
||
def install_support_assist(): | ||
download_installer(url=support_assist_download_url, user_download_folder=user_download_folder,installer_path=support_assist_installer_path) | ||
# Install Dell SupportAssist | ||
install_program(support_assist_installer_path) | ||
|
||
# Check if Dell SupportAssist is already installed | ||
def launch_dell_support_assist(): | ||
try: | ||
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Dell\SupportAssistAgent", 0, winreg.KEY_READ): | ||
launch_dell_support_assist() | ||
except FileNotFoundError: | ||
install_support_assist() | ||
|
||
def dell(): | ||
mobo_manufacturer() | ||
launch_dell_support_assist() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,24 @@ | ||
wmi | ||
requests | ||
altgraph==0.17.4 | ||
bottle==0.12.25 | ||
bottle-websocket==0.2.9 | ||
certifi==2024.2.2 | ||
cffi==1.16.0 | ||
charset-normalizer==3.3.2 | ||
Eel==0.16.0 | ||
future==1.0.0 | ||
gevent==24.2.1 | ||
gevent-websocket==0.10.1 | ||
greenlet==3.0.3 | ||
idna==3.7 | ||
packaging==24.0 | ||
pefile==2023.2.7 | ||
pycparser==2.22 | ||
pyparsing==3.1.2 | ||
pywin32==306 | ||
pywin32-ctypes==0.2.2 | ||
requests==2.31.0 | ||
urllib3==2.2.1 | ||
whichcraft==0.6.1 | ||
WMI==1.5.1 | ||
zope.event==5.0 | ||
zope.interface==6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters