Check for mounted DFS share with exists in apple script

OS: OSX Mountain lion.
Can any one advise how to detect if a DFS share is mounted or not?
I have been using the following code:
set volumeLabel to "R$"
tell application "Finder"
  exists disk volumeLabel
end tell
Which works fine with a normal SMB shares or attached hard drives but I cant get it to work with a DFS Share, it always returns false (see attached screen shot.
Also tried:
if volumeLabel is in (do shell script "/bin/ls Volumes") then
          return true
else
          return false
end if
Which didnt work with a DFS Share aswell.
Any help appreciated.
Cheers,
Richard

Hi,
Since you're checking to see if a value exists in the Desktop key, you can do something along these lines:
If (Get-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name SCRNSAVE.EXE -ErrorAction SilentlyContinue) {
Write-Output 'Value exists'
} Else {
Write-Output 'Value DOES NOT exist'
EDIT: Sam, what version of PowerShell are you running? Your code doesn't seem to work for me on v4:
PS C:\> Push-Location
Set-Location "HKCU:\Control Panel"
$Result = Test-Path -Path ".\desktop\SCRNSAVE.EXE"
Pop-Location
$Result
False
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing)

Similar Messages

  • Applescript for mounting Windows Shares

    I have scoured the web for this script for mounting windows shares in OS X. I am compiling it as an application and dropping it into the startup items:
    tell application "Finder"
    activate
    try
    mount volume "cifs://SERVER/SHARE"
    end try
    end tell
    My question is this: I have a MacBook(Pro) and use it at home and at work... I have scripts setup for both locations, to mount various shares, but when I'm at home and the work scripts run, they fail to mount (because I'm not on the work network), or when I'm at home, the work shares fail to mount, generating a dialog with something to the effect of "couldn't find that share"... I've got a dozen of these scripts, it would be nice if it would just silently fail, rather then generating multiple dialogs.
    I was thinking of making the apple script check my ip address, and if it returns a work IP address, then it would go onto talking to the finder, if it doesn't find a matching IP address, then it would just end.
    Or, somehow have applescript ping the server that it's trying to connect to, and on success, run the script, and on fail just end it.
    Any thoughts?
    Thanks,
    Dan Ormsby

    You should probably post in the AppleScript forums:
    http://discussions.apple.com/forum.jspa?forumID=724

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • I'm trying to use my iPad mini for the first time with a previous apple ID and password but it will not connect to iTunes but I can download apps from my iPhone using the same appleID and password and it works on my iphone...PLEASE HELP NOW

    I'm trying to use my iPad mini for the first time with a previous apple ID and password but it says "iTunes is not working try again"...it allowed me to download an app on my iPhone using the same apple ID & password but all my apps are in "Waiting Status" on my iPad mini because it says "iTunes is not working"...PLEASE HELP ME NOW!!!

    Previous user installed iOS 7 beta on that iPhone.
    Take it back and get your money returned. You
    are running into a new security feature. Whoever owns
    the ID that it is asking for is the only person who can
    remove the security. That iPhone is worthless to you.

  • App Store error: "This update is for an app downloaded with a different apple id"

    When trying to update PopClip, I get the following two errors:
    "This update is for an app downloaded with a different Apple ID. Sign in with that Apple ID and try again"
    After clicking OK, I receive the next error:
    "There was an error in the App Store. Please try again later. (100)"
    This app was not downloaded using a different Apple ID. I have been able to update other apps successfully.
    Any ideas?

    I keep getting error 100 when trying to download 1password4 updates

  • How do you update an apps on iPad when it says "this update is for an app downloaded with a different Apple ID.  I have tried both mine and my husbands ID and it still won't work?

    I have tried to update an apps on my mini iPad but it says this update is for an app downloaded with a diffrent Apple ID.  Sign in with that Apple ID and try again.  I have tried both mine and my husbands ID and it still does not work.

    We'll you can either do as Niel suggested, delete it and download it again with one of the two Apple ID's, or if you want to be sure that one of the two you actually bought the app, look in the purchased tab of the App Store when you are signed into your ID and see if the app shows up in there and if not, then sign into your husband's ID and see if the app shows up with his ID.
    After you you figure out who actually bought the app, use that ID to update it. If it still doesn't work, try signing out of that ID, restart the iPad, sign in again and try to update again.

  • HT1727 I am trying to sync my iPhone/iPad and I am getting a message "This update is for an app download with a different Apple ID.  Sign in with that ID and try again."  I have tried everthing including resetting my apple ID and password.  Ideas?

    I am trying to SYNC my iPhone and mine iPad and I am getting the message "
    This update is for an app download with a different Apple ID.  Sign in with that Apple ID and try again."  I do not have another apple ID.  I have tried everything including resetting my password.  Everything I can think of.  Ideas?

    Hi julia151,
    I would first use this article to make sure any extra Apple IDs were not accidentally created when signing up for one of Apple's services:
    Apple ID: Finding your Apple ID
    http://support.apple.com/kb/HT5625
    If you can't locate one, try using this article to delete and redownload your app:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/ht2519
    Cheers!
    - Ari

  • Error: This update is for an app downloaded with a different Apple ID. Sign in with that Apple ID and try again.

    I am trying to update iphoto but I have been receiving the error message "This update is for an app downloaded with a different Apple ID. Sign in with that Apple ID and try again." All other IDs I have had NO LONGER work or aren't activated. I deleted the current verison of iphoto, but it still won't work, so now I have no iphoto whatsoever...any ideas? my current ID is my ONLY ID I have.

    Apple Closed all other accounts and the logins DO NOT WORK!
    Apple would only have closed an account if you called Apple and formally requested that be done. Otherwise, the account is still there.
    I was able to delete my old apps and redownload them onto my computer which switch the Apple ID it was under, but I am not having the same luck with iPhoto.
    Those would have been free apps that you "bought" again using your new Apple ID. iPhoto is a paid app and Apple will not transfer it to a different Apple ID.

  • Mounting Remote Shares with the Same Name

    I am accessing shares on remote servers and can mount volumes with no problems initially, using command+k and setting the Server Address to smb://ServerNameOrIP/SharePoint. This mounts a volume with the name of the share point. The problem I've run into is at work I need to mount 2 volumes on 2 different servers with the same share point name. These are shared servers, and for unrelated reasons the folder names on either server can not be changed. This doesn't work well for me. It creates the first volume with the name "Share" and a second one that in finder appears to be called "Share" as well, but if I use "Get Info" or in Terminal run ls /Volumes I can see that it actually gets mounted as "Share-1".
    Is it possible to change the name of one (or both) of these mounts? Mostly so I can see which one I'm on when browsing though Finder. I changed some settings in Finder so that the title bar allows me to see whether I'm on "Share" or "Share-1" but that doesn't actually tell me what server I'm on. Any ideas?

    I just discovered this after trying frivolously to get 2 shares of the same name from 2 different NAS drives to auto mount ....
    limitation with autofs or something ? it should really be painless, as it is in windows. but it seems on the mac side, OS X won't allow shares with the same name to auto mount ....

  • Suggestion for installing 11gr2 crs with existing 10g crs...

    Hi, I need suggestions on installing 1120 rac on suse 11 where already 10g rac with asm is running. I need to upgrade the 10g crs and asm while installing 11g crs. Pls share your experience on these
    1- what are the challenges to run 10g database on 11gr2 crs? is this suggested?
    2- challenges to upgrade asm and crs to 11gr2.
    3- can we use 2 asm instance in 11g grid infra to manage 10g and 11g db separately.
    4-what could be back strategy for this kind of setup? RMAN?
    5-how many extra ip i need to install 11g crs with existing 10g crs . we plan to use 3 ip for scan.
    Also if possible please share any doc for this kind upgrade
    Thanks,
    Abhai

    1.) Yes this is o.k. Just see this MoS Note:
    Pre 11.2 Database Issues in 11gR2 Grid Infrastructure Environment (Doc ID 948456.1)
    2.) Well first only clusterware is upgraded. You will be asked if you want to upgrad ASM, but this is not mandatory at first.
    You can use ASMCA later to switch ASM from 10.2 to 11.2 (this does not have to be done during upgrade).
    3.) No you can only have 1 ASM running. So it is either 11.2 or 10.2 ASM. (However I suggest 11.2).
    However you can/should have multiple diskgroups. One data and fra for the 11.2 databases where you set the rdbms.compatibility to 11.2 to use the new features, and one data an fra diskgroup for the 10.2 databases.
    4.) As long as the compatibility setting of a diskgroup isn't changed, you can always switch ASM back to use 10.2 executables. (Just do a srvctl remove asm and add ASM).
    Search this forum - there has been another thread about this.
    Regarding fallback of clusterware => See installation guide.
    5.) Mandatory are just 3 additional IPs for the SCAN.
    Upgrade documentation see the installation guide of 11.2 GI.
    Upgrade for ASM see Storage Admin Guide.
    Upgrade to move OCR and Vote to ASM see Clusterware Admin Guide.
    Upgrade to database see Database Upgrade Guide
    Additionally look in MoS for the Upgrade Companion.
    Sebastian

  • HT201077 The photos I have transferred to my PC via Photo Stream are too large for me to share with friends.  How do I reduce the size and how do I share them with friends and family only?

    I have the latest iPad update on my Ipad 3 as of September 23, 2012. 
    I havejust  taken a series of photographs with my iPad that I would like to share with family and specific friends ONLY.  I have set up the photos I want to share in Photo Stream.  I have synced them to my PC via iCloud.  Everything is fine except, the pictures are far too large to share ... and I don't know what exactly I am supposed to do in order to give my family access to these Photo Stream pictures.
    How do I reduce the size of photo stream pictures once they are on my PC via iCloud?
    What exactly do I do to give access to the photos on Photo Stream to specific people?
    How can I share the videos I have taken with my iPad?
    Many thanks for your attention.  I look forward to your reply.

    Select your photo/s.
    File menu > Export..
    Kind: JPEG
    JPEG Quality: Maximum
    Include: [√] Title and keywords
                [√] Location information
    Size: Full Size
    File Name: Use filename
    Select one of the photos and open in with Preview.
    Tools menu > Show Inspector
    Under the second button choose IPTC and it is all there.
    Sorry for all the confusion.
    :^P

  • Check for Preview Builds failing with error 0x080240438

    Checking for Preview Builds on my two machines, one running 9860 and one running 9879, is failing with "Failed to check for new preview build, please try again later.  0x80240438.
    Tried stopping Windows Update Service and clearing down the c:\Windows\SoftwareDistribution cache but to no avail. Windows Update (check for updates rather than check for preview builds) working fine.
    As ever would be nice to hear from MS on this.

    Hi,
    This seems to be the issue with the server side and should be fixed already.
    Check the fred andrews's reply in this thread:
    Error Code 0x80240438
    Quoted:
    fred andrews    replied on  November 16, 2014
    I was just on the phone with  Microsoft support they told me that the servers are down and they are working on it. I was told they should be up by tomorrow morning approx.. 4 hrs. 
    Best regards
    Michael Shao
    TechNet Community Support

  • Availity Check for Customers and materials with useful life

    Hello All,
    Can anyone help me, about this issue . What i need to do to procedure to check availability for material and customers ?
    I have a problem , all material have a expired date ( i work in a drink company) , and for this all products have a date limit for delivery (period of useful product life) , but this date it can be changed for each customer.
    We have customer with one moth and another customer with differents (period of useful product life), and a priority for each customer.
    Well when i check availability of material i need to have a control of this period of useful product life, in order to assign confirmed quantity for each customer.
    Thanks
    Sebas

    Yes products use batch funcionality and i have a new table for customer / product with useful product life.
    For exemple :
    Product XXX with 365 days for Total Shelf Life .
    Have two customers with differents % of Total Shelf Life, customer AAA 33% and customer BBB 50%.
    Result:
    Customer AAA for product XXX need 120 days for availity Check
    Customer BBB for product XXX need 183 days for availity Check
    Where i could introduce search strategy for each customer ?
    Do you know user exit i need to change for availity check , in order to introduce my new table.
    Thanks a lot, for your help.
    Sebas

  • DFS Share with SCCM ??

    Hi All,
    Can we use a DFS Share in SCCM 2012 R2 for Update Package data source & for DP.
    Thanks,
    Pranay.

    Hi,
    Please refer to the thread below:
    DFS share for software distribution SCCM
    https://social.technet.microsoft.com/Forums/en-US/23b67594-f936-48ae-8ceb-d80ca47cc0d1/dfs-share-for-software-distribution-sccm?forum=configmanagerosd
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • HT204053 I have three IOS devices and would like to have separate iCloud IDs for each device, but I would to keep one Apple ID for iTunes that share with my spouse for purchasing.  Please help

    How do I create separate iCloud id for three of my IOS devices?
    1.  Iphone
    2.  Ipad
    3.  Macbook air

    If she doesn't have an iCloud account on her iPhone or iPad now, you can just go to Settings>iCloud and sign in with a different Apple ID to set up the new account, then turn on the data that you want to sync with iCloud.  She can continue to use the same ID for the App and iTunes store; it doesn't need to be the same as the the ID she uses for iCloud.
    If she is already sharing your iCloud account on her devices, you should go to Settings>iCloud on her phone, tap Delete Account (which only deletes the account from her phone, not from iCloud), when prompted choose Keep on My iPhone, then set up a new account by signing back in with a different Apple ID.  Then turn on the data she wants to sync with iCloud, and when prompted, choose Merge to upload her data to the new account.  After doing this on her phone, go to Settings>iCloud on her iPad, tap Delete Account, when prompted choose Delete from my iPad, then sign into the new account just created on her phone using the new ID and turn on her data syncing to sync the iCloud data in the new account to her iPad.  Finally, if you have any merged data in your accounts from sharing the original account, you'll need to go to icloud.com on your computer, sign into each iCloud account separately and delete the data you don't want from each account.

Maybe you are looking for

  • Error message with Publisher attachments in emails.

    When trying to open an MS Publisher document that's an email attachment, I get the following error message:  "Adobe Reader could not open xxxx.pub because it is either not a supported file type or because the file has been damaged (for example, it wa

  • Unknow error when sending mail (MS Exhange)

    Hello, Since yesterday I get the following message when i want to reply to a message or just want to send a new mail (MS Exchange) I allready did the restart / swap battery. Does anobody knows how to solve this problem ? Regards Post relates to: Pre

  • Change values of select option in fuction of the variant

    Hi abappers, I want change the data that contain several select-options. I have a table internal (c_varint) that I obtain with the next code: CALL FUNCTION 'RS_VARIANT_CONTENTS'      EXPORTING           report                = '/1BCDWB/DBBKPF'       

  • F-36 Bill of exchange msg "No clearing accounts specified for cocodes X/Y"

    Hi there, I have somebody from Receivables who clears customer invoices and book the draft using this transaction. We have 2 company codes and sometimes customers return to us a draft to pay eg. 3 invoices, 2 of which are in cocode X, 1 of which is i

  • User Exit with access to all line items in sales order

    Hi, Is there any user exit/BADI, where we have access to all line items at the same time? Thanks Kamal