IBM Support

Run command lspasswd.exe and get error "Can't get console mode ".

Troubleshooting


Problem

Run command lspasswd.exe failed inside an user program on Windows with error "Can't get console mode "

Symptom

Run lspasswd.exe in a wrapper program failed with error "Can't get console mode ".

Run command lspasswd.exe directly in cmd.exe, it works without above error.

Cause

The error message, "Can't get console mode", indicate the Windows API GetConsoleMode() failed.

By design, command lspasswd.exe must be run in console mode.
If lspasswd.exe runs inside a program without a console, it will fail with above error message.

Resolving The Problem


For conception of console mode, refer the following page.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167%28v=vs.85%29.aspx

Then, check your wrapper program and make sure lspasswd.exe run with a console.

[{"Product":{"code":"SSETD4","label":"Platform LSF"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.1.0;9.1.1;9.1.2;9.1.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1026044