user130990: Is there a way to insert a password to a wallet.dat file from windows cmd?
I'm a newbie, so please be as specific as you can.
That wallet.dat file needs rescan, which I want to make after I insert the password. This I can't do from bitcoin core gui (version 0.22), since once running it starts rescanning immediately and so no menu appears and I can't do anything till it's finished the rescan.
Thanks

user-1: 
Is there a way to insert a password to a wallet.dat file from windows cmd?


Run cmd
Change directory to run bitcoind.exe. If Windows is installed in C drive:
cd "C:\Program Files\Bitcoin\daemon"



Open another command prompt, change directory to above path and run this command:
bitcoin-cli.exe walletpassphrase "my pass phrase" 60


https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/walletpassphrase/

You can also do this using PowerShell. However I am not sure if this will help with rescan issue.

user130990: Using the info @Prayank provided, I managed to do it the following way:
Run first cmd session and changed directory to where bitcoind.exe resides. Then run bitcoind.exe
Run second cmd session, changed directory to the same one as above and then run
bitcoin-cli loadwallet directory_where_wallet.dat_resides
bitcoin-cli encryptwallet "my pass phrase"

130990: <p>Is there a way to insert a password to a wallet.dat file from windows cmd?</p>
<p>I'm a newbie, so please be as specific as you can.</p>
<p>That wallet.dat file needs rescan, which I want to make after I insert the password. This I can't do from bitcoin core gui (version 0.22), since once running it starts rescanning immediately and so no menu appears and I can't do anything till it's finished the rescan.</p>
<p>Thanks</p>
 -1: <blockquote>
<p>Is there a way to insert a password to a wallet.dat file from windows cmd?</p>
</blockquote>
<ol>
<li>Run cmd</li>
<li>Change directory to run <code>bitcoind.exe</code>. If Windows is installed in <code>C</code> drive:
<pre><code>cd &quot;C:\Program Files\Bitcoin\daemon&quot;

</code></pre>
</li>
<li>Open another command prompt, change directory to above path and run this command:
<pre><code>bitcoin-cli.exe walletpassphrase &quot;my pass phrase&quot; 60

</code></pre>
<a href="https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/walletpassphrase/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/walletpassphrase/</a></li>
</ol>
<p>You can also do this using PowerShell. However I am not sure if this will help with <code>rescan</code> issue.</p>
 130990: <p>Using the info @Prayank provided, I managed to do it the following way:</p>
<p>Run first cmd session and changed directory to where <code>bitcoind.exe</code> resides. Then run <code>bitcoind.exe</code></p>
<p>Run second cmd session, changed directory to the same one as above and then run</p>
<p><code>bitcoin-cli loadwallet directory_where_wallet.dat_resides</code></p>
<p><code>bitcoin-cli encryptwallet &quot;my pass phrase&quot;</code></p>
