Batch file password login - different everyday

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Ollyc
Posts: 3
Joined: 10 Nov 2018 10:47

Batch file password login - different everyday

#1 Post by Ollyc » 10 Nov 2018 10:52

Hello ,

Im seeing if its possible to have a cmd batch file where the password is different everyday. I have to run another batch file which will tell me the password to enter on my other batch file.

Im guessing it would have to work on date order so each date has its own password.

Can anyone give any ideas on how to code this?

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Batch file password login - different everyday

#2 Post by ShadowThief » 10 Nov 2018 21:51

1. Write a script that changes a password stored in a file every time you run it. I'm thinking something that simulates diceware, personally.
2. Create a scheduled task that runs that script once per day.

Ollyc
Posts: 3
Joined: 10 Nov 2018 10:47

Re: Batch file password login - different everyday

#3 Post by Ollyc » 11 Nov 2018 11:25

Hello Shadow theif

Is it possible you could point me to the right place , im pretty knew to coding batch files

Thank you

Ollyc
Posts: 3
Joined: 10 Nov 2018 10:47

Re: Batch file password login - different everyday

#4 Post by Ollyc » 11 Nov 2018 13:33

@echo off
set /P c=%date% if /I "%c%" EQU "10/11/2018" goto :10/11/2018
:choice
if /I "%c%" EQU "11/11/2018" goto :11/11/2018(different password)
if /I "%c%" EQU "10/11/2018" goto :10/11/2018( different password)


iv come up with an idea above .
when cmd prompt displays the date is it possible that it will answer the choice ?
it works when i type it in but i want it when it displays the date its then answered it moves to the right section .

Post Reply