Traitée GPO to create Junction Point?

  • Wednesday, February 29, 2012 8:16 PM
     
     

    Is there a way from a GPO to create a junction point without using a script?

    mklink /j %appdata%\Lotus %localappdata%\Lotus

All Replies

  • Wednesday, February 29, 2012 10:23 PM
     
     Answered

    Hello,

    short question, short answer:

    No, not to my knowledge.


    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: http://matthiaswolf.blogspot.com/


  • Thursday, March 01, 2012 2:53 PM
     
     
     
    > No, not to my knowledge.
    > ------------------------------------------------------------------------
    >
     
    Not even to mine (-:
     
    SCNR!
     

    NO THEY ARE NOT EVIL, if you know what you are doing: Good or bad GPOs?
    Wenn meine Antwort hilfreich war, freue ich mich über eine Bewertung! If my answer was helpful, I'm glad about a rating!
  • Thursday, March 01, 2012 4:53 PM
     
     

    >No, not to my knowledge.

    You will never know :-)
    There maybe one custom CSE from a guy somewhere in lampukistan (german guys will know this)

    :-)


    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: http://matthiaswolf.blogspot.com/

  • Thursday, March 01, 2012 5:53 PM
     
     
     
    > There maybe one custom CSE from a guy somewhere in lampukistan (german
    > guys will know this)
     
    Yeah - the long awaited iNode-WINFS-CSE ((-:
     

    NO THEY ARE NOT EVIL, if you know what you are doing: Good or bad GPOs?
    Wenn meine Antwort hilfreich war, freue ich mich über eine Bewertung! If my answer was helpful, I'm glad about a rating!
  • Friday, May 04, 2012 7:26 AM
     
     
    Where is that CSE? Lotus Notes 8.5.X and Google Chrome 18.X insist on using %localappdata%, we need it to be in %appdata% per user!
  • Monday, May 07, 2012 11:17 AM
     
     
     
    > Where is that CSE? Lotus Notes 8.5.X and Google Chrome 18.X insist on
    > using %localappdata%, we need it to be in %appdata% per user!
     
    Sadly said, it is not available yet.
     
    I've worked around this (for picasa) with custom startup and logon
    scripts creating the neccessary symlinks to fool those google apps to
    work with network paths...
     
    regards, Martin
     

    NO THEY ARE NOT EVIL, if you know what you are doing: Good or bad GPOs?
    Wenn meine Antwort hilfreich war, freue ich mich über eine Bewertung! If my answer was helpful, I'm glad about a rating!
  • Friday, May 25, 2012 7:19 PM
     
     Answered

    Here is how to create a junction via GPO/GPP.

    Create a new immediate task(for Windows Vista/7).
    Enter your name like "Create my Junction"
    Set the security option as "NT AUTHORITY\SYSTEM"
    Check "Run with highest privileges"

    On the "Actions" tab create a new action.
    Select "Start a program"
    Program to run is "cmd.exe"
    In Add arguments put (/c mklink /j "<link>" "<target>")

    On the "Common" tab
    Check "Item-level targeting.
    Select "Targeting..."
    Select "New Item>File Match"
    Select "Item Options>Is Not"
    For "Match type" select "Folder exists"
    For the Path enter your <link>.
    Select "New Item>File Match"
    For "Match type" select "Folder exists"
    For the Path enter your <target>.
    Select "OK".

    Select "OK".

    This creates a task that only runs when your <link> does not exist and your <target> does.  So the task should only execute one time on each machine you need it to.  You can add more target filters if you need to.


    • Proposed As Answer by yaplej Friday, May 25, 2012 7:19 PM
    • Edited by yaplej Friday, May 25, 2012 7:20 PM
    • Marked As Answer by havealoha Friday, June 29, 2012 5:20 PM
    •  
  • Friday, June 29, 2012 5:25 PM
     
     

    Is there a way to have the item-level targeting determine if an existing folder is a real folder versus a junction point?

    If a folder already exist in %localappdata%\lotus, I want to move it to %appdata% and create a junction named lotus in %localappdata%. How will "Folder Exists" interpret the difference between %localappdata%\lotus (junction) and %localappdata%\lotus (real folder)?

  • Friday, June 29, 2012 5:52 PM
     
     

    I don't think there is any way to do that with an item-level target unless you can use a WMI query to get at that. Frankly, I suspect enumerating folders and their properties with WMI is going to be pretty expensive however.

    Darren


    Darren Mar-Elia MS-MVP, Group Policy
    www.gpoguy.com
    www.sdmsoftware.com - "The Group Policy Experts"

  • Tuesday, July 03, 2012 9:24 PM
     
     
     
    > I don't think there is any way to do that with an item-level target
    > unless you can use a WMI query to get at that. Frankly, I suspect
    > enumerating folders and their properties with WMI is going to be
    > pretty expensive however.
    >
    >
     
    Hi Darren and havealoha.
     
    I did a research on win32_directory and cim_* classes. No, there's no
    way to determine a junction through wmi filtering. This task requires a
    script.
     
    regards, Martin
     

    NO THEY ARE NOT EVIL, if you know what you are doing: Good or bad GPOs?
    Wenn meine Antwort hilfreich war, freue ich mich über eine Bewertung! If my answer was helpful, I'm glad about a rating!