Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Shutting down over a network via AppleScript

Shutting down over a network via AppleScript
Thread Tools
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Oct 16, 2000, 04:14 PM
 
I made a very simple script to restart a computer on my network. But becuase it's on my network, it gets a dialog telling me users are connected, and it asks me how long till i disconnect them. It won't continue the shutdown/restart until this dialog is taken care of, there by bypassing the whole point of the script, to not have to touch or be in the same room as the computer. Any ideas?

------------------
I see dead people.
     
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Oct 17, 2000, 11:07 AM
 
First thought is for a non-AppleScript solution...

Okey Dokey Pro is a system extension you can install on your machine. It will automatically click any dialog's OK button after a preset interval. That way, even if the dialog does appear, Okey Dokey Pro will click Ok for you if you're not there.
Gods don't kill people - people with Gods kill people.
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Oct 17, 2000, 02:40 PM
 
There got tobe a way to take care of this either within the script or through some filsharing preference some where

------------------
I see dead people.
     
Mac Elite
Join Date: Dec 1999
Location: Decatur, GA
Status: Offline
Reply With Quote
Oct 18, 2000, 08:59 AM
 
First, you need to determine which app is generating the dialog. Then add a:
Tell application "Whatever"
Quit
End Tell
statment to your script. You can determine this by downloading a program called "MemMapper". It works like the Process Viewer in OS X, and list everything running on your system, names, memory used, etc. It's very handy.

Anyway, if you quit the app before you send the "restart" command, the dialog box is circumvented.

One word of caution, there is a reason why you get the dialog. You could possibly harm other computers, especially if they are using a shared file. You might also want to look into scripting the app that generates the dialog.

I'm thinking that the File Sharing extension handles this, you can open it in the Script Editor (via the Open Dictonary command) to get a list of commands you can use to automate it. Add these to your script and you're set.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2