Skip to content

Commit

Permalink
added target user variable
Browse files Browse the repository at this point in the history
  • Loading branch information
arwn authored Jul 10, 2019
1 parent 203ca45 commit 60fe919
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## This script deploy memez as a service
# set path to exe
$username = "42" # change username to the target user
# don't change anything below here

$filepath = 'C:\memez.exe'

# chown file
Expand All @@ -9,5 +11,5 @@ icacls $filepath /setowner admin
$trigger = New-ScheduledTaskTrigger -At 11pm -Weekly -DaysOfWeek monday, tuesday, wednesday, thursday, saturday, sunday
$triggerFriday = New-ScheduledTaskTrigger -At 12pm -Weekly -DaysOfWeek friday
$action = New-ScheduledTaskAction -execute $filepath
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "memez" -Description "Anti gamer script"
Register-ScheduledTask -Action $action -Trigger $triggerFriday -TaskName "memezf" -Description "Anti gamer script, on friday"
Register-ScheduledTask -Action $action -Trigger $trigger -User $username -TaskName "memez" -Description "Anti gamer script"
Register-ScheduledTask -Action $action -Trigger $triggerFriday -User $username -TaskName "memezf" -Description "Anti gamer script, on friday"

0 comments on commit 60fe919

Please sign in to comment.