In Active directory, create for all user's a shortcut to a dial-up or vpn connection on the desktop

Discussion in 'Active Directory' started by MSH, Nov 17, 2008.

  1. MSH

    MSH Guest

    hello,

    in AD, How can create for all user's a shortcut to a dial-up or vpn
    connection on the desktop.

    MSH
    Thanks
     
    MSH, Nov 17, 2008
    #1
    1. Advertisements

  2. MSH

    Greg Stigers Guest

    Create the shortcut (say VPN.lnk), and copy it to a network location (say
    \\yourdomain\DFS\).

    Assuming you do not already have one, create a start-up script:
    IF NOT EXIST "%ALLUSERSPROFILE%\DESKTOP\VPN.lnk" %windir%\system32\xcopy.exe
    \\yourdomain\DFS\VPN.lnk "%ALLUSERSPROFILE%\DESKTOP\"

    Still assuming you do not already have one, create a group policy to assign
    this script to the computers which should have it. It is a good idea to
    choose as subset of computers (such as your own IT group) as the first group
    to which you assign this script.

    Some helpful articles:
    http://technet.microsoft.com/en-us/library/bb742536.aspx
    http://technet.microsoft.com/en-us/library/cc722569.aspx

    This does not address the ability of any user to edit the link on All Users'
    desktop.

    ______
    Greg Stigers, MCSE
    remember to vote for the answers you like
     
    Greg Stigers, Nov 17, 2008
    #2
    1. Advertisements

  3. MSH

    msh Guest

    Hello

    Line: 1
    Char: 14
    Error: Expected 'Then'
    Code: 800A03f9
    Source: Microsoft VBScript compilation error

    I change it to this
    1-
    IF NOT EXIST "%ALLUSERSPROFILE%\DESKTOP\PPPoE.lnk" then
    %windir%\system32\xcopy.exe \\adsrv\readonly\PPPoE.lnk
    "%ALLUSERSPROFILE%\DESKTOP\"

    But don't work

    2-
    %windir%\system32\xcopy.exe \\adsrv\readonly\PPPoE.lnk
    "%ALLUSERSPROFILE%\DESKTOP\"

    Line: 1
    Char: 14
    Error: Invalid character
    Code: 800A0408
    Source: Microsoft VBScript compilation error

    MSH
    Thanks
     
    msh, Nov 19, 2008
    #3
  4. MSH

    Greg Stigers Guest

    That's an old fashioned batch file (.bat or .cmd), not a VB Script. It could
    be scripted in VB using the same basic ideas. You could also just use the
    batch file, especially if you do not have a startup or logon script.

    You did specify "In Active Directory". We can quibble over whether or not
    the following is "In Active Directory", or if the question or answer belongs
    in the scripting forum. But the following command line (not a batch file)
    will work for all Windows systems that are visible (and will miss any that
    are, for instance, powered off when you run this):
    for /F "usebackq" %a in (`net view`) do if exist %a\c$
    %windir%\system32\xcopy.exe \\yourdomain\DFS\VPN.lnk "%a\c$\Documents and
    Settings\All Users\DESKTOP\"

    "net view" has two lines of output that are not system names; testing for
    "exist" works around that. This * will * pick up all visible Windoes
    systems, including servers. If you want to use this in a batch file, use %%
    instead of %.
    ______
    Greg Stigers, MCSE
    remember to vote for the answers you like
     
    Greg Stigers, Nov 24, 2008
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.