none
Can a prompt for password appear before killing process RRS feed

  • Question

  • Hello everyone,

    I am new to scripting and have tried to look for an answer to my question in other forums, but have not had the chance to get one.

    I am trying to see if I can get a prompt to enter password before the process to kill the application occurs. Is this possible or not?

    Thanks,

    Joel

    Sunday, January 25, 2015 5:58 AM

Answers

  • It sounds like you are wanting to create a kiosk mode. It sounds like you should be able to use the assigned access feature (I believe this first appeared in Windows 8.1). You can ask about that in a more appropriate forum.

    -- Bill Stewart [Bill_Stewart]

    Sunday, January 25, 2015 7:51 PM
    Moderator

All replies

  • Hey Joel,

    Are you wanting to write a cmdlet for killing a process that prompts for a password, when they run the cmdlet, or for a password prompt to occur natively whenever you try and kill a process in Windows? For the latter, you're better to take another approach.

    Look at locking down the user environment by restricting access to programs such as Task Manager and so on, which can actually do the process termination. You can configure a GPO which can set which services can be killed though.  And of course if the end user really needs local admin rights in the first place.

    Sunday, January 25, 2015 7:20 AM
  • A user can kill any process that the user creates.  It does not require a password.

    What you are asking is very vague.  You need to explain it better.


    ¯\_(ツ)_/¯

    Sunday, January 25, 2015 9:04 AM
  • Sorry about that.

    I have created a script that will hide task bar and keep the necessary application maximized. The end user is not to close the application and if they try to I would like to ask for a password. I hope I have explained myself somewhat better.

    Is this something I can do with powershell?



    • Edited by skripting Sunday, January 25, 2015 5:29 PM Modified
    Sunday, January 25, 2015 5:28 PM
  • What you are trying to do cannot be done.  You cannot force a program to stay on top with a script.

    Contact the vendor of the program for help customizing it to your needs.


    ¯\_(ツ)_/¯

    Sunday, January 25, 2015 6:28 PM
  • It sounds like you are wanting to create a kiosk mode. It sounds like you should be able to use the assigned access feature (I believe this first appeared in Windows 8.1). You can ask about that in a more appropriate forum.

    -- Bill Stewart [Bill_Stewart]

    Sunday, January 25, 2015 7:51 PM
    Moderator
  • Just thinking aloud here, and it's not exactly what you're looking for, but maybe one option you could instead do would be to register a service which launches the application automatically, and assign permissions accordingly.

    It is possible to keep an application on top with a script, or rather to always bring it to the top if not, but you'll need to also use winapi stuff, which isn't fun, and combine it with some form of timer to continuously check. 

    If you've a sadistic wish to investigate that, then go ahead, but Bill's suggestion is definetely the best and easiest way to do this!

    Sunday, January 25, 2015 8:41 PM
  • The assigned programm method has been available since at least NT 4.0.  Windows 8.1 may bethe first OS version to make it visible.

    We can use the IEAK to create a verrsion of IE that runs only in jiosk mode.   If you go to Sears and look at there kiosk then you will see how this  works.  You can kill teh IE session and t will jsut remain.  If you foce the ssytem to kill the sessoin using secret methods then it will just pop back up again.


    ¯\_(ツ)_/¯

    Sunday, January 25, 2015 10:03 PM
  • I have virtual server running headless. I am able to run the script as a service.

    So what I can understand, I am not able to add a line of code or create another script to get processname to kill the server and prompt for a password to initiate kill process?

    @jrv - do you think I can try something differently using IE?

    Any suggestions will be greatly appreciated.

    Joel

    • Edited by skripting Tuesday, January 27, 2015 3:25 AM
    Tuesday, January 27, 2015 3:20 AM
  • I have virtual server running headless. I am able to run the script as a service.

    So what I can understand, I am not able to add a line of code or create another script to get processname to kill the server and prompt for a password to initiate kill process?

    @jrv - do you think I can try something differently using IE?

    Any suggestions will be greatly appreciated.

    Joel


    I don't think anyone can figure out what you are asking.

    ¯\_(ツ)_/¯

    Tuesday, January 27, 2015 3:30 AM
  • Thanks for the link Bill, this will work perfectly for what a client is looking for.
    Tuesday, January 27, 2015 3:35 AM