none
Register DLL by Group Policy

    Question

  • Good day!

    We need to register dll-library on some domain clients. I tried to do this by startup bat-script (not logon script because in this case we don't have required permissions). But unfortunately it doesn't work.

    The script was like:

    copy "\\dfs\\....\library.dll" %Temp%\
    IF EXIST "%Temp%\library.dll" %systemroot%\SysWow64\regsvr32 "%Temp%\library.dll"

    1) Changed dfs-root to ip-share. Don't work

    2) Changed %Temp% to %SystemRoot%\Temp

    3) Activate option in gpo "...always wait network" and "... startup script time processing"

    Tried to changed shared permission to everyone - but also don't work. Suppose that the problem is in the script.

    Could you help me to troubleshoot this issue ? Perhaps there is another way to realize this task (not by psexec, better group policy)?

    Thank you.

     

    Monday, January 25, 2016 7:26 AM

All replies

  • > copy "\\dfs\\....\library.dll" %Temp%\
     
    If the file already exists, this command will stop with "do you want to
    overwrite" - so you MUST ensure that it does not ask - "/y"...
     
    In addition - do computer accounts have access to this path?
     
    > IF EXIST "%Temp%\library.dll" %systemroot%\SysWow64\regsvr32
    > "%Temp%\library.dll"
     
    regsvr32 /s ...
     
    You can verify if your script works by using "psexec -s cmd" - this will
    open a prompt running as the computer account. There execute your script
    and watch its output :)
     
    Monday, January 25, 2016 11:30 AM
  • Good day, Martin.

    1) I've added keys /y /s in script

    2) Computer account has Read permission to share-folder

    3)  Via psexec -s cmd I successfully execute the script and it worked. The file was copied and library was registred.

    4) Then I put script in the local policy to startup script (computer branch), reboot it. Via gpresult /v and RSOP I see that startup script has been executed successfully, but actually no one file was copied and DLL library wasn't registrated.


    Wednesday, January 27, 2016 9:34 AM
  • > 4) Then I put script in the local policy to startup script (computer
    > branch), reboot it. Via gpresult /v and RSOP I see that startup script
    > has been executed successfully, but actually no one file was copied and
    > DLL library wasn't registrated.
     
    Then add >> to the commands in your script to capture its output:
     
    set log=%temp%\test.log
    copy "\\dfs\\....\library.dll" %Temp%\ /y >>%log% 2>&1
     
    Wednesday, January 27, 2016 10:35 AM
  • Do that.

    1) The first error was like "Undefined network path", after that I changed source from \\dfs\... to \\ip-address\...

    2) The second error is like "the network location is unavailable"

    Problem with define (perhaps DNS feedback) UNC-path while computer booting?


    Wednesday, January 27, 2016 12:01 PM