1

You know, what you normally get when typing ctrl-alt-del or ctrl-alt-end. Except in this scenario I can't press those keys, but I want to launch that box. Specifically I want to be able to pull up the change password dialog from the command line.

Thanks

jeffspost
  • 339
  • 3
  • 5
  • 14

4 Answers4

2

Here is an extension of the answer given by Raymond Chen. I shows how to call the WindowsSecurity from a batch file. Note that it will only work properly when connected by a terminal session to Microsoft Terminal Server.

@if (@CodeSection == @Batch) @then
@echo off

:: See https://gist.github.com/DavidRuhmann/5199433 and 
:: http://msdn.microsoft.com/en-us/library/windows/desktop/gg537748%28v=vs.85%29.aspx
:: for details.

CScript //E:JScript //Nologo "%~0" %*
exit /b

@end

try
{
    var objShell = new ActiveXObject("shell.application");
    objShell.WindowsSecurity();
    WScript.Quit(0);
}
catch(e)
{
    WScript.Quit(1);
}
Ben Key
  • 2,272
  • 1
  • 13
  • 26
2

You call the Shell.WindowsSecurity method. The documentation includes sample code.

Raymond Chen
  • 42,606
  • 11
  • 86
  • 125
  • This works fine when connected to a desktop session. But it doesn't work when using a RemoteApp. I think it worked before but I am not really sure. Maybe some update broke this functionality. The method succeeds but nothing happens. – clst Jul 11 '19 at 13:10
  • @clst It worked. The remote system displayed its security dialog. But you can't see it because you are local. – Raymond Chen Jul 11 '19 at 14:06
  • Looks like I was wrong this seemed to always fail silently when there is no full explorer shell (with taskbar). https://stackoverflow.com/a/33425283/920122 I have now used the RDWeb change password funtionality for our customers: https://social.technet.microsoft.com/wiki/contents/articles/10755.windows-server-2012-rds-enabling-the-rd-webaccess-expired-password-reset-option.aspx – clst Jul 12 '19 at 15:10
0

OSK.exe will bring up an on screen keyboard. It should allow you to hit ctrl-alt-del

Greg
  • 1
-1

control.exe password.cpl - will launch the password Control Panel applet.

Eric H
  • 236
  • 1
  • 3
  • 12