Changing Desktop from AppleScript

Is there a way change a users desktop without opening prefs, from applescript?

ie:

set current user desktop to “Mac HD/Users/Bob/Pictures/My pics/My desktop.jpg”

Hi,

You can use the Finder property ‘desktop picture’.

set user_pic to (choose file with prompt “Choose a desktop picture:”)
tell application “Finder” to set desktop picture to user_pic

Note that you can limit the user’s choices to certain file types when using the ‘choose file’ command with the ‘of type’ parameter.

gl,

Thanks!