Jump to content

djbe

Member
  • Posts

    261
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Belgium

Everything posted by djbe

  1. Hey bashrat, I've improved the code a bit. It now doesn't use those for loops anymore, uses less variables, and if there are spaces in the file's path, it will work too. @echo off if %1.==Sub. goto %2 ... Put your code here ... FOR /R test2\ %%a IN (*.*) DO (call %0 Sub makeIt "%%a") goto restOfCode :makeIt setlocal set naam=%~nx3 set pad=%~pd3 if %naam:~-1%==_ goto end if %naam:~-3%==cat goto end if %naam:~-3%==inf goto end makecab %3 set naam=%naam:~0,-1%_ move "%naam%" "%pad%%naam%" endlocal goto end :restOfCode ... Put your code here ... :end
  2. I'm using this code: @ECHO on for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\WIN51 set CDROM=%%i: set WPIPATH=%CDROM%\SETUP\WPI set bla=%WPIPATH:~0,1% if %bla%==\ set WPIPATH=%WPIPATH:~1% %WPIPATH%\common\cmdow.exe @ /HID start %WPIPATH%\common\Music.exe ping -n 5 localhost > NUL regedit /S %WPIPATH%\common\wpi.reg for /F "delims=: tokens=1" %%i in (%WPIPATH%) DO %%i: cd %WPIPATH% start /wait WPI.hta exit I removed the fonts part (don't use it anyway) and added a line so that if I'm running it from hdd (for testing purposes) it will also work. I also added a line to start UAP2 (aka music.exe) and a pause of +- 5 seconds (or else, the player will appear on top of wpi).
  3. Never mind, I got it working (at last ) I can work hours on stuff like this Yeah, me to. For that batch I gave you, I worked for a few hours, and would have kept going till I had found it. So what was the error anyway?
  4. Ok thanks, but I'll check it tomorrow cause got kinda an exam tomorrow (Logica, bah )
  5. the fact is that the variable 'extensie' contains a dot and then the extension, so you'll have to test for '.cat' instead of 'cat' This code will exclude cat and inf files: @echo off if %1.==Sub. goto %2 ... Put your code here ... FOR /R test2\ %%a IN (*.*) DO (call %0 Sub makeIt %%a) goto restOfCode :makeIt setlocal for %%a in (%3) do set naam=%%~na for %%a in (%3) do set extensie=%%~xa for %%a in (%3) do set pad=%%~pa for %%a in (%3) do set station=%%~da if %extensie:~-1%==_ goto end if %extensie%==.cat goto end if %extensie%==.inf goto end set pad=%station%%pad% makecab %3 set nieuweNaam=%naam%%extensie:~0,-1%_ move %nieuweNaam% %pad%%nieuweNaam% endlocal goto end :restOfCode ... Put your code here ... :end as you can see, you put your exclude part at the same place where the code checks if the file is already compressed (see error 2 of my posts ago). I have a little question: are you already using LZX compression? If not, it seems that it compresses better than standard makecab compression. to use it, replace makecab %3 with makecab /D CompressionType=LZX %3 Hope this helps
  6. press the windows key, hold it and press the key 'r' type cmd press enter voila, you're in the command prompt!
  7. where do you want a pause/exit? on the end of the batch file? or after each iteration? Here you can but your code at the end of the file (But make sure it is before the 'end' label) or in the beginning (but make sure it is after the 'if %1.==Sub. goto %2' line) : @echo off if %1.==Sub. goto %2 ... Put your code here ... FOR /R test2\ %%a IN (*.*) DO (call %0 Sub makeIt %%a) goto restOfCode :makeIt setlocal for %%a in (%3) do set naam=%%~na for %%a in (%3) do set extensie=%%~xa for %%a in (%3) do set pad=%%~pa for %%a in (%3) do set station=%%~da if %extensie:~-1%==_ goto end set pad=%station%%pad% makecab %3 set nieuweNaam=%naam%%extensie:~0,-1%_ move %nieuweNaam% %pad%%nieuweNaam% endlocal goto end :restOfCode ... Put your code here ... :end about that powerbook: who doesn't want one?
  8. weird, i actually tried it here with multiple subdirs, and subfiles, and so on... and it worked for me. please add me on msn, that's easier. And also, try this: change the '@echo off' to '@echo on' and run the batchfile like this: batchfile.cmd > output.txt and send me the output.txt edit: just noticed an error: if there are several files in a dir, it will compress the first one, move it back, compresses that file again, moves it back, continues with other files... So I found an easy fix: @echo off if %1.==Sub. goto %2 FOR /R test2\ %%a IN (*.*) DO (call %0 Sub makeIt %%a) goto end :makeIt setlocal for %%a in (%3) do set naam=%%~na for %%a in (%3) do set extensie=%%~xa for %%a in (%3) do set pad=%%~pa for %%a in (%3) do set station=%%~da if %extensie:~-1%==_ goto end set pad=%station%%pad% makecab %3 set nieuweNaam=%naam%%extensie:~0,-1%_ move %nieuweNaam% %pad%%nieuweNaam% endlocal :end
  9. actually no search needed he just should have opened dos prompt, and have typed 'HELP', or 'rd /?'... such things are VERY logical, even my mom found that (and she can't use computers )
  10. cd %homedrive%%homepath% change current dir to your account dir (for example c:\docs and setting\admin) rd /s/q ... remove all files and folders in dir ... without asking for confirmation md recent make a dir called 'recent' This batch file zill do some cleanup for you, like your history and cookies (on the CURRENT account)...
  11. maybe something like this? @echo off if %1.==Sub. goto %2 FOR /R test2\ %%a IN (*.*) DO (call %0 Sub makeIt %%a) goto end :makeIt setlocal for %%a in (%3) do set naam=%%~na for %%a in (%3) do set extensie=%%~xa for %%a in (%3) do set pad=%%~pa for %%a in (%3) do set station=%%~da set pad=%station%%pad% makecab %3 set nieuweNaam=%naam%%extensie:~0,-1%_ move %nieuweNaam% %pad%%nieuweNaam% endlocal :end I'll put the explanation here tomorrow, neeeeeeeeeed sleeeeeeeeeeeeeep now edit: ok, I'm back. if %1.==Sub. goto %2 checks if we want to run the subroutine or not. call %0 Sub makeIt %%a calls the batchfile itself but with as parameters 'run makeIt ' and the name of the file. for %%a in (%3) do set naam=%%~na for %%a in (%3) do set extensie=%%~xa for %%a in (%3) do set pad=%%~pa for %%a in (%3) do set station=%%~da puts info over the file in some variables: if for example %3 is c:\uacd\driverpacks\M\blabla\driver.sys, then naam=driver, extensie=sys, pad=\uacd\driverpacks\M\blabla\ and station=c:\ set pad=%station%%pad% puts the path in one variable, in the example, pad=c:\uacd\driverpacks\M\blabla\ set nieuweNaam=%naam%%extensie:~0,-1%_ stores the name of the compressed file in a variable edit2: I just reread your post, seems I missed the part of overwriting... but won't the files have different names, aka: driver.sys driver.sy_ if you want to delete the old file (driver.sys), then add this line after 'makecab %3': del /F /Q %3
  12. Little question: it seems that this driverpack is quite big when decompressed... Are you going to use driver compression, like you announced in another thread? Couse when compressed it seems only 1/4th of size!!! But I havn't checked these drivers yet (who knows, they might already be compressed and I'm asking useless questions... )
  13. why not start it with the batch file that starts wpi, so that it keeps playing while the programs are installing?
  14. To fix that, use some kind of virtual drive like Imagedrive from Nero, load the iso with it, and then in virtualpc, select 'use physical drive H:'. (replace H: with the name of your virtual drive)
  15. What doesn't work of ryanmv's pack? I tried it in and it seems to work: I have all updates installed (checked with qfecheck) pskill is there... I even have the 'copy to... move to...' hack (oh yeah, before confusing anyone, it's on a multiboot dvd with an unattended winXP english installation... Still have to test dutch version) edit: windows update complains about KB885836, but I think that's a bug that's mentioned on ryan's site for pack 1.05, isn't it?
  16. Ok, can't really follow anymore could you sum up where it works, and where not, and wich errors are given on wich os's, and when
  17. I'm making a dvd... so lot's of room But if I integrate the drivers with method 1, will I be able to remove them? (let's say Bashrat suddenly changes the way drivers are integrated due to some major bug...) And if I make a BartPE, how does it work then to integrate the drivers? before or after? (And if after, how do I integrate the drivers into a BartPE)... What do you mean by that? In for example pro1 and pro2, I already have similar files to the ones in setup\xp\proffessional\i386... (115 files and a 'system32' folder). One last question: If I integrate some updates and/or RyanMV's update pack, do I need to re-create those pro1 and pro2 folders?
  18. I don't think he has a problem in wich order progs are being installed, but in wich order the programs-configs are saved in config.js...
  19. If you want, check my site: http://lumumba.luc.ac.be/~djbe It's a site I made for university (some project). If you check the menu's, you'll see they have the drop effect... Fade-in shouldn't be that hard You can always ask me any questions about the code (it might be messy but had to write it in some hurry )
  20. Like Chander said, i think it's because of the value of chars when sorting... In many programming languages, you can get an integer value for a character: A = 63 a = 97 (Values might be wrong, but should be close ) It's just the ASCII value of the characters. Now when sorting, you check if the integer value is smaller than the other one: if (value1 < value2) then ... Maybe this could be fixed by simply converting each string to lower/uppercase before checking: temp1 = toLower(name1) temp2 = toLower(name2) ... (get first char of each temp string) ... (compare strings) But well, maybe this has already been implemented and the problem is something else... edit: After diggin a LITTLE into the script files of the WPI: in program.js, the ordering is done correctly (tolowercase and then check): function SortByProg(a, b) { position = "program.js"; var x = a.prog[0].toLowerCase(); var y = b.prog[0].toLowerCase(); return ((x < y) ? -1 : ((x > y) ? 1 : 0)); } but in the configwizard.js (in the function wich writes to config.js): var sortedList = new Array(); for (i=1; document.forms("frmcfg"+i) != null; i++) { sortedList.push(document.forms("frmcfg"+i)); } sortedList.sort(byName); it seems that here, there is no converting to lower/uppercase... and the built-in sort function of javascript puts 'A' before 'a'. I could write a function wich sorts it correctly without converting to lowercase, but I think Hasi would prefer to do that...
  21. Oh well, I restarted anyway... now have xp in three languages on it! But still hav'nt integrated the driverpacks yet. Wich is the best method? 1 or 2?
  22. happy b-day!!! And thanks for all your work!!!
  23. So it runs fine on your pc in a normal environment, but doesn't in vmware? Oh and by the way, I tested it in normal environment on xp-pro sp2. Could you try it in virtualpc? (just get the demo) And yeah, post those results here of that testing on a workstation... I don't have w2k to test on, maybe someone else could try?
  24. Ok, tried the zip you posted... I don't get any error
×
×
  • Create New...