bat script for copying files
Home › Forums › Scripting › General Scripting › bat script for copying files
- This topic has 14 replies, 2 voices, and was last updated 11 years, 6 months ago by
gogi100.
-
AuthorPosts
-
gogi100MemberJul 07, 2009 at 12:57 am #142921I 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:
clsnet stop service
copy /Y “fajl.dll” %xdir%folder
copy /Y “fajl.ini” %xdir%folder
%xdir%regsvr32.exe /s %xdir%folderfajl.dll
echo.
net start serviceecho.
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:
clsnet stop service
copy /Y “fajl.dll” %xdir%folder
copy /Y “fajl.ini” %xdir%folder
%xdir%regsvr32.exe /s %xdir%folderfajl.dll
echo.
net start serviceecho.
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 -
AuthorPosts
You must be logged in to reply to this topic.