Skip to content

Commit

Permalink
fixed wrong red command
Browse files Browse the repository at this point in the history
  • Loading branch information
kr1s7ian committed Jan 27, 2023
1 parent 5191aa3 commit 965eb26
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def kill_steam():


def open_steam():
subprocess.run(["start", "steam://open/main"],
capture_output=False, shell=True)
subprocess.call("start steam://open/main",creationflags=subprocess.DETACHED_PROCESS, shell=True)


'''Login in steam account with username parameter using registers red add'''
Expand All @@ -28,13 +27,8 @@ def login_steam(account_index):
global config
username = config.get_account_usernames()[account_index]
print("logging in " + username + " steam account")
username_param = '%{}%'.format(username)
test = ['reg', 'add', '"HKCU\Software\Valve\Steam"', '/v',
'AutoLoginUser', '/t', 'REG_SZ', '/d', username_param, '/f']
print(test)
subprocess.run(test, capture_output=False, shell=True)
subprocess.run(['reg', 'add', '"HKCU\Software\Valve\Steam"', '/v', 'RememberPassword',
'/t', 'REG_DWORD', '/d', '1', '/f'], capture_output=False, shell=True)
subprocess.call('reg add "HKCU\Software\Valve\Steam" /v AutoLoginUser /t REG_SZ /d ' +username+ ' /f', creationflags=subprocess.CREATE_NO_WINDOW, shell=True)
subprocess.call('reg add "HKCU\Software\Valve\Steam" /v RememberPassword /t REG_DWORD /d 1 /f', creationflags=subprocess.CREATE_NO_WINDOW, shell=True)


'''Closes all processes related to the app'''
Expand Down

0 comments on commit 965eb26

Please sign in to comment.