0

I'm just wondering if anyone could help me develop an AppleScript programme to be able to tick all the boxes like seen on here https://i.stack.imgur.com/BT1WS.jpg as well as be able to tick the VNC box and type in a password, like seen here https://i.stack.imgur.com/lP1Mc.jpg

I tried to look at other already made programmes and found this code made by Gordon Davisson.

do shell script "/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all" with administrator privileges

I am wondering if anyone could develop it further to add the features I want onto it.

Any help is appreciated!

Thank you

Piotr Irving
  • 171
  • 1
  • 1
  • 9

1 Answers1

0

You need to add -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw 'YourPasswordHere' in the -configure section of the command options. Here's what it should look like:

do shell script "/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -privs -all -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw 'YourPasswordHere' -restart -agent" with administrator privileges

Note that kickstart's option syntax is weirdly hierarchical. Here I've attempted to diagram the structure of that command's sections, subsections, etc:

/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart
    -activate
    -configure
        -access -on
        -privs -all
        -clientopts
            -setvnclegacy -vnclegacy yes
            -setvncpw -vncpw 'CorrectHorseBatteryStaple'
    -restart -agent

See the man page here.

Gordon Davisson
  • 118,432
  • 16
  • 123
  • 151