Forum

Please note that you can subscribe to the individual forums. A subscription for news only covers the news.

Notifications
Clear all

password on exit

6 Posts
3 Users
0 Likes
97 Views
0
Topic starter

hi all hope everyone is well

started after a break resuming writing my script i have figured out how to make it  launch on turning on pc ,but is there away of asking for a password to close the program *scenario is it runs all the time if someone trys to close it its entered in report and asks for password ,password willl be kept under lock by timelock any thought,s? 😀 

4 Answers
0

I am not sure what it is you are trying to do.

Do you want the sub to know a password to be able to close the program? Then it is not possible.

If you just want to ask the sub a question when closing the program, then it is easy.

Sven

 

0

@Sven B. It sounds like he's asking to prevent the program from closing on the computer, unless a password is provided.

 

Something like this:

If user knows generated-script-exit password:

1. User presses "X" button to close program

c++ - Qt: How do I handle the event of the user pressing the 'X' (close)  button? - Stack Overflow

2. Program pop-up asks: "What is the password to close the script?"

3. User enters correct password in pop-up and presses "OK".

4. Virmst checks entered password against generated script password. Password checks out and Virmst proceeds to close program.

 

If user doesn't know generated-script-exit password:

1. User presses "X" button to close program

c++ - Qt: How do I handle the event of the user pressing the 'X' (close)  button? - Stack Overflow

2. Program pop-up asks: "What is the password to close the script?"

3. User enters wrong password in pop-up and presses "OK".

4. Virmst checks entered password against generated script password. Password is wrong

5. Virmst pop-up displays "Wrong password entered". Program stays open. User can only minimize program.

 

This could be done by having the program generate close-program passwords just like the existing "generate random code" feature, except emailing the password to the Master user, and running a routine of re-generating and re-emailing once a generated code is successfully used.

 

This could be improved with an automatic script implementation by generating internal codes to prevent program closing completely, and giving script writers options such as:

PreventScriptClose=0 or 1 [if 1, script generates internal password to prevent program closing and only displays it if the following Merits are met]

MinimumMeritstoClose=600 [Only functional if MinimumMeritstoClose script is set to 1. Program will pop-up and display internally generated password that sub can use to close program once merits are met]

 

Then just set Virmst to run on startup so the user can't just restart their computer to exit:

https://stackoverflow.com/questions/674628/how-do-i-set-a-program-to-launch-at-startup

 

It is trivial, coding-wise, to prevent program closing via the red "X" button. If you want to do an even better job and prevent closing via task manager, all you have to do is run a free silent "Process Explorer" program script to block off close access from the logged in user. If this is only possible with a Windows "Guest" account, then all you need to do is have the program detect if the ran script has a "PreventScriptClose=1" feature, then display "This script works best on a Windows Guest account.":

https://superuser.com/questions/1169284/is-there-a-way-to-block-guest-users-from-closing-a-certain-program

 

subslave2020 subslave2020 Topic starter 16/09/2022 5:56 pm

@anonymous exactly what i was asking thank,s both for your replies

subslave2020 subslave2020 Topic starter 17/09/2022 12:25 am

@anonymous but im not sure where to put those options i tried in main section says illegal option

0

Thank you for the explanation.

I am afraid that it is not possible, and will not be possible. It's a principle of mine that the sub must always be able to get out immediately. This is a security measure.

You can easily punish the sub for closing the program without permission, but you cannot prevent it.

Sven B.

0
Topic starter

ok i understand that thank you