|
Hi All, it's me again.
I have a batch file, script1.bat that calls other bats which in turn calls scripts. It seems simple enough:
@echo off echo. echo Synchronizing Desktop Time with Domain echo. net time \\dc1-sd /set /yes >nul
%0\..\kix32.exe %0\..\macro.bat
%0\..\inv.bat
%0\..\makedir.bat
%0\..\netbackup.bat
Macro.bat maps drives, etc....it works fine. inv.bat calls inv.kix, which does an inventory of the PC. That works also, but I will include the bat:
@ECHO ON :: Script.bat Must be designated as logon Script in user manager. :: This logic is necessary for Win95 and Win98 clients. :: Last edited by Charles Cannon 4/19/02
@ECHO OFF
:START IF EXIST "x:\nodomain.script" goto END IF "%OS%"=="Windows_NT" GOTO WINNT
:WIN9X SET KIXDIR=%WINDIR%\KIX SET KIXSCRIPT=\\dc1-sd\netlogon\inv.kix SET KIXVER=KIX362
:COPY IF NOT EXIST %KIXDIR%\NUL MKDIR %KIXDIR% IF EXIST %KIXDIR%\%KIXVER% GOTO KIXCOPIED COPY %0\..\KIX32.EXE %KIXDIR% /Y >NUL COPY %0\..\KX16.DLL %KIXDIR% /Y >NUL COPY %0\..\KX32.DLL %KIXDIR% /Y >NUL COPY %0\..\KX95.DLL %KIXDIR% /Y >NUL :: ECHO. >%KIXDIR%\%KIXVER%
:KIXCOPIED IF NOT EXIST %KIXDIR%\KIX32.EXE COPY %0\..\KIX32.EXE %KIXDIR% >NUL IF NOT EXIST %KIXDIR%\KX16.DLL COPY %0\..\KX16.DLL %KIXDIR% >NUL IF NOT EXIST %KIXDIR%\KX32.DLL COPY %0\..\KX32.DLL %KIXDIR% >NUL IF NOT EXIST %KIXDIR%\KX95.DLL COPY %0\..\KX95.DLL %KIXDIR% >NUL
IF NOT EXIST %0 GOTO NOEXT %KIXDIR%\KIX32.EXE %0 $kixscript="%KIXDIR%\KIX32.EXE %KIXSCRIPT%" GOTO LOGON
:LOGON \\dc1-sd\netlogon\KIX32.EXE %kixscript% GOTO END
:NOEXT %KIXDIR%\KIX32.EXE %0.BAT $kixscript="%KIXDIR%\KIX32.EXE %KIXSCRIPT%" GOTO END
:WINNT %logonserver%\netlogon\KIX32.EXE %logonserver%\netlogon\inv.kix
pause
:END
Where I'm having the problem is with the other two, makedir and netbackup.bat.
The makedir is exactly the same as above, with the exception of changing inv.kix to makedir.kix, and the same with netbackup.bat.
I'm sure you want to know why I'm so repetitive, but I don't know any better. The makedir.kix is: If EXIST ("c:\foldername") GOTO END ELSE shell '%comspec% /c md "c:\foldername"' ENDIF :END The netbackup.kix installs netbackup: IF EXIST ("c:\foldername\~netbackup.txt") GOTO END ELSE shell "%COMSPEC% /e:2048 /c \\server\nbp\setup.exe" copy "\\server\nbp\~netbackup.txt" "c:\foldername" ENDIF :END These scripts work independently, but not in script1.bat
Sorry this is so long, but I know that you all like as much detail as possible, even if it is painful.
Thx in advance for your expertise.
BTW, I will be out for a while but will check email.
|