How to minimize terminal window after entering password on windows

What is the problem you are having with rclone?

I use rclone mount on windows via a scheduled task in windows. this ensures im prompted to enter my password and mount the volume when i log in.

My question is if I am able to have the window minimize, run in the background, etc after entering my password in the console that appears when the task runs.
I know about the --no-console param. But that wouldnt allow me to enter my password to decrypt my config file.

Is anyone aware of a solution that allows me to retain config file encryption, but allow me to not have a window open i may accidentally close?

Run the command 'rclone version' and share the full output of the command.

rclone v1.65.2
- os/version: Microsoft Windows 11 Enterprise 22H2 (64 bit)
- os/kernel: 10.0.22621.2861 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: cmount

Which cloud storage system are you using?

Azure Blob Storage

The command you were trying to run

rclone mount REDACTED: C:\Users\REDACTED\cloud_mounts\azure\REDACTED

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[REDACTED]
type = azureblob
account = XXX
key = XXX

A log from the command that you were trying to run with the -vv flag

2024/01/25 17:14:26 DEBUG : rclone: Version "v1.65.2" starting with parameters ["C:\\ProgramData\\chocolatey\\lib\\rclone.portable\\tools\\rclone-v1.65.2-windows-amd64\\rclone.exe" "mount" "REDACTED:" "C:\\Users\\REDACTED\\cloud_mounts\\azure\\REDACTED" "-vv"]

2024/01/25 17:14:26 DEBUG : Creating backend with remote "REDACTED:"

Enter configuration password:

password:

2024/01/25 17:14:31 DEBUG : Using config file from "C:\\Users\\REDACTED\\AppData\\Roaming\\rclone\\rclone.conf"

2024/01/25 17:14:31 INFO : Azure root: poll-interval is not supported by this remote

2024/01/25 17:14:31 DEBUG : Network mode mounting is disabled

2024/01/25 17:14:31 DEBUG : Mounting on "C:\\Users\\REDACTED\\cloud_mounts\\azure\\REDACTED" ("REDACTED")

2024/01/25 17:14:31 DEBUG : Azure root: Mounting with options: ["-o" "attr_timeout=1" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=REDACTED"]

2024/01/25 17:14:31 DEBUG : Azure root: Init:

2024/01/25 17:14:31 DEBUG : Azure root: >Init:

2024/01/25 17:14:31 DEBUG : /: Statfs:

2024/01/25 17:14:31 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0

2024/01/25 17:14:31 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:31 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:31 DEBUG : /: Readlink:

2024/01/25 17:14:31 DEBUG : /: >Readlink: linkPath="", errc=-40

2024/01/25 17:14:31 DEBUG : /: Getxattr: name="non-existant-a11ec902d22f4ec49003af15282d3b00"

2024/01/25 17:14:31 DEBUG : /: >Getxattr: errc=-40, value=""

The service rclone has been started.

2024/01/25 17:14:31 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:31 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:31 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:31 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:31 DEBUG : /: Opendir:

2024/01/25 17:14:31 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

2024/01/25 17:14:31 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>

2024/01/25 17:14:31 DEBUG : /: >Opendir: errc=0, fh=0x0

2024/01/25 17:14:31 DEBUG : /: Statfs:

2024/01/25 17:14:31 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0

2024/01/25 17:14:31 DEBUG : /: Statfs:

2024/01/25 17:14:31 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0

2024/01/25 17:14:31 DEBUG : /: Releasedir: fh=0x0

2024/01/25 17:14:31 DEBUG : /: >Releasedir: errc=0

2024/01/25 17:14:31 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:31 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:31 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:31 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:31 DEBUG : /: Opendir:

2024/01/25 17:14:31 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

2024/01/25 17:14:31 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>

2024/01/25 17:14:31 DEBUG : /: >Opendir: errc=0, fh=0x0

2024/01/25 17:14:31 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:31 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:31 DEBUG : /: Releasedir: fh=0x0

2024/01/25 17:14:31 DEBUG : /: >Releasedir: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Opendir:

2024/01/25 17:14:32 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

2024/01/25 17:14:32 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>

2024/01/25 17:14:32 DEBUG : /: >Opendir: errc=0, fh=0x0

2024/01/25 17:14:32 DEBUG : /: Releasedir: fh=0x0

2024/01/25 17:14:32 DEBUG : /: >Releasedir: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Opendir:

2024/01/25 17:14:32 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

2024/01/25 17:14:32 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>

2024/01/25 17:14:32 DEBUG : /: >Opendir: errc=0, fh=0x0

2024/01/25 17:14:32 DEBUG : /: Releasedir: fh=0x0

2024/01/25 17:14:32 DEBUG : /: >Releasedir: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Opendir:

2024/01/25 17:14:32 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

2024/01/25 17:14:32 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>

2024/01/25 17:14:32 DEBUG : /: >Opendir: errc=0, fh=0x0

2024/01/25 17:14:32 DEBUG : /: Releasedir: fh=0x0

2024/01/25 17:14:32 DEBUG : /: >Releasedir: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Opendir:

2024/01/25 17:14:32 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

2024/01/25 17:14:32 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>

2024/01/25 17:14:32 DEBUG : /: >Opendir: errc=0, fh=0x0

2024/01/25 17:14:32 DEBUG : /: Releasedir: fh=0x0

2024/01/25 17:14:32 DEBUG : /: >Releasedir: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Opendir:

2024/01/25 17:14:32 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

2024/01/25 17:14:32 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>

2024/01/25 17:14:32 DEBUG : /: >Opendir: errc=0, fh=0x0

2024/01/25 17:14:32 DEBUG : /: Releasedir: fh=0x0

2024/01/25 17:14:32 DEBUG : /: >Releasedir: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF

2024/01/25 17:14:32 DEBUG : /: >Getattr: errc=0

2024/01/25 17:14:32 DEBUG : /: Opendir:

2024/01/25 17:14:32 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

2024/01/25 17:14:32 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>

2024/01/25 17:14:32 DEBUG : /: >Opendir: errc=0, fh=0x0

2024/01/25 17:14:32 DEBUG : /: Releasedir: fh=0x0

2024/01/25 17:14:32 DEBUG : /: >Releasedir: errc=0

welcome to the forum,

yes, this is a simple script for that

:: start rclone in a new process, do not wait.
start "rclonemount" rclone mount REDACTED: C:\Users\REDACTED\cloud_mounts\azure\REDACTED
:: now, you have 10 seconds to type the rclone config password
waitfor /t 10 whatever
:: after 10 seconds, hide the window
nircmd win hide title "rclonemount"

thanks for the welcome.

this script requires nircmd? that might be a deal breaker. not sure my org's AV allows it, but ill take a look. thanks for the solution. i may just test it on my personal pc.

yeah, that is an issue even with windows os, but just exclude it
image

if not nircmd, then i use autohotkey on a lot of machines, never had an issue with antivirus.
tho i am sure same could be done with powershell, python and whatnot.

if the org av does not allow nircmd.exe, might run upx on it and see what happens.

My company uses a different AV than the windows built in one and they manage exclusions, not us employees. But pshell is a good shout. Ill see if there are commands to replace the nircmd line that hides the window.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.