bat script for copying files

Home Forums Scripting General Scripting bat script for copying files

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    gogi100
    Member
    #142921

    I have this .bat script

    @echo
    off
    if not exist “fajl.dll” goto error:
    if not exist “fajl.ini” goto error:
    set xdir=%windir%system32
    if exist %windir%sysWOW64 set xdir=%windir%sysWOW64
    if not exist %xdir%folder goto error:
    cls

    net stop service
    copy /Y “fajl.dll” %xdir%folder
    copy /Y “fajl.ini” %xdir%folder
    %xdir%regsvr32.exe /s %xdir%folderfajl.dll
    echo.
    net start service

    echo.
    pause
    goto end:[/CODE]
    I tried starting this script over Active Directory: i choosed some user-properties-profile-logon script and put this script. When the user login again, it isn’t happen nothing. Beside this script there are more 3 files: .dll,.ini and .bat. These files i inserted in windows/sysvol/sysvol/mojdomen/scripts. From this code i see: the service stoped, next two files are copied in system32/folder, next the .dll file is registered and as a result the service is started. It seems all is ok, but this script don’t work. Where i maked mistakes.Maybe i don’t have administrator right. I also tried to use gpo in domain logon or startup script but nothing. Plz help me
    Thank’s[CODE]@echo off
    if not exist “fajl.dll” goto error:
    if not exist “fajl.ini” goto error:
    set xdir=%windir%system32
    if exist %windir%sysWOW64 set xdir=%windir%sysWOW64
    if not exist %xdir%folder goto error:
    cls

    net stop service
    copy /Y “fajl.dll” %xdir%folder
    copy /Y “fajl.ini” %xdir%folder
    %xdir%regsvr32.exe /s %xdir%folderfajl.dll
    echo.
    net start service

    echo.
    pause
    goto end:[/CODE]
    I tried starting this script over Active Directory: i choosed some user-properties-profile-logon script and put this script. When the user login again, it isn’t happen nothing. Beside this script there are more 3 files: .dll,.ini and .bat. These files i inserted in windows/sysvol/sysvol/mojdomen/scripts. From this code i see: the service stoped, next two files are copied in system32/folder, next the .dll file is registered and as a result the service is started. It seems all is ok, but this script don’t work. Where i maked mistakes.Maybe i don’t have administrator right. I also tried to use gpo in domain logon or startup script but nothing. Plz help me
    Thank’s

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.