none
Variables in Preference Items - Server 2012 R2

    Question

  • Hi,



    I'm trying to use Group Policy Preferences to deploy BGInfo to servers and computers.

    I've got bginfo.exe and bginfo.bgi files in the NETLOGON\Scripts dir
    A GPO linked to the relevant OUs

    GPO is configured as:
    Computer>Preferences>Windows Settings>Folders> CREATE RELEVANT FOLDER STRUCTURE
    Computer>Preferences>Windows Settings>Files> PLACES FILES FROM SHARE IN FOLDER CREATED
    Computer>Preferences>Windows Settings>Shortcuts> as below;

    Target type File system object
    Shortcut path %CommonStartUpDir%\BGInfo 
    Target path c:\apps\bginfo\bginfo.exe 
    Arguments c:\apps\bginfo\bginfo.bgi /SILENT /TIMER:0 /NOLICPROMPT 


    The first part works perfectly, when the gpo runs the folders and files get created no problem. However, the startup item does not. I'm wondering about the variable being called %CommonStartUpDir%, does this work for 2012 R2? The article on TechNet only references 2012, not R2 (https://technet.microsoft.com/en-us/library/cc753915(v=ws.11).aspx)

    Any help would be much appreaciated, going round in cirles with this one :S

    Adam
    Tuesday, June 21, 2016 2:06 PM

Answers

  • > Target type File system object
    > Shortcut path %CommonStartUpDir%\BGInfo
    > Target path c:\apps\bginfo\bginfo.exe
    > Arguments c:\apps\bginfo\bginfo.bgi /SILENT /TIMER:0 /NOLICPROMPT
     
    I suggest registry :-)
     
    HKCU\Software\Microsoft\Windows\CurrentVersion\Run...
    (Or HKLM if it should run for all users)
     
    • Marked as answer by Adam_231 Tuesday, June 21, 2016 3:51 PM
    Tuesday, June 21, 2016 3:19 PM

All replies

  • > Target type File system object
    > Shortcut path %CommonStartUpDir%\BGInfo
    > Target path c:\apps\bginfo\bginfo.exe
    > Arguments c:\apps\bginfo\bginfo.bgi /SILENT /TIMER:0 /NOLICPROMPT
     
    I suggest registry :-)
     
    HKCU\Software\Microsoft\Windows\CurrentVersion\Run...
    (Or HKLM if it should run for all users)
     
    • Marked as answer by Adam_231 Tuesday, June 21, 2016 3:51 PM
    Tuesday, June 21, 2016 3:19 PM
  • Worked like a charm!

    Many thanks Martin :)

    Tuesday, June 21, 2016 3:52 PM