Jump to content

jeremyotten

Member
  • Posts

    68
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by jeremyotten

  1. the GOD has returned ;-) only it works almost. users.txt groups.txt I get this error log Error! .FS03 Clientdo.DEPT.GROUPS.CAG.META - Switch P700511 needs an argument. Error! .FS03 LeesClientDo.DEPT.GROUPS.CAG.META - Switch P700240 needs an argument. Error! .FS03 PersBest.DEPT.GROUPS.CAG.META - Switch P700511 needs an argument. So it looks like every last P number per line doesn''t get the /B in front of it... :-( nevermind the script works you are the GOD!! ;-) problem was with TABS when copied from excel to notepad
  2. the GOD has returned ;-) only it works almost. users.txt groups.txt I get this error log Error! .FS03 Clientdo.DEPT.GROUPS.CAG.META - Switch P700511 needs an argument. Error! .FS03 LeesClientDo.DEPT.GROUPS.CAG.META - Switch P700240 needs an argument. Error! .FS03 PersBest.DEPT.GROUPS.CAG.META - Switch P700511 needs an argument. So it looks like every last P number per line doesn''t get the /B in front of it... :-(
  3. part op groups.txt part of users.txt
  4. I was able to re-use something from the robocopy script. BUT. it's not complete @Echo off&Setlocal Set "_=0" For /f "delims=" %%# In (groups.txt) Do ( Set/a "_+=1"&Call :N_ %%_%% "%%#") Set "_="&Goto :Eof :N_ Set "$=0" For /f "delims=" %%# In (users.txt) Do ( Set/a "$+=1"&Call :O_ %%$%% "%%#" %1 %2) Set "$="&Goto :Eof :O_ If %3 Equ %1 RLGRPCRT.exe "%~4" /B %~2 now it outputs /B All value's while it should output /B Value1 / B Value2 etc etc Value ammount differs per line..
  5. ok I have a groups.txt and a users.txt the command should be RLGRPCRT.exe ".Line 1 of groups.txt.APPS.GROUPS.CARE" /B (Value1 of line 1 of users.txt) /B (Value2 if line 2 of users.txt) Yes I have tried and failed :-( Extra Info Lines in groups.txt can have spaces in it. Values in lines of users.txt do not have spaces. groups.txt has 1 group per line users.txt has multiple users(no spaces) per line every line in users.txt has a random number of users line1 of groups.txt should get all the member users of line 1 in users.txt
  6. Ok this is the case.. What I want to build is a script that reads a .txt file. the txt file has this format Line 1 ValueA ValueB1 - ValueBetc.... Line 2 ValueA ValueC1 - ValueCetc.... etc What I want is a script to read the txt file an file the command like this RLGRPCRT ValueA /B -member ValueB1 RLGRPCRT ValueA /B -member ValueB2 etc etc If one could help me out...
  7. I know you've already got a response you're happy with, but I'd just like to make a suggestion.I think the approach is slightly `heavy`! What I mean is that I think that setting a bunch of variables for each line of both files is intensive and probably not necessary based on your information. I would suggest something a little more like this @Echo off&Setlocal Set "_=0" For /f "delims=" %%# In (SOURCEDIR.TXT) Do ( Set/a "_+=1"&Call :N_ %%_%% "%%#") Set "_="&Goto :Eof :N_ Set "$=0" For /f "delims=" %%# In (DESTDIR.TXT) Do ( Set/a "$+=1"&Call _ %%$%% "%%#" %1 %2) Set "$="&Goto :Eof _ If %3 Equ %1 Robocopy "\\JEREMY\SOURCE$\%~4" "\\JEREMY\DESTINATION$\%~2" /mirAs you'll note I removed all that logging rubbish, If I wished to log anything it would be the actual robocopy command and for that I'd use it's /LOG switch. As a final note, if you did intend using a log file and you also wished to use the date and time in such a manner, I'd advise you to set both date and time to new variables once then use those variables for your expansion etc. Otherwise if the date/time changed during the formation of that file name you'd have all sorts of chaos. WOW i don''t understand a thing of what you are doing with that script but it does work indeed!! You are SCRIPTING GOD!!
  8. I created it myself with loging and with a static sourcedir.txt as well as destdir.txt ;-) @echo off CALL :ALL 1>ROBOCOPY_%DATE:~9,4%%DATE:~6,2%%DATE:~3,2%_%time:~1,1%u%time:~3,2%m.LOG 2>&1 EXIT :ALL setLocal EnableDelayedExpansion SET SOURCEROOT=\\JEREMY\SOURCE$ SET DESTROOT=\\JEREMY\DESTINATION$ set /A n=0 set /A m=0 for /f "tokens=* delims= " %%A in (SOURCEDIR.TXT) do ( set /a n+=1 set SOURCEDIR!n!=%%A set SOURCEs=!SOURCEs! !m! ) IF NOT EXIST DESTDIR.TXT ECHO Missing DESTDIR.TXT file& GOTO :END for /f "tokens=*" %%A in (DESTDIR.TXT) do ( set /a m+=1 set DESTDIR!m!=%%A set DESTs=!DESTs! !m! ) IF NOT %n%.==%m%. ECHO Unbalanced data &GOTO :END FOR %%A in (%DESTs%) DO ( robocopy "%SOURCEROOT%\!SOURCEDIR%%A!" "%DESTROOT%\!DESTDIR%%A!" /MIR ) :END pause
  9. and that's exactly what the posted code (based on yours) does. WAHT is the problem? jaclaz tested it like this @echo off setLocal EnableDelayedExpansion SET SOURCEROOT=\\JEREMY\SOURCE$ SET DESTROOT=\\JEREMY\DESTINATION$ set /A n=0 set /A m=0 for /f "tokens=* delims= " %%A in ('dir %SOURCEROOT% /A:D /B') do ( set /a n+=1 set SOURCEDIR!n!=%%A set SOURCEs=!SOURCEs! !m! ) IF NOT EXIST DESTDIR.TXT ECHO Missing DESTDIR.TXT file& GOTO :END for /f "tokens=*" %%A in (DESTDIR.TXT) do ( set /a m+=1 set DESTDIR!m!=%%A set DESTs=!DESTs! !m! ) IF NOT %n%.==%m%. ECHO Unbalanced data &GOTO :EOF FOR %%A in (%DESTs%) DO ( robocopy "%SOURCEROOT%\!SOURCEDIR%%A!" "%DESTROOT%\!DESTDIR%%A!" /MIR ) :END pause and it works! ;-) 1 request. What to do to output it to a logfile?
  10. This is what I want: step1 process the dir command and every line should become a variable step2 read the destinationdir text file and every line should become a variable step2 feed the variables to robocopy like "robocopy sourcedirvariable1 destinationdirvariable2 /MIR thats all. source and destination dirs should always be the same amount...
  11. This is what I want. Read root directory structure and set SOURCEDIR1 - etc per directory read a file named DESTDIR.TXT and set DESTDIR1 - etc variables after that robocopy should process everything this way robocopy sourcedir destinationdir /MIR till every variable is processed. This is what I have till now... but im stuck --> can''t seem to get the last robocopy part automated (also left in this script) SET SOURCEROOT=D:\TEST SET DESTROOT=D:\TEST2 @echo off setLocal EnableDelayedExpansion for /f "tokens=* delims= " %%a in ('dir %SOURCEROOT% /A:D /B') do ( set /a n+=1 set SOURCEDIR!n!=%%a ) for /f "tokens=*" %%b in (DESTDIR.TXT) do ( set /a m+=1 set DESTDIR!m!=%%b robocopy "%%a" "%%b" /MIR ) SET pause
  12. No where you See Datamex you should Read "Default Outlook Profile" the screens are wrong Under Default Outlook Profile you see als these wierd keys. In the keys could be the value with the user. The exe should search all keys under Default Outlook Profile and delete the One which has a part of that value .....
  13. See my attachment for clarification Explained.doc
  14. Ok I need someone with the program skils to Search al the keys and subkeys under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Default Outlook Profile Then when it finds the key with the value delete that KEY. If some kan me out with this I will give all the other information to create a loginscripts that creates the outlook profiles delete all additional mailboxes and add the mailboxes specified. Please assist to make this perfect.
  15. I use this @ECHO OFF ECHO PRESS ANY KEY TO UPDATE HAL FOR YOU SYSTEM (SYSTEM WILL REBOOT AFTERWARDS) pause IF /I "%NUMBER_OF_PROCESSORS%"=="1" GOTO UNI GOTO MULTI :UNI %WINDIR%\devcon.exe sethwid @ROOT\PCI_HAL000 := !E_ISA_UP !ACPIPIC_UP !ACPIAPIC_UP !ACPIAPIC_MP !MPS_UP !MPS_MP !SGI_MPS_MP !SYSPRO_MP !SGI_MPS_MP %WINDIR%\devcon.exe sethwid @ROOT\ACPI_HAL000 := !E_ISA_UP !ACPIPIC_UP !ACPIAPIC_UP !ACPIAPIC_MP !MPS_UP !MPS_MP !SGI_MPS_MP !SYSPRO_MP !SGI_MPS_MP %WINDIR%\devcon.exe sethwid @ROOT\PCI_HAL000 := +ACPIAPIC_UP %WINDIR%\devcon.exe sethwid @ROOT\ACPI_HAL000 := +ACPIAPIC_UP %WINDIR%\devcon.exe update %windir%\inf\hal.inf ACPIAPIC_UP GOTO END :MULTI %WINDIR%\devcon.exe sethwid @ROOT\PCI_HAL000 := !E_ISA_UP !ACPIPIC_UP !ACPIAPIC_UP !ACPIAPIC_MP !MPS_UP !MPS_MP !SGI_MPS_MP !SYSPRO_MP !SGI_MPS_MP %WINDIR%\devcon.exe sethwid @ROOT\ACPI_HAL000 := !E_ISA_UP !ACPIPIC_UP !ACPIAPIC_UP !ACPIAPIC_MP !MPS_UP !MPS_MP !SGI_MPS_MP !SYSPRO_MP !SGI_MPS_MP %WINDIR%\devcon.exe sethwid @ROOT\PCI_HAL000 := +ACPIAPIC_MP %WINDIR%\devcon.exe sethwid @ROOT\ACPI_HAL000 := +ACPIAPIC_MP %WINDIR%\devcon.exe update %windir%\inf\hal.inf ACPIAPIC_MP :END ECHO YOUR SYSTEM WILL NOW REBOOT! PAUSE %WINDIR%\SYSTEM32\SHUTDOWN.EXE /R /T 0
  16. sorry your script doesn't work for me it schedules it tommorow....
  17. OK I got rid of the nvata.sys error. BUT NOW! I get an ntfs.sys error when loading windows after sysprep resealed it. Help is very needed! Thanx in Advance
  18. Can you tell me how to script and automate this scheduled task? You would greatly help because im trying to make a 100 percent automated cd maybe you can do something with this: http://blogs.msdn.com/adioltean/articles/271063.aspx OK after scripting myself silly I created this (should would right? or do you have a better option?) @ECHO OFF REM ---- SET HOURS BASED on 24U CLOCK------ time /t|FIND "01:">NUL IF not ERRORLEVEL==1 SET UU=01 time /t|FIND "02:">NUL IF not ERRORLEVEL==1 SET UU=02 time /t|FIND "03:">NUL IF not ERRORLEVEL==1 SET UU=03 time /t|FIND "04:">NUL IF not ERRORLEVEL==1 SET UU=04 time /t|FIND "05:">NUL IF not ERRORLEVEL==1 SET UU=05 time /t|FIND "06:">NUL IF not ERRORLEVEL==1 SET UU=06 time /t|FIND "07:">NUL IF not ERRORLEVEL==1 SET UU=07 time /t|FIND "08:">NUL IF not ERRORLEVEL==1 SET UU=08 time /t|FIND "09:">NUL IF not ERRORLEVEL==1 SET UU=09 time /t|FIND "10:">NUL IF not ERRORLEVEL==1 SET UU=10 time /t|FIND "11:">NUL IF not ERRORLEVEL==1 SET UU=11 time /t|FIND "12:">NUL IF not ERRORLEVEL==1 SET UU=12 time /t|FIND "13:">NUL IF not ERRORLEVEL==1 SET UU=13 time /t|FIND "14:">NUL IF not ERRORLEVEL==1 SET UU=14 time /t|FIND "15:">NUL IF not ERRORLEVEL==1 SET UU=15 time /t|FIND "16:">NUL IF not ERRORLEVEL==1 SET UU=16 time /t|FIND "17:">NUL IF not ERRORLEVEL==1 SET UU=17 time /t|FIND "18:">NUL IF not ERRORLEVEL==1 SET UU=18 time /t|FIND "19:">NUL IF not ERRORLEVEL==1 SET UU=19 time /t|FIND "20:">NUL IF not ERRORLEVEL==1 SET UU=20 time /t|FIND "21:">NUL IF not ERRORLEVEL==1 SET UU=21 time /t|FIND "22:">NUL IF not ERRORLEVEL==1 SET UU=22 time /t|FIND "23:">NUL IF not ERRORLEVEL==1 SET UU=23 time /t|FIND "00:">NUL IF not ERRORLEVEL==1 SET UU=00 REM --- SET AT 1 MINUTE AHEAD ----- time /t|FIND ":00">NUL IF not ERRORLEVEL==1 at %UU%:01 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":01">NUL IF not ERRORLEVEL==1 at %UU%:02 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":02">NUL IF not ERRORLEVEL==1 at %UU%:03 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":03">NUL IF not ERRORLEVEL==1 at %UU%:04 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":04">NUL IF not ERRORLEVEL==1 at %UU%:05 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":05">NUL IF not ERRORLEVEL==1 at %UU%:06 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":06">NUL IF not ERRORLEVEL==1 at %UU%:07 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":07">NUL IF not ERRORLEVEL==1 at %UU%:08 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":08">NUL IF not ERRORLEVEL==1 at %UU%:09 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":09">NUL IF not ERRORLEVEL==1 at %UU%:10 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":10">NUL IF not ERRORLEVEL==1 at %UU%:11 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":11">NUL IF not ERRORLEVEL==1 at %UU%:12 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":12">NUL IF not ERRORLEVEL==1 at %UU%:13 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":13">NUL IF not ERRORLEVEL==1 at %UU%:14 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":14">NUL IF not ERRORLEVEL==1 at %UU%:15 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":15">NUL IF not ERRORLEVEL==1 at %UU%:16 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":16">NUL IF not ERRORLEVEL==1 at %UU%:17 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":17">NUL IF not ERRORLEVEL==1 at %UU%:18 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":18">NUL IF not ERRORLEVEL==1 at %UU%:19 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":19">NUL IF not ERRORLEVEL==1 at %UU%:20 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":20">NUL IF not ERRORLEVEL==1 at %UU%:21 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":21">NUL IF not ERRORLEVEL==1 at %UU%:22 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":22">NUL IF not ERRORLEVEL==1 at %UU%:23 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":23">NUL IF not ERRORLEVEL==1 at %UU%:24 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":24">NUL IF not ERRORLEVEL==1 at %UU%:25 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":25">NUL IF not ERRORLEVEL==1 at %UU%:26 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":26">NUL IF not ERRORLEVEL==1 at %UU%:27 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":27">NUL IF not ERRORLEVEL==1 at %UU%:28 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":28">NUL IF not ERRORLEVEL==1 at %UU%:29 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":29">NUL IF not ERRORLEVEL==1 at %UU%:30 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":30">NUL IF not ERRORLEVEL==1 at %UU%:31 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":31">NUL IF not ERRORLEVEL==1 at %UU%:32 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":32">NUL IF not ERRORLEVEL==1 at %UU%:33 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":33">NUL IF not ERRORLEVEL==1 at %UU%:34 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":34">NUL IF not ERRORLEVEL==1 at %UU%:35 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":35">NUL IF not ERRORLEVEL==1 at %UU%:36 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":36">NUL IF not ERRORLEVEL==1 at %UU%:37 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":37">NUL IF not ERRORLEVEL==1 at %UU%:38 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":38">NUL IF not ERRORLEVEL==1 at %UU%:39 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":39">NUL IF not ERRORLEVEL==1 at %UU%:40 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":40">NUL IF not ERRORLEVEL==1 at %UU%:41 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":41">NUL IF not ERRORLEVEL==1 at %UU%:42 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":42">NUL IF not ERRORLEVEL==1 at %UU%:43 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":43">NUL IF not ERRORLEVEL==1 at %UU%:44 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":44">NUL IF not ERRORLEVEL==1 at %UU%:45 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":45">NUL IF not ERRORLEVEL==1 at %UU%:46 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":46">NUL IF not ERRORLEVEL==1 at %UU%:47 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":47">NUL IF not ERRORLEVEL==1 at %UU%:48 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":48">NUL IF not ERRORLEVEL==1 at %UU%:49 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":49">NUL IF not ERRORLEVEL==1 at %UU%:50 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":50">NUL IF not ERRORLEVEL==1 at %UU%:51 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":51">NUL IF not ERRORLEVEL==1 at %UU%:52 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":52">NUL IF not ERRORLEVEL==1 at %UU%:53 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":53">NUL IF not ERRORLEVEL==1 at %UU%:54 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":54">NUL IF not ERRORLEVEL==1 at %UU%:55 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":55">NUL IF not ERRORLEVEL==1 at %UU%:56 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":56">NUL IF not ERRORLEVEL==1 at %UU%:57 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":57">NUL IF not ERRORLEVEL==1 at %UU%:58 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":58">NUL IF not ERRORLEVEL==1 at %UU%:59 /interactive "C:\sysprep\sysprep.bat" time /t|FIND ":59">NUL IF not ERRORLEVEL==1 at %UU%:00 /interactive "C:\sysprep\sysprep.bat" UPDATE 30/5/2007 THE SCRIPT WORKS! gheghe thanks for the info. Only problem when I boot the system I get a nvata.sys loading error (NVIDIA? don't have it in my system) removed the D\M\N drivers from the process. And I am trying again...
  19. OK I got the whole process automated with some help of you scripts and continue.exe files (had to change it so be compatible with dutch OS) But. Are you able to add the entire www.driverpacks.net massstorage package with this method? If yes please tell me how. Because sysprep seems to not be able to complete its process. And because I run it queit no error is displayed... I got the error the error is "An Error occured while trying to update your registry" Reseal machine failed! I found an article which claims its a faulty entry in the massstorage section http://support.microsoft.com/kb/249690 Im looking at it know If I can find the entry (this is alot of work) Maybe if you already know which one it is. Please share.... ;-)
  20. What I already tried was this. use SetupCopyOEMInf.exe to add the massstorage drivers to the windows\inf dir. this goes very fast even faster when you use your continue.exe only I expected sysprep to now automatically add these to the massstorage section when I do sysprep -bmsd but this isn't the case. Sysprep seems to get this info from the machine.inf file and another inf file........ so maybe if we could add extra drivers to these machine.inf file we goed make the process faster.... what do you think? P.s what was the critical devices key you found? p.p.s Also I need a script that changes the HAL to standard PC HAL. Writes a key in the runonce to a script which updates the hal after image deployment backup to the right hal.
  21. Ok the thing that we need to find out is. Why this long process of adding drivers to de massstorage section. Why not just do it for windows... but how? What process in taking place in the registry or files changes? when sysprep is run with this option? IcemanND any idea on tracking this?
  22. Hmm you are right you hwid.cmd script does this this is the code: rem %1 is path to MassDriverPacks Folder IF "%1"=="" GOTO EOF IF NOT EXIST %1 GOTO EOF SETLOCAL ENABLEDELAYEDEXPANSION SET STDOUT=%cd%\HWIDS.TXT TYPE>%STDOUT% 2>NUL ::traverse drivers path CALL :TRAVERSAL %1 GOTO EOF :TRAVERSAL PUSHD %1 for /f %%f in ('Dir /b *.inf') do ( for /f "eol=- tokens=2 delims=," %%i in ('find /i "pci\ven" %%f') do ( for /f "tokens=*" %%j in ("%%i") do ( for /f "tokens=1* delims=_" %%k in ("%%j") do ( if /i "%%k" EQU "PCI\VEN" ( for /f "usebackq tokens=1* delims=; " %%a in ('%%j') do ( echo %%a=%cd%\%%f>>%STDOUT% ) ) ) ) ) ) FOR /F %%I IN ('DIR /AD /OGN /B') DO ( CALL :TRAVERSAL %CD%\%%I ) POPD GOTO EOF :EOF Can you update this script to auto add the contents of hwid.txt directly under de [buildMassStorage] section of sysprep.inf and what about the driver signing problem. Has anybody already solved this?
×
×
  • Create New...