Windows autostart docs #4081

Closed
palmtree5 wants to merge 17 commits from V3/docs/win_autostart into V3/develop
palmtree5 commented 2020-07-18 06:36:18 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Supersedes #2726

### Type - [ ] Bugfix - [ ] Enhancement - [x] New feature ### Description of the changes Supersedes #2726
tekulvw (Migrated from github.com) reviewed 2020-07-18 06:36:18 +02:00
Jackenmen (Migrated from github.com) reviewed 2020-07-18 06:36:18 +02:00
Jackenmen (Migrated from github.com) reviewed 2020-07-18 19:36:44 +02:00
Jackenmen (Migrated from github.com) left a comment
No description provided.
My review comments for this PR, mostly copied from #2726.
palmtree5 (Migrated from github.com) reviewed 2020-08-02 05:33:23 +02:00
@ -0,0 +1,104 @@
.. windows service guide
palmtree5 (Migrated from github.com) commented 2020-08-02 05:33:22 +02:00

I'm thinking

$c = Get-Credential
nssm set redbot ObjectName $c.Username $c.Password

might work here but I need to test it

I'm thinking ```pwsh $c = Get-Credential nssm set redbot ObjectName $c.Username $c.Password ``` might work here but I need to test it
Jackenmen (Migrated from github.com) reviewed 2020-08-07 01:20:00 +02:00
@ -0,0 +1,104 @@
.. windows service guide
Jackenmen (Migrated from github.com) commented 2020-08-07 01:19:59 +02:00

Same as the Read-Host -AsSecureString, $c.Password is also a secure string which sadly requires doing something like this:

$([System.Net.NetworkCredential]::new("", $c.Password)).Password

to get the actual raw string

I guess we will just have to call the solution I posted above as good enough then.

Same as the `Read-Host -AsSecureString`, `$c.Password` is also a secure string which sadly requires doing something like this: ``` $([System.Net.NetworkCredential]::new("", $c.Password)).Password ``` to get the actual raw string I guess we will just have to call the solution I posted above as good enough then.
Lmmb74 commented 2020-09-15 00:56:20 +02:00 (Migrated from github.com)

Hello. I'm actually having trouble using these instructions. The service never starts completely, it pauses during the process, so I'm getting the following error:
redbot: Unexpected status SERVICE_PAUSED in response to START control.

I'm executing PowerShell as Administrator, and tried using both the Windows default one and the PowerShell 7 Preview. I know I should wait until this pull is done, but maybe it would serve as a "What to do when..." answer for the guide. Thanks in advance.

P.S.: I had to use "" for my password since it uses special characters (#). And I tried using @jack1142 prompt too.

Hello. I'm actually having trouble using these instructions. The service never starts completely, it pauses during the process, so I'm getting the following error: `redbot: Unexpected status SERVICE_PAUSED in response to START control.` I'm executing PowerShell as Administrator, and tried using both the Windows default one and the PowerShell 7 Preview. I know I should wait until this pull is done, but maybe it would serve as a "What to do when..." answer for the guide. Thanks in advance. P.S.: I had to use "" for my password since it uses special characters (#). And I tried using @jack1142 prompt too.
Jackenmen commented 2020-09-15 12:28:45 +02:00 (Migrated from github.com)

@Lmmb74 nssm dump should show more information that might be helpful to solve this issue. I'm not sure whether it's that good idea to ask for help here though, might be better to do it in our discord server (even though it's still not officially supported)

@Lmmb74 `nssm dump` should show more information that might be helpful to solve this issue. I'm not sure whether it's that good idea to ask for help here though, might be better to do it in [our discord server](https://discord.gg/red) (even though it's still not officially supported)
Lmmb74 commented 2020-09-15 16:54:30 +02:00 (Migrated from github.com)

Here is the dump. Also, I asked for help in Discord and I was given a solution involving a batch file.

Here is the [dump](https://hastebin.com/gexikequno.sql). Also, I asked for help in Discord and I was given a solution involving a batch file.
Jackenmen commented 2020-09-15 17:52:06 +02:00 (Migrated from github.com)

Solved this in Discord server. The issue wasn't related to nssm instructions - Red simply wasn't installed in the venv.
While it might be worth to mention that Event Viewer can be helpful for debugging issues like "Unexpected status SERVICE_PAUSED in response to START control.", I wouldn't consider it essential for this PR.

Solved this in Discord server. The issue wasn't related to nssm instructions - Red simply wasn't installed in the venv. While it might be worth to mention that Event Viewer can be helpful for debugging issues like "Unexpected status SERVICE_PAUSED in response to START control.", I wouldn't consider it essential for this PR.
Crossedfall commented 2020-09-16 03:38:04 +02:00 (Migrated from github.com)

Wouldn't it be preferable to use the built in task scheduler to auto run the bot? It reduces the amount of bloat the user needs to install onto their system, while also being generally more reliable since it's a core feature of the operating system.

Wouldn't it be preferable to use the built in task scheduler to auto run the bot? It reduces the amount of bloat the user needs to install onto their system, while also being generally more reliable since it's a core feature of the operating system.
palmtree5 (Migrated from github.com) reviewed 2020-09-19 07:32:05 +02:00
palmtree5 (Migrated from github.com) left a comment

Went with the longer option for password handling

Went with the longer option for password handling
Kowlin commented 2023-03-19 02:44:48 +01:00 (Migrated from github.com)

Superseded by #5996.

Superseded by #5996.

Pull request closed

Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!4081
No description provided.