How can I encrypt password in a batch file?
18,734
Not exact answer to the question, but, as per the comments discussion and your acceptance to the alternate approach, the below might help you to inline encode the password and pass as a parameter to WMIC:
Base64 Encode "string" - command-line Windows?
Comments
-
biswajit almost 2 years
I have a batch file which is used to connect to a remote server.
Tha batch file contains:
WMIC /NODE:"ip_address" /user: user_name /password: pass_word process call create "path\abc.bat"
I want to encrypt pass_word.
-
Awan Biru almost 4 yearsBase64 just encode the password to base64 literals. It is not an encryption scheme as asked by @Biswajit Paul above
-
vijayinani almost 4 years@Awan Biru ... Did you go thru the comments in the question? He is fine with simple encoding decoding too. So this answer. Have some time to go thru comments before deciding.
-
Awan Biru almost 4 yearsSince, original question did not changed, aren't your answer more suitable as comment instead? Your answer could misleads other readers, since encoding is not encrypting.
-
vijayinani almost 4 yearsHave altered my answer. And moreover this is not heavily voted question to rely upon. The question is very raw to refer. You will find many such threads on sof.