Summary: This article analyzes why the WD My Passport for Mac drive is not mounting/working on Mac and how to fix this issue. If you worry about losing data, you can recover data from the WD hard drive with iBoysoft Data Recovery for Mac at first.
What is meant by mounting a WD My Passport drive on Mac?
The WD My Passport for Mac hard drive is specially designed for Mac mini computers, iMacs, MacBook Pro and MacBook Air. You can access My passport for Mac drives only when macOS recognizes the format of the drive. This process is called mounting.
Normally when you plug in an external hard drive to your Mac's USB port you will see it appear on the desktop (aka mount on the desktop). You can also see it in the Finder in the left column under. Mount.app mounts disk images much faster than Disk Copy. Features include: Mounts pretty much any disk image file Handles disk images that include license. Try MacDroid - easy and lightweight app to transfer files between Mac and Android. Stable and smooth solution to connect Android to Mac is not easy to find. Try MacDroid - easy and lightweight app to transfer files between Mac and Android. Mount Android as a disk on Mac Both internal and external storages of Android can be mounted. My NTFS disk diapppears for Desktop when using Mounty. Unfortunately this is by design. Mounty is using the Apple kernel driver. It allows read/write mount of NTFS drives only with the 'nobrowse' option. The mount point becomes hidden and disappears from Desktop and Finder menu.
However, once your computer fails to recognize that format (also known as file system), the WD My Passport for Mac hard drive is not mounting on Mac computer.
Why is WD My Passport for Mac not mounting?
WD hard drives, including My Passport and Easystore, won't mount on Mac when the disk format is not recognized. Such error could be caused by virus infection, sudden power failure, sudden power outage, unwanted interruption during transferring data, etc. Mana ki hum yaar nahi mp3 download. If the external hard drive won't mount, you can't open this WD My Passport for Mac drive and access your important files.
Here is one typical case from forums:
WD My Passport for Mac hard drive (2 TB) won't mount on my MacBook Air, grayed out in Disk Utility. I have 1 TB family photos on this hard drive, which are very precious for me. How to fix if WD My Passport for Mac not working on Mac? Any data recovery solution? Thanks a lot!
If you haven't got an effective workaround when WD My passport hard drive fails to mount in Finder or Disk Utility, this page will help. You'll know how to mount the Western Digital my passport drive on Mac again.
How to fix the unmounted WD My Passport hard drive on Mac?
The connected WD My Passport drive should be automatically mounted on the desktop, in Finder and Disk Utility. When it won't mount on Mac as you expect, you can try these methods.
1. Show the mounted WD My Passport for Mac hard drive on Mac destop
Sometimes, the My Passport drive is recognized and mounted by the Mac, and you just don't see it. You can go to Finder > Preferences and confirm if the 'External Disks' under 'Show these items on the desktop' is selected. This will ensure if the external drives connected to this Mac are allowed to show on the desktop.
But if your WD My Passport drive is not even showing up, it's reasonable that you can't see it mounting on Mac. Then, you shoud check the connections and some hardware issues.
![Mac os mount Mac os mount](/uploads/1/3/4/2/134217319/892670288.png)
2. Force Mount the WD Mac hard drive in Disk Utility
You can go to Utility and see if this hard drive appears in the left sidebar. If your WD My Passport for Mac drive for Mac is not mounting but grayed out in Disk Utility, you can right-click and select the 'Mount' button to force mount the hard drive. However, if this external hard drive is corrupted, the 'Mount' button will not be available and you need to try the next solution.
But sometimes, you can't mount a hard drive on Mac because of internal disk errors like file system corruption, partition table lost, the directory is corrupted, etc. You WD My Passport for Mac drive won't be recognized by your Mac in these cases. Fortunately, you can fix the hard drive not mounting issue with the native disk repair tool, First Aid.
3. Run First Aid to fix WD My Passport for Mac not mounting error
First Aid is a Mac built-in tool to verify and check minor problems of a hard disk. Whenever you can't mount a WD hard drive or My Passport for Mac is not working, First Aid should be a good disk repair tool.
Step 1: Go to /Applications/Utilities/Disk Utility/, then click Continue.
Step 2: In the sidebar, select the unmounted WD My Passport for Mac hard drive.
Step 3: Click the 'First Aid' button.
Step 4: Click Run.
If Disk Utility reports that the WD My Passport for Mac hard drive appears to be OK or has been repaired, you're done. Otherwise, this WD My Passport drive has been corrupted. You have to retrieve your data from this corrupted hard drive as soon as possible.
When those methods didn't make any difference and the WD My passport for Mac hard drive is not mounting still, you need to check some hardware issues that get involved in the disk connection.
Let's start with some basics factors.
4. Check the power supply of the WD My Passport for Mac drive
It's well known that insufficient or no power supply in USB ports could also lead to hard drive not mounting issue. Therefore, you should make sure the WD My Passport for Mac hard drive is getting the appropriate power. If the drive came with a Y-cable, use both USB connectors. Moreover, do not connect the drive through a USB hub, connect it directly to the Mac. Make sure the power adapter is connected directly to a wall outlet, not to an extension cord.
5. Check the USB cable
When external hard drive is not showing up on Mac, ensure the cable is properly connected to both the drive and computer. Then try connecting your WD My Passport for Mac hard drive with a new USB cable if you can fetch another one.
6. Check the USB port of your Mac
If the problem still continues, try using a different USB port. Perhaps your Mac has two USB port - the back and front ones. Assuming the My passport driveis plugged in the front USB port, try to insert the drive to the back USB port.
7. Check for driver update
If the hardware seems to be OK, let's check the software that related to this disk problem. The My passport disk driver, a software component, bridges the operating system and the drive to communicate with each other. But the files of My passport driver could be deleted, outdated, or corrupted for virus invasion or misoperation.
So, when the WD My Passport drive is not working or the external hard drive won't mount on Mac, check the disk driver.
Step 1: Click the Apple icon and select 'App Store…'
Step 2: Click Update (NOT UPGRADE!) to install a specific update or Update All to install all available updates.
Sometimes, WD My Passport for Mac driver, software, and WD disk tool are needed, especially when you want to open a WD My Passport for Mac drive that is locked. You can go to WD official website and download software for WD My Passport troubleshooting and for WD My Passport driver update.
How to fix WD My Passport for Mac hard drive not mounting error without losing data?
However, if WD My Passport for Mac hard drive still won't mount on Mac, the last solutions is to reformat the hard drive. But reformatting will delete all data stored on the hard drive, and most of the time, many important files are stored on the WD My Passport for Mac hard drive.
If you haven't backed up important files, how can you recover files from the WD My Passport drive? It's high time to recover lost data from the unmounted hard drive first.
Step 1: Recover lost data from unmountable hard drive with iBoysoft Data Recovery for Mac
As for Mac data recovery, iBoysoft Data Recovery for Mac is highly recommended as it's a free Mac data recovery software. It can easily retrieve files from WD Passport drives. This software can recover lost data from corrupted hard drive, unreadable hard drives, formatted hard drives, unrecognized hard drives, unmountable hard drives, inaccessible hard drives, and recover lost data from uninitialized hard drive. You can use this hard drive data recovery software on macOS Catalina 10.15/Mojave 10.14/High Sierra 10.13/10.12 Sierra and Mac OS X 10.11/10.10/10.9/10.8/10.7.
1. Free download and install iBoysoft Data Recovery for Mac.
2. Launch iBoysoft Data Recovery for Mac and select the unmounted WD My Passport for Mac hard drive.
3. Click 'Scan' to search for all lost files on this drive.
4. Preview the listed scanning results, choose files we want, and click 'Recover' button to get them back.
Hopefully, you'll get all your files off after the WD My Passport is not working nor mounting.
Step 2: Fix WD My Passport for Mac drive not mounting error by reformatting
After getting lost files back, you can fix WD My Passport for Mac hard drive not mounting error by reformatting without worrying about losing data. https://tieang.weebly.com/blog/mac-os-how-to-move-app-to-another-desktop. This will reset the WD My Passport hard drive.
• Guide to reformat WD My Passport for Mac external hard drive How to download apache netbeans on mac.
Conclusion
WD My passport for Mac hard drives always offer quick and easy way to expand the storage space of your computer. It has amazing features like cloud storage, password protection with hard drive encryption, and compatiblity with Apple's Time Machine backup software, so that you can store a massive amount of photos, videos, music and documents.
But the WD My Passport for Mac drive not mounting issue will call a halt on all these good things. You need to repair the WD My Passport for Mac that is not working or corrupted first, and recover data with the assistance of iBoysoft Data Recovery for Mac.
For any questions or suggestions, please email us below.
Automatically eject/mount disks on sleep/wake | 15 comments | Create New Account
Click here to return to the 'Automatically eject/mount disks on sleep/wake' hint |
The following comments are owned by whoever posted them. This site is not responsible for what they say.
After having to go around a year booting off an External HD, I've discovered that you don't need to do this with a FireWire HD. In my experience, you can even charge while it's unplugged. As long as you plug it back in before you wake from sleep there's no problem. For those interested, I was using an iBook G4 1 Ghz. I don't know if that makes a difference though. Also, it doesn't work if you have a USB device plugged in.
MacTipper
I haven't had this happen for wake/sleep in ages. Is this a 10.4 issue? Doesn't happen with external drives on my 10.5.2 macbook.
You might also be interested in these related scripts:
http://vocaro.com/trevor/blog/2007/02/11/a-set-of-scripts-to-unmount-drives-before-sleeping/
http://vocaro.com/trevor/blog/2007/02/11/a-set-of-scripts-to-unmount-drives-before-sleeping/
I have been using SleepWatcher, but I get very sporradic results. I have the following .sleep script in my home dir:
#!/bin/sh
/usr/sbin/diskutil eject /Volumes/Backup
The console shows that the .sleep is being executed, but the drive is not ejected and I get the 'Device Removal' error. If I run it manually, it works fine. I know the script actually runs.
I *think* I remember this working prior to 10.5.2. but I'm not sure. Any ideas?
#!/bin/sh
/usr/sbin/diskutil eject /Volumes/Backup
The console shows that the .sleep is being executed, but the drive is not ejected and I get the 'Device Removal' error. If I run it manually, it works fine. I know the script actually runs.
I *think* I remember this working prior to 10.5.2. but I'm not sure. Any ideas?
I'm not seeing this working under OS 10.5.2 either--it's not ejecting my USB flash drive, plugged into a USB hub--I still get the 'Device Removal' error when I wake the Mac from sleep.
. you have to manually eject all your devices, otherwise you get that dreaded 'Device Removal' dialog. . When the machine wakes again, all connected external drives will be reconnected.
Nice work around. But. even though you're using a laptop, should you even be having that problem?
This was happening to me with the new external USB drive which I specifically purchased specifically to use for Time Machine on my new 24 inch iMac. Not only did I have to dismount the drive, I had to turn it OFF. Defeats the whole concept of Time Machine working transparently. I returned the defective drive to be replaced. Problem solved.
I had a similar problem when my iPod mini interfering with waking my PowerMac G4 from sleep. That problem also went away though I can't recall whether it was a bad add-on extension or bad chaining of USB hubs.
---
'Where's my other sock?' - A. Einstein https://tieang.weebly.com/free-unzip-app-mac.html.
'Where's my other sock?' - A. Einstein https://tieang.weebly.com/free-unzip-app-mac.html.
Hi, now how can I remove all this?
I don't know if it's because I'm running 10.5.2 but this mod works erratically. When I close my laptop's lid, it can take a couple of minutes before it fall asleep and sometimes the (Firewire) HD gets unmounted and sometimes not. Why? So, if I want to remove all those files I must find them:
Where are these files :
The .sleep and .awake script files are on the ~/ folder.
I can use Terminal's
The .sleep and .awake script files are on the ~/ folder.
I can use Terminal's
rm
command to delete these script filesNow, for the Bernhard Baehr's SleepWatcher utility, two installers where used:
The SleepWatcher StartupItem seems to be installed in Library/StartupItem/
But where is the sleepwatcher file ?
Is it in /usr/local/sbin/ ?
Is there other files in other places?
The SleepWatcher StartupItem seems to be installed in Library/StartupItem/
But where is the sleepwatcher file ?
Is it in /usr/local/sbin/ ?
Is there other files in other places?
Thanks for your help.
Ooops! I meant '. .wakeup script.'.
From the installer:
SleepWatcher Installer:
This package installs the following files:
/usr/local/sbin/sleepwatcher - the sleepwatcher command
/usr/local/share/man/man8/sleepwatcher.8 - manual page for sleepwatcher
SleepWatcher StartupItem Installer
This package installs the following files:
/Library/StartupItems/SleepWatcher - startup script for the sleepwatcher daemon
/etc/rc.sleep - system wide script executed by the sleepwatcher daemon when the Mac goes to sleep mode
/etc/rc.wakeup - system wide script executed by the sleepwatcher daemon when the Mac wakes up from sleep mode
Delete these files and you should be good to go.
SleepWatcher Installer:
This package installs the following files:
/usr/local/sbin/sleepwatcher - the sleepwatcher command
/usr/local/share/man/man8/sleepwatcher.8 - manual page for sleepwatcher
SleepWatcher StartupItem Installer
This package installs the following files:
/Library/StartupItems/SleepWatcher - startup script for the sleepwatcher daemon
/etc/rc.sleep - system wide script executed by the sleepwatcher daemon when the Mac goes to sleep mode
/etc/rc.wakeup - system wide script executed by the sleepwatcher daemon when the Mac wakes up from sleep mode
Delete these files and you should be good to go.
deeply deeply confused by this hint. I've used my powerbook with several externals for years (from 10.3 to 10.5) and I never had to eject the external drives before closing the lid.
Hey, thanks Mount Disk Mac App Installer
djc0.Besides, Bernhard Baehr, the SleepWatcher's developer, replied me on this too. Here's his recommendations: . removing SleepWatcher is very simple:
Drag /Library/StartupItems/SleepWatcher to the trash. This removes the startup item, and with the next restart, SleepWatcher is deactive. To remove the Unix components, you have to execute the following command in a Terminal window:
sudo rm -f /usr/local/sbin/sleepwatcher /usr/local/share/man/man8/sleepwatcher.8 /etc/rc.wakeup /etc/rc.sleep
But it doesn't matter to let these files installed, they do nothing than occupying less then 20 kB of disk space.
So, it was very simple and worked to solve the long sleep delay of my PowerBook and the errors monitored in Console. Now it's clean. unfortunately because I would have liked the mod to work (I thought I could unplug a FW HD when the PB's in sleep with this tweak). Slight problems with this tip..
1) It doesn't work, the device eject warning still occurs.
2) It increases the amount of time your mac takes to sleep by alot!
3) It creates a whirly sound on wake, hoorah!
Otherwise useless, now, can someone please advise on how to reverse the changes? I would be very grateful.
MBP2.4
Thanks
1) It doesn't work, the device eject warning still occurs.
2) It increases the amount of time your mac takes to sleep by alot!
3) It creates a whirly sound on wake, hoorah!
Otherwise useless, now, can someone please advise on how to reverse the changes? I would be very grateful.
MBP2.4
Thanks
Mac Terminal Mount Disk
Imvu download mac. I recently purchased a SmartStrip power outlet for my computer setup to turn off devices when the computer went to sleep.
It worked - except for my Hitachi Simpletech 2GB drive. The external drive has a 'power on auto' feature where you plug it into the wall and then into to the computer and only when both the wall outlet and the computer are on does the drive come on.
When the computer went to sleep the Powerstrip would turn off power to the hard drive and the USB port on the Mac would sense that the drive was removed and it would trigger some sort of event where the computer would immediately wake from sleep and I'd get a Device Removal Warning.
I then plugged the external drive into one of the 'Always Powered' outlets, but it had the same issue.
I downloaded SleepWatcher (http://www.bernhard-baehr.de/) and installed SleepWatcher and the Sleepwatcher start-up items program.
I created a file in my home directory as named .sleep and chmod r+x it. (note this thread kept talking about Desktop/.sleep , it should be in your home directory which is commonly refereed to as '~' or something like /bootdrive/usr/yourusername)
.Sleep contained the following command:
osascript -e 'tell application 'Finder' to eject '2TB'
Where 2TB was the name of my external drive.
When the computer went to sleep Sleepwatcher started and finder started to eject the drive and the computer went to sleep. The drive did not completely unmount before the computer went to sleep and it triggered some event that would wake up the Mac. The external drive would turn on and mount again with the Device Removal Warning effectively stopping sleep.
So I modified .sleep to contain:
osascript -e 'tell application 'Finder' to eject '2TB'
osascript -e 'tell application 'Finder' to delay 10'
Now the drive unmounts, finder waits 10 seconds and then the computer sleeps. It works like a charm.
I created a file called .wakeup that contains:
#!/bin/bash
backupsVolume=`diskutil list | awk '/ 2TB / {print $6}'`
Cac card middleware download for mac. if [ ! -z '$backupsVolume' ]
then
diskutil mount $backupsVolume
fi
This mounts the drive when the computer wakes from sleep.
Thank you to Sleepwatcher, this thread, and Finity.org (http://www.finity.org/node/41) for helping me with this.
P.S. I am running this on a Mac pro with Snow Leopard.
It worked - except for my Hitachi Simpletech 2GB drive. The external drive has a 'power on auto' feature where you plug it into the wall and then into to the computer and only when both the wall outlet and the computer are on does the drive come on.
When the computer went to sleep the Powerstrip would turn off power to the hard drive and the USB port on the Mac would sense that the drive was removed and it would trigger some sort of event where the computer would immediately wake from sleep and I'd get a Device Removal Warning.
I then plugged the external drive into one of the 'Always Powered' outlets, but it had the same issue.
I downloaded SleepWatcher (http://www.bernhard-baehr.de/) and installed SleepWatcher and the Sleepwatcher start-up items program.
I created a file in my home directory as named .sleep and chmod r+x it. (note this thread kept talking about Desktop/.sleep , it should be in your home directory which is commonly refereed to as '~' or something like /bootdrive/usr/yourusername)
.Sleep contained the following command:
osascript -e 'tell application 'Finder' to eject '2TB'
Where 2TB was the name of my external drive.
When the computer went to sleep Sleepwatcher started and finder started to eject the drive and the computer went to sleep. The drive did not completely unmount before the computer went to sleep and it triggered some event that would wake up the Mac. The external drive would turn on and mount again with the Device Removal Warning effectively stopping sleep.
So I modified .sleep to contain:
osascript -e 'tell application 'Finder' to eject '2TB'
osascript -e 'tell application 'Finder' to delay 10'
Now the drive unmounts, finder waits 10 seconds and then the computer sleeps. It works like a charm.
I created a file called .wakeup that contains:
#!/bin/bash
backupsVolume=`diskutil list | awk '/ 2TB / {print $6}'`
Cac card middleware download for mac. if [ ! -z '$backupsVolume' ]
then
diskutil mount $backupsVolume
fi
This mounts the drive when the computer wakes from sleep.
Thank you to Sleepwatcher, this thread, and Finity.org (http://www.finity.org/node/41) for helping me with this.
P.S. I am running this on a Mac pro with Snow Leopard.
So apparently the SleepWatcher appears to be a not so 'easy' fix for the unmounting before sleep problem.
One work around is to use the automator to create an icon you can place on the desktop to put the system to
sleep. This automator sequence can be configured to be run automatically with systems that have auto-sleep as well.
Here is the sequence:
- Step 1: Automator uses Finder to identify the drive(s) you wish to unmount prior to sleep
- Step 2: Automator uses the 'Eject Disk' command to eject all the drives you specified
- Step 3: Run the following applescript:
tell application 'System Events'
sleep
end tell
Save this as an appropriate application, workflow, or plug-in and use accordingly.
Works consistently, reliably, and uses the under appreciated Automator app. :)
Hope this helps!
One work around is to use the automator to create an icon you can place on the desktop to put the system to
sleep. This automator sequence can be configured to be run automatically with systems that have auto-sleep as well.
Here is the sequence:
- Step 1: Automator uses Finder to identify the drive(s) you wish to unmount prior to sleep
- Step 2: Automator uses the 'Eject Disk' command to eject all the drives you specified
- Step 3: Run the following applescript:
tell application 'System Events'
sleep
end tell
Save this as an appropriate application, workflow, or plug-in and use accordingly.
Works consistently, reliably, and uses the under appreciated Automator app. :)
Hope this helps!
MAC Automatically Mount Net Drives on WAKE or START UP
For Beginners like ME, Using SLEEPWATCHER and creating the '.wakeup' file
I am new to MAC but have final figured this out how to set up SLEEPWATCHER using this site. Thanks to the people here and lots of reading. Got the SLEEPWATCHER loaded. Installing SLEEPWATCHER is not that user friendly to new MAC users, but take your time and go through it, the instructions are pretty good.
As for creating the '.wakeup' file, I created 'wakeup.txt' in one directory and copied it to ~/
using the following lines of code and copying the code into TERMINAL
Create 'sleep.txt' and 'wakeup.txt' anywhere on your computer. The simplest might be in the head directory ~/ but it really doesn't matter.
Here is the code I used for my 'wakeup.txt' file. I use it to remount my external net drive.
__start code below line_______________________________
#!/bin/sh
exec <'$0' || exit; read v; read v; exec /usr/bin/osascript - '$@'; exit
delay 10
set testnet to 1
repeat with idx from 1 to 5
try
set ping_result to (do shell script 'ping -c 1 -t 1 192.168.20.70')
set testnet to 10
on error
if testnet = 1 then
say 'Searching for W Net Drive'
end if
beep 3
set testnet to (testnet + 1)
delay 10
end try
if testnet = 10 then
exit repeat
end if
end repeat
if testnet = 10 then
delay 1
mount volume 'smb://W-NetDrive/Volume_1'
say 'Net Drive Volumes Mounted'
end if
if testnet = 6 then
say 'The W Net Drive could not be PINGED on the network'
say ' I am unable to mount the W Drive Volumes'
end if
___________________________
end code above line
As a minimum, you need to make these two changes to the above code or it will not work for you.
1) You will need to change the IP address (192.169.20.70) on line 7 (as shown below)
set ping_result to (do shell script 'ping -c 1 -t 1 192.168.20.70')
to match the IP address on your Net Drive or the script cannot PING the Net Drive.
2) You will also need to edit the 7th last line (as shown below)
mount volume 'smb://W-NetDrive/Volume_1'
to reflect you own net drive name, or the net drive will not mount.
Further to that, you can easily remove the computer's talking if you want. Simply delete all the lines that start with 'say'. However, this only occurs at 'wake up' so it is nice to know what is going on, but edit it as you see fit.
The way this works, is that the first two lines of code (as follows)
#!/bin/sh
exec <'$0' || exit; read v; read v; exec /usr/bin/osascript - '$@'; exit
should not be revised as they set up the rest of the script to be able to process APPLESCRIPT.
(need more infer. see http://hints.macworld.com/article.php?story=20060425140531375)
Hooray!! I don't need to learn shebang and all that other complicated programming stuff.
After the first two lines, you can simply program away in APPLESCRIPT. Use your APPLESCRIPT editor to ensure the code is correct, the copy/paste your APPLESCRIPT into your 'wakeup.txt' or 'sleep.txt' file, after the first two lines of code (as noted above).
Then you need to rename the '.txt. files as follows
wakeup.txt to .wakeup
sleep.txt to .sleep
Place the new '.' files in the head directory ~/
Then you need to change the '.wakeup' and '.sleep' file permissions to executable.
I did that this way.
__________________________________________
Enter the following text into TERMINAL to rename files and create the hidden '.' files.
I just copied in one line of code at a time.
FOR .SLEEP
cd ~/
cp ~/documents/data-k/W_NetDrive_PING/sleep_and_wake_files/sleep.txt ~/.sleep
chmod a+x .sleep
FOR .WAKEUP
cd ~/
cp ~/documents/data-k/W_NetDrive_PING/sleep_and_wake_files/wakeup.txt ~/.wakeup
chmod a+x .wakeup
Basically its
cp path/to/file.txt ~/.wakeup
This copies the file to the ~/ directory and changes the name in one command.
Then change the permissions using
chmod a+x .wakeup
________________________________________________
This works great !
so.Place your computer into SLEEP, then WAKE it up. Your NetDrive should mount automatically and inform you that it should now be mounted. If it cannot be found in order to mount it, it will also tell you that. Change it to what ever you want it to say.
Oh, at this point in time I actually only use '.wakeup', I have not set up anything in '.sleep'
________________________________________________
As for mounting the drives on START UP I use a similar APPLESCRIPT as follows. Using my APPLESCRIPT Editor I created the following script.
____Script starts below the line___________________
set testnet to 1
repeat with idx from 1 to 5
try
set ping_result to (do shell script 'ping -c 1 -t 1 192.168.20.70')
set testnet to 10
on error
beep 3
set testnet to (testnet + 1)
delay 10
end try
if testnet = 10 then
exit repeat
end if
end repeat
if testnet = 10 then
delay 1
mount volume 'smb://W-NetDrive/Volume_1'
say 'Net Drive Volumes Mounted'
end if
if testnet = 6 then
say 'The W Net Drive could not be PINGED on the network'
say ' I am unable to mount the W Drive Volumes'
end if
____________________________________
script ends above the line
In the APPLESCRIPT Editor I save the file as 'W-PING.scpt', then re-save the file only this time changing the FILE FORMAT to APPLICATION and as 'W-PING.app'
This file 'W-PING.app' is now executable, (if not change it as above, but I think it become executable as soon as it is saved as an '.app' file extension.)
Then go into the APPLE SYSTEM PREFERENCES
Go to category SYSTEM and find 'USERS & GROUPS' and open it.
On the left hand side you will see the 'Current User', and click on it.
On the right hand side at the top look for 'Login Items' and click on it.
You will see some apps that automatically open when logging in.
Below the box you will see a '+|-' box, go click on the '+'
direct the window to the 'W-PING.app' file or what ever you decided to call it and then click 'ADD'
Repeat this for which ever Users need the Net Drive automatically loaded. You will have to be logged in as them in order to be able to change their start up programs at login.
!!!!!!!!!!!!!!!!!!
Hooray, you are done! You computer will now remount the NetDrive Volumes at both START UP and WAKE.
At least it has all worked for me.
I know there are likely other ways of doing this, but this worked for me so I wanted to share it to save other beginners a bunch of hours trying to figure this out. Just as a though, you may also have to copy the W-PING.app file to a location in their User profile where they can find it and set it up as an application to open at START UP.
Good Luck!
I am new to MAC but have final figured this out how to set up SLEEPWATCHER using this site. Thanks to the people here and lots of reading. Got the SLEEPWATCHER loaded. Installing SLEEPWATCHER is not that user friendly to new MAC users, but take your time and go through it, the instructions are pretty good.
As for creating the '.wakeup' file, I created 'wakeup.txt' in one directory and copied it to ~/
using the following lines of code and copying the code into TERMINAL
Create 'sleep.txt' and 'wakeup.txt' anywhere on your computer. The simplest might be in the head directory ~/ but it really doesn't matter.
Here is the code I used for my 'wakeup.txt' file. I use it to remount my external net drive.
__start code below line_______________________________
#!/bin/sh
exec <'$0' || exit; read v; read v; exec /usr/bin/osascript - '$@'; exit
delay 10
set testnet to 1
repeat with idx from 1 to 5
try
set ping_result to (do shell script 'ping -c 1 -t 1 192.168.20.70')
set testnet to 10
on error
if testnet = 1 then
say 'Searching for W Net Drive'
end if
beep 3
set testnet to (testnet + 1)
delay 10
end try
if testnet = 10 then
exit repeat
end if
end repeat
if testnet = 10 then
delay 1
mount volume 'smb://W-NetDrive/Volume_1'
say 'Net Drive Volumes Mounted'
end if
if testnet = 6 then
say 'The W Net Drive could not be PINGED on the network'
say ' I am unable to mount the W Drive Volumes'
end if
___________________________
end code above line
As a minimum, you need to make these two changes to the above code or it will not work for you.
1) You will need to change the IP address (192.169.20.70) on line 7 (as shown below)
set ping_result to (do shell script 'ping -c 1 -t 1 192.168.20.70')
to match the IP address on your Net Drive or the script cannot PING the Net Drive.
2) You will also need to edit the 7th last line (as shown below)
mount volume 'smb://W-NetDrive/Volume_1'
to reflect you own net drive name, or the net drive will not mount.
Further to that, you can easily remove the computer's talking if you want. Simply delete all the lines that start with 'say'. However, this only occurs at 'wake up' so it is nice to know what is going on, but edit it as you see fit.
The way this works, is that the first two lines of code (as follows)
#!/bin/sh
exec <'$0' || exit; read v; read v; exec /usr/bin/osascript - '$@'; exit
should not be revised as they set up the rest of the script to be able to process APPLESCRIPT.
(need more infer. see http://hints.macworld.com/article.php?story=20060425140531375)
Hooray!! I don't need to learn shebang and all that other complicated programming stuff.
After the first two lines, you can simply program away in APPLESCRIPT. Use your APPLESCRIPT editor to ensure the code is correct, the copy/paste your APPLESCRIPT into your 'wakeup.txt' or 'sleep.txt' file, after the first two lines of code (as noted above).
Then you need to rename the '.txt. files as follows
wakeup.txt to .wakeup
sleep.txt to .sleep
Place the new '.' files in the head directory ~/
Then you need to change the '.wakeup' and '.sleep' file permissions to executable.
I did that this way.
__________________________________________
Enter the following text into TERMINAL to rename files and create the hidden '.' files.
I just copied in one line of code at a time.
FOR .SLEEP
cd ~/
cp ~/documents/data-k/W_NetDrive_PING/sleep_and_wake_files/sleep.txt ~/.sleep
chmod a+x .sleep
FOR .WAKEUP
cd ~/
cp ~/documents/data-k/W_NetDrive_PING/sleep_and_wake_files/wakeup.txt ~/.wakeup
chmod a+x .wakeup
Basically its
cp path/to/file.txt ~/.wakeup
This copies the file to the ~/ directory and changes the name in one command.
Then change the permissions using
chmod a+x .wakeup
________________________________________________
This works great !
so.Place your computer into SLEEP, then WAKE it up. Your NetDrive should mount automatically and inform you that it should now be mounted. If it cannot be found in order to mount it, it will also tell you that. Change it to what ever you want it to say.
Oh, at this point in time I actually only use '.wakeup', I have not set up anything in '.sleep'
________________________________________________
As for mounting the drives on START UP I use a similar APPLESCRIPT as follows. Using my APPLESCRIPT Editor I created the following script.
____Script starts below the line___________________
set testnet to 1
repeat with idx from 1 to 5
try
set ping_result to (do shell script 'ping -c 1 -t 1 192.168.20.70')
set testnet to 10
on error
beep 3
set testnet to (testnet + 1)
delay 10
end try
if testnet = 10 then
exit repeat
end if
end repeat
if testnet = 10 then
delay 1
mount volume 'smb://W-NetDrive/Volume_1'
say 'Net Drive Volumes Mounted'
end if
if testnet = 6 then
say 'The W Net Drive could not be PINGED on the network'
say ' I am unable to mount the W Drive Volumes'
end if
____________________________________
script ends above the line
In the APPLESCRIPT Editor I save the file as 'W-PING.scpt', then re-save the file only this time changing the FILE FORMAT to APPLICATION and as 'W-PING.app'
This file 'W-PING.app' is now executable, (if not change it as above, but I think it become executable as soon as it is saved as an '.app' file extension.)
Then go into the APPLE SYSTEM PREFERENCES
Go to category SYSTEM and find 'USERS & GROUPS' and open it.
On the left hand side you will see the 'Current User', and click on it.
On the right hand side at the top look for 'Login Items' and click on it.
You will see some apps that automatically open when logging in.
Below the box you will see a '+|-' box, go click on the '+'
direct the window to the 'W-PING.app' file or what ever you decided to call it and then click 'ADD'
Repeat this for which ever Users need the Net Drive automatically loaded. You will have to be logged in as them in order to be able to change their start up programs at login.
!!!!!!!!!!!!!!!!!!
Hooray, you are done! You computer will now remount the NetDrive Volumes at both START UP and WAKE.
At least it has all worked for me.
I know there are likely other ways of doing this, but this worked for me so I wanted to share it to save other beginners a bunch of hours trying to figure this out. Just as a though, you may also have to copy the W-PING.app file to a location in their User profile where they can find it and set it up as an application to open at START UP.
Good Luck!