Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+3)

i have started playing around with windows services/scheduled tasks. if it finds i closed the app then it removes my account from admin for 6 hours and automatically logs me off so that i lose admin rights immediately. it then autostarts so i can't close it.

it will also copy the save file to an encrypted (by dpapi) folder that only system has access to so even if i delete the save file to restart and lose the lock time it will restore the file and reset the lock to 16 hours.

(+1)

can you give instructions how  to do this, i tried to run a schedule that reboots if closed but cant  find id for the event 

(+1)

this is the way i have done it for Windows 11 machine. I have set hotscreen to launch at startup and the script here runs 5 minutes after logon (this makes sure that the hotscreen app will have launched by the time it starts monitoring for it) . It will check whether the process (hotscreen.exe) rather than process id is running. If it is running then nothing happens for 30 seconds.

If it finds out that the process isnt running it removes my account from administrators group and forces an immediate logoff (that way i lose admin rights immediately) but it does add in another task for 6 hours later to re-add my account back to administrators.
I do have another admin account I could use if this failed, MAKE SURE YOU HAVE ANOTHER WAY TO ACCESS WHILE TESTING!

I am not going to publish the full script here because it has the ability to remove users from admin etc, happy to give pointers but i don't want the full script to be used for nefarious reasons by others.




# HotScreen Monitor - Runs at startup, checks every 30 seconds

$startTime = Get-Date

while ($true) {

    $elapsedTime = (Get-Date) - $startTime

    

    # Only check after 5 minutes

    if ($elapsedTime.TotalMinutes -ge 5) {

        $process = Get-Process -Name "hotscreen" -ErrorAction SilentlyContinue

        

        if ($process) {

            Write-Output "hotscreen.exe IS running - no action taken"

        } else {

            Write-Output "hotscreen.exe is NOT running - proceeding with admin removal"

THIS IS WHERE YOU WOULD ADD IN YOUR COMMANDS FOR WHAT TO DO IF HOTSCREEN ISN'T RUNNING

     }

}       

}

(+1)

Do you think it would be possible to make it so if you continue trying to view inappropriate pics/vids that if you keep opening them that the inappropriate content is just deleted from your PC?

(+1)

it probably would be, i have been using it more for online stuff rather than local stuff, or stuff that i delete after downloading anyway.

(+1)

Or would it be very difficult to tie the launch of hot screen to the use of a gallery app? Like if I try to open a photo in (whatever gallery I use) then hot screen opens to. And when I close either the gallery or hot screen it causes the other to close as well. Basically if you open or close one than the other does to.

(+1)

you could create a new shortcut for the gallery app (lets call it paint) that would open both apps. I am not sure how you could then close both apps at same time though.
I am not really a coder, just someone who likes to play with powershell on my own pc :)