AppleScripting unix commands appears to break in ARD 3.5.

AppleScripts that involve drawing information using the "execute" unix command task appear to be broken in Apple Remote Desktop 3.5.x. Attempting to execute the command results in a "variable not defined" error.
tell application "Remote Desktop"
          set sel to the selection
          repeat with s in sel
                    set ux to make new send unix command task with properties {script:"users", showing output:false, user:"root"}
                    set myUx to execute ux on s
                    return myUx
          end repeat
end tell
Result:
error "The variable myUx is not defined." number -2753 from "myUx"
This might be related to the previously reported issue involving reports, as documented here, because downgrading to ARD 3.4 seems to fix the issue. The instuctions for effectively downgrading as written by the user cathy fasano worked for me. However, this is only a workaround that forces you to use a version of ARD that may or may not work with Lion clients or on Lion systems.
Under ARD 3.4, the script returns something similar to
{status:"Succeeded on all", computerStatuses:{{|id|:"(computer ID number)", results:"(username)", output:"(username)", address:"(ip address)"}}}
Is anyone else suffering?

It appears the new 3.5.1 update, which claims to fix reporting, does not address this issue.

Similar Messages

  • Unix command to update Microsoft Office 2008 via ARD

    I'm looking for a unix command I can send via ARD to update Microsoft Office 2008. It just needs to install all updates and then restart. Kinda like apple's software update one: softwareupdate -i -a; shutdown -r now

    Why go through all the trouble of trying to do it in Unix.  Apple and Microsoft made it a LOT easier.
    Just download the update from Mactopia
    Open the .dmg
    (for convience and ability to have it stored) Drag the Update from the Microsoft folder that opens up and put the update on your desktop
    In ARD Select what computer(s) you want to install the update in
    Use ARD Install function to install the update
    Go have a cup of coffee and a donut while ARD does the install.
    You do not even have to do a restart.  Microsoft uses a different icon for the update but it still is a package file operation.

  • Running CS3Clean via ARD send unix command?

    Anyone know the proper commands to run this via ARD? Since the two dont play well together we need to uninstall CS3 for CS4 in remote cities.
    I've tried:
    sudo python /MacCS3Clean/CS3Clean.py
    I am not UNIX guru by any means but I can back engineer it.  This command runs it but it needs to add the additional information asked when you run the script manually or it hangs.

    Patrick Seibert wrote:
    I am basically in charge of testing for this migration. All of my test machines have produced license issues either for CS3 or CS4 or both. In 90% of cases, installing CS4 on machines with current CS3 breaks the CS3 License.  Adobe tech support told me they do not coexist becuase they overwrite the each others Flexnet licensing system files. We are not using the DVD's to install this either but using Casper to deply via network and install the package. So either your retail installer is different Adobe tech lied to me or you are using a pirated version with flexnet ripped out.
    I am using retail installs. I've never had a problem with multiple versions ever as each version is its own application. I have never used Flexnet Licensing so I can't answer that. All I know is everything works and I have no conflicts.

  • How do I run a unix command to quit ARD if it is running on a remote server I am trying to access?

    how do I run a unix command to quit ARD if it is running on a remote server I am trying to access?

    killall "Remote Desktop"
    Regards.

  • Using Sent Unix Command in ARD 3 with proxy authentication

    I'd like to use Unix commands to update Apple software through ARD thus allowing me to lock the computer screen before the process using the ARD command to do so, thus keeping the users from interfering with the process .
    Our network utilizes password protected firewall proxy that hangs ARD when using the softwareupdate command through ARD's "Send Unix Command..." at the point in which it would ask for authentication if using the same command in the terminal.
    Is there a Unix/terminal script or a series of script commands that could be modified to wait and enter the appropriate authentication at the previous mentioned prompt?
    I've researched this topic on this forum and discover a few post that states it is not possible but they are fairly old posts so I am hoping ARD 3 has some scripts or commands that can pass thru a username and password

    Welcome,
    I use the "System Events" handler, e.g.:
              tell application "System Events" to delay 5.5
              tell application "System Events" to keystroke "K"
              tell application "System Events" to delay 0.5
              tell application "System Events" to keystroke return
    Regards,
    Shawn

  • Is there an ARD command or Unix command that I can send to reset the desktop background image to default?

    I was forced to create a local user with an automatic login on all of the machines in the building. I listed off many various issues that could come arise by doing this but was tuned out. Now people are changing all of the desktop backgrounds to some pretty inappropriate images. I forewarned the person ordering this that this may be one of the many issues that would arise when doing away with our server based logins, and now I am charged with fixing every desktop every time someone changes it to something inappropriate.
    Is that an Apple Remote Desktop command or a Unix command that I can send through ARD v3.5.3 to the machines to reset the desktop background image to the default Aqua Blue jpeg image located in the /MacintoshHD/Library/Desktop\ Pictures/Aqua\ Blue.jpg.
    The machines that I am dealing with have OS X 10.4.11, OS X 10.5.8, OS X 10.6.8, and OS X 10.7.4 installed on them, but the OS X 10.4.11 machines are the ones that are creating the biggest issue so I would like to deal with those first.

    Ya, I'd love to have the computers connected to the Xserver, unfortunately against my heeding, I was ordered to take them off of the Xserver, so they only have a local account that automatically logs in on startup, and even though I have Parental Controls set, I can not stop them from going to Safari, selecting an inappropriate image and setting it as the background, so now I’ve been ordered to fix all of the backgrounds that people are messing with.
    My Xserver is running OS X 10.4.11 Server Edition. Yes, I would love a new server, but that’s not happening due to budget cuts.
    So what I am hoping for is a command that I can put into Apple Remote Desktop v3.5.3 and push out to all of the computers via its Unix commands and reset all the desktops to their default image.

  • Problems with ARD and SwUpd Unix Command

    Hi everybody
    I have a problem sending UNIX commands to my clients, I work in a school with 500 macs, with 10.4 and 10.5 systems and all the computers download the updates from my Software Update Server, but when I try to send the command from ARD (sudo softwareupdate -i -a) the clients attemp to connect to Apple's servers instead my own SUS. It seems when I try to install with sudo command, overrides the address of my server.
    I show you the output:
    $ sudo softwareupdate -i -a
    password:
    2009-09-22 12:14:31.712 softwareupdate456 loader:didFailWithError:NSError "XML parser error:
    Encountered unknown tag style on line 5
    Old-style plist parser error:
    Malformed data byte group at line 5; invalid hex
    " Domain=SUCatalogLoader Code=0 UserInfo={
    NSLocalizedDescription = "XML parser error:\n\tEncountered unknown tag style on line 5\nOld-style plist parser error:\n\tMalformed data byte group at line 5; invalid hex\n";
    NSURL = http://swscan.apple.com/content/catalogs/index-1.sucatalog;
    Error: XML parser error:
    Encountered unknown tag style on line 5
    Old-style plist parser error:
    Malformed data byte group at line 5; invalid hex
    Software Update Tool
    Copyright 2002-2005 Apple
    When I try this command as a normal user, everything is ok:
    $ softwareupdate --list
    2009-09-22 12:15:03.569 softwareupdate458 Loading CatalogURL http://xserve.fcaq.k12.ec:8088/index.sucatalog
    Software Update Tool
    Copyright 2002-2005 Apple
    Software Update found the following new or updated software:
    * iPhoto504-5.0.4
    iPhoto Update (5.0.4), 41980K recommended
    * JavaForMacOSX104Release7-1.0
    Java for Mac OS X 10.4, Release 7 (1.0), 82580K recommended
    * iTunesX-9.0.0
    iTunes (9.0.0), 87530K recommended
    * QuickTime-7.6.4
    QuickTime (7.6.4), 51340K recommended restart
    * RemoteDesktopAdmin33-3.3 v1.1
    Remote Desktop Admin Update (3.3 v1.1), 57530K recommended
    * SecUpd2009-005PPC-1.0
    Security Update 2009-005 (PowerPC) (1.0), 81690K recommended restart
    I hope you can help me... Thank you so much

    I have the exact same problem with two PowerMac G5's. I need to have full resolution on the remote G5 which has no monitor connected, but only get to choose between PAL and NTSC TV resolution. This is really annoying, and in my opinion a major bug in ARD 3.1 and below. Why is the user forced to see such a small remote window if the remote computer is capable of much more?

  • Send a Unix command through ARD that will change a OS X admin user to a standard user.

    I would love to send a Unix command through ARD that will change a OS X admin user to a standard user. The only thing I found close is
    sudo dscl . -delete /Groups/admin GroupMembership USERNAME
    which does remove the user from the list of admins, but they are still listed as an admin in the user preference panel, and can still use their account to authenticate for admin privileges.

    I'm not having any problems adding or removing users from the 'admin' group by using the syntax's
    dscl . -delete /Groups/admin GroupMembership ARDusername
    or
    dscl . -append /Groups/admin GroupMembership ARDusername
    What I'm saying is if a user is ticked as an Adminstrator in System Preferences and I run the
    dscl . -delete /Groups/admin GroupMembership ARDusername syntax and remove them from the 'admin' GroupMembership they still have the Administrator box ticked in System Prefs and can administer the machine.
    By the way the '/' doesn't work in the syntax in ARD.
    Thanks

  • ARD Unix Command install with root

    I'm a bit of a unix novice, I am trying to install a script file, 'install.sh', via ARD. Works fine in Terminal locally but I can't work out how to input the root password via the ARD unix command tool.
    cd Desktop
    chmod +x install.sh
    ./install.sh -i
    & set to run command as Root.
    I'm getting seemingly nonsense errors e.g. 'Error 127 sh: line 1: cd: Desktop: No such File or Directory' when the file is definitely there, on the desktop.
    I'm pretty sure it needs to enter the root pw in the code window, can anyone advise please?

    when you say install.sh is on the desktop of the remote computer. Is that the desktop for account root? Or is that the desktop of the current logged in users? (assuming the currently logged in user is not root)
    when you run a command as root you start at "/var/root/" there is only going to be a folder /var/root/desktop/, if you've used the login window at least ones to log into root.
    if the current user logged into the remote computer is another account, then your install.sh resides in another location. Witch will look some thing like this. /Users/nameOfUser/Desktop/install.sh
    try this. Send the command:
    cd Desktop
    pwd
    send the command first as the current logged in user, then as root. When you run it the first time, you should get some thing like  /Users/nameOfUser/Desktop/
    when you run it as root you'll probable see /var/root/.
    if you do then you would probable want to do some thing like
    chmod +x /Users/nameOfUser/Desktop/install.sh
    /Users/nameOfUser/Desktop/install.sh -i

  • Networksetup ARD Unix command - Joining AirPort loop

    Hi,
    I'm attempting to mass-set a bunch of iBooks to join a specific AirPort network with a WEP key.
    My understanding is with ARD, I can run the following unix command en masse:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setairportnetwork "myAirport" "aaaaa"
    Which returns: You cannot join a network when AirPort power is off.
    So I try to power on the AirPort:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setairportpower on
    Which Returns: You cannot set AirPort power because all AirPort network services are disabled.
    So I check to see what's actually enabled:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -listallnetworkservices
    An asterisk (*) denotes that a network service is disabled.
    Built-in Ethernet
    AirPort
    *Internal Modem
    *Bluetooth
    *Built-in FireWire
    Built-in FireWire
    808:/ root#
    Seems like the airport is enabled. So, lets check it specifically:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -getNetworkServiceEnabled AirPort
    Enabled
    Next I disable the network service and check that it is truly disabled:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setNetworkServiceEnabled AirPort off
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -getNetworkServiceEnabled AirPort
    Disabled
    Then re-enable it and power up the AirPort:
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setNetworkServiceEnabled AirPort on
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -getNetworkServiceEnabled AirPort
    Enabled
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setairportpower onYou cannot set AirPort power because all AirPort network services are disabled.
    Back to where we were.
    808:/ root# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/net worksetup -setairportnetwork "myAirport" "aaaaa"
    You cannot join a network when AirPort power is off.
    Any ideas? Basically I want to be able to set the airport and the wep en-mass via ARD. This seems like the logical place to accomplish it.
    Thanks!
    iBook G4 Mac OS X (10.4.7) ARD Client 3.1

    Hi
    I found this out a few weeks ago after trying for about 20-30 minutes or so. Won't be the first time manual pages were wrong or out-of-date, nor the last. Depending which OS you're running there are manual pages for utilities that don't exist any more. I remember ktrace disappearing in 10.5 yet the manual page was still available. Completely gone in 10.6.
    Tony

  • ARD-Unix Command for Energy Saver Settings

    I need to take out the schedule for turning on and off 100 + iMacs. The setup was done with managed preferences in OSX server but cannot be taken off now. Is there a way to turn this off using a unix command with ARD? I've been doing one by one with ARD!

    Use ARD to send the Unix command systemsetup -help
    This will return a bunch of different commands for you to look at that are related to power and energy saving settings. Make sure you send the command as the root user
    You can always read the man files for the pmset command using your Terminal app. Also check out this page too:
    http://www.hmug.org/man/1/pmset.php

  • Using ARD to send UNIX command to add item to dock

    The ARD 3 Admin Guide, page 132, says the following command sequence will install an item in the dock of the target computer(s):
    4) Type or paste the following UNIX command (replace /PathToApplication with your own path to the desired application, and be sure to include the application file extension, .app):
    defaults write com.apple.dock persistent-apps -array-add '<dict><key>tiledata</
    key><dict><key>file-data</key>
    <dict><key>CFURLString</key><string>/Path_ToApplication
    </string><key>_CFURLStringType</key><integer>0</integer></dict>
    </dict></dict>';killall -HUP Dock
    Use “persistent-others” instead of “persistent-apps” if the item is anything other than an application.
    I am unable to make it work. Could anyone help with the correct syntax or suggestions as to how to perform a remote addition to the target computer dock.

    Do you have JSS? I ask because your script contains the word JAMF allot.. if you do have a jss, is there a reason your trying to use ARD instead of your JSS to run this script?
    When issuing the script from ARD as a send unix command, Have you cosnidered using the option to run command as user "root" ?
    are you sure you want to do this? the script look like it dose more then just disable the isite. And do you know how to undo this if you change your mind?

  • Can this script be converted to a UNIX command for ARD?

    First I'd like to thank "Neil" again for providing the script below:
    set the_versions to (do shell script "mdls -name kMDItemVersion /Applications/Microsoft\\ Office\\ 2011/Microsoft\\ Excel.app")
    set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Adobe\\ Reader.app")
    set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Safari.app")
    set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Google\\ Chrome.app")
    set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Adobe\\ Acrobat\\ X\\ Pro/Adobe\\ Acrobat\\ Pro.app")
    set the_versions to the_versions & return & (do shell script "SW_vers")
    Output for this script yields exactly what I requested in the thread.  Ex:
    "kMDItemVersion = \"14.4.1\"
    kMDItemVersion = \"11.0.07\"
    kMDItemVersion = \"7.0.4\"
    kMDItemVersion = \"35.0.1916.114\"
    kMDItemVersion = \"10.1.10\"
    ProductName:          Mac OS X
    ProductVersion:          10.9.3
    BuildVersion:          13D65"
    I'd like to be able to run this command (or a variation) in Apple Remote Desktop (ARD) remotely, and as a UNIX command in order to generate a similar ARD report if possible.  Even better, I'd like the report to include the Application name and I'd like it to not to halt if an Application isn't present. My guess is that functionality like this for ARD would help a LOT of ARD Administrators because it would seem that the only way to do anything similar is to derive the metadata piecemeal (machine by machine) or end up having to wade through a ton of unwanted content using a full System Report...  Thanks.

    Forum software NOW prevents posting complete shell scripts. You'll have to piece together the code.
    First build an array of the applications that you are looking for in this form. Note; I truncated the applications.
    apps=( "/Applications/Microsoft Office 2011/Microsoft Excel.app" "/Applications/Adobe Reader.app" "/Applications/Safari.app" )
    Next loop thru the array
    for i in "${apps[@]}"; do
         printf "%s: %s\n" "$i" "$(mdls -name kMDItemVersion "$i")"
    done
    If you want to create a report then change the above loop to the following
    for i in "${apps[@]}"; do
         printf "%s: %s\n" "$i" "$(mdls -name kMDItemVersion "$i")"
    done > app_report.txt
    sw_vers >> app_report.txt
    Message was edited by: Mark Jalbert

  • ARD 3.6.1 remote log in Unix command failure

    Hello, I am using 10.7.5 and ARD 3.6.1 and cannot figure out how to remotely log in to another computer
    I wish to remotely log in using ARD to multiple computers in my network, up to 30 at a time for elementary students.  I can observe, control and send Unix commands to the machines when they are at startup log in screen or in use. This is the Unix command I am trying to use to log into the comptuer using ARD and Unix command function.
    osascript -e 'tell application "System Events" to keystroke "login"'; \
    osascript -e 'tell application "System Events" to keystroke tab'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke "password"'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke return'
    **and yes I am changing the login and password keystroke**
    I have tried the above Unix command and several others but I get a message saying "A console user is not logged in on “studnetmacbook""  so I click the button to run command as user admin but then get the message below. 
    36:50: execution error: An error of type -10810 has occurred. (-10810)
    36:49: execution error: An error of type -10810 has occurred. (-10810)
    36:54: execution error: An error of type -10810 has occurred. (-10810)
    36:52: execution error: An error of type -10810 has occurred. (-10810)
    36:52: execution error: An error of type -10810 has occurred. (-10810)
    Could someone explain these errors.  Is ARD not compatible with remote log in with the versions I have?  I have seen on sites this is posted and other sites that this needs to be run as the root user...Should I know how to run this as a root user and if so could someone help me with how to do this? 
    Or if anyone else has a working command could you share it with me for remotely logging in using ARD.
    Thanks!

    Hi
    Don't quite recognise what it is you're using. Maybe try:
    osascript <<EOF
    tell application "System Events"
    keystroke "whateverusernameyou'reusing"
    keystroke tab
    delay 0.5
    keystroke "whateverthepasswordis"
    delay 0.5
    keystroke return
    end tell
    EOF
    Instead. Works every time for me.
    The above are all on separate lines.
    HTH?
    Tony

  • How to run an applescript using unix command

    Hi All,
    Can any one help me in giving me the command for running an apple script thru postupgrade shell file in other words i wana run an apple script while running my new installer that will upgrade the old version of application but while installing i want to run an applescript so as i know ill have to give that applescript path in the postupgrade script but how to run it while installation and where to keep it (is it postupgrade). May be in short how can i run apple script thru unix command.

    Use the osascript command.
    In my installer, I use the DropDMG program to build my DMG disk image. It doesn't quit automatically, so I have to do the following:
    osascript -e "tell application \"DropDMG\" to quit"
    Type "man osascript" for more information.

Maybe you are looking for

  • Running a BSP on IDES 4.7 results in error.

    Hi, I created a very simple bsp application and been trying to run on IDES 4.7 EE, but ending up getting the following error. Any pointers on solving this is greatly appreciated. Thanks, -Chakri 500 Internal Server Error Internal Server Error(9) Erro

  • SOLVED: How can I use or call a function that returns %ROWTYPE?

    Hi edit: you can probably skip all this guff and go straight to the bottom...In the end this is probably just a question of how to use a function that returns a %rowtype.  Thanks. Currently reading Feuerstein's tome, 5th ed. I've downloaded and run t

  • My Macbook Pro is coming on and off

    My MacBook Pro Late 2008, Lion operating system, is coming on and off on its on without encouragement from me.  The other day I clicked on something when checking from some lost emails in (Yahoo an account I no longer use, but occasionaly emails end

  • Dynamic Filter Selection in CUIC Reports

    Hi, I have come up with a new requirement in CUIC where i need to provide dynamic selection on the filter criteria. Ex: Assuming in a report i need a filter criteria as agent name, call type and skill group which can be availble in drop down control.

  • HT2905 How to delete duplicates in iTunes 11?

    Is there a way to delete duplicate titles in iTunes 11? Either by a script, another app, or within iTunes itself? Thanks!