Jump to content

jaclaz

Member
  • Posts

    21,291
  • Joined

  • Last visited

  • Days Won

    53
  • Donations

    0.00 USD 
  • Country

    Italy

Everything posted by jaclaz

  1. If required is Windows XP you could use a PE 1.x (like a BartPE or the one or the other versions of LiveXP) or one or the other versions of minimal XP builds. Also, with only 1 Gb of RAM you'd better use a "flat" PE (cannot say if recent PE's can be made "flat", PE 1's and 2's and I seem to remember 3's could). jaclaz
  2. Krebs on Foscam: http://krebsonsecurity.com/2016/02/this-is-why-people-fear-the-internet-of-things/ jaclaz
  3. Of course it is just a joke to show an example of zeroless pandigitals: http://www.worldofnumbers.com/ninedig1.htm Sure , that is a "normal" way, but findstr in some cases is extremely slow, and that way the user might input a "special" character like '"%&!()<>| that may make the batch fail, actually it should be: FOR /F "delims=123456789" %%? IN ("!chosen!") DO ... to take advantage of delayed expansion, see: http://www.robvanderwoude.com/battech_inputvalidation_setp.php About Mountvol, if I recall correctly, it is "self-standing", i.e. just adding mountvol.exe to the liveXP build it should work. jaclaz
  4. And from the outside, this could even be counterproductive. The more people provide ways (like ClassicShell, Aeroglass, various tweaks, service disabling, etc.) that allow people to make their Windows 10 if not good at least bearable, the less the good MS guys will have a reason to do something to better it. I mean, let us assume that out of 100 Windows 10 users: 1 actually - and in good faith - likes it 9 are MS fanboys and will like whatever the MS good guys release 5 know enough to tweak it into a bearable (almost) experience and they actually tweak it 13 know enough to tweak it into a bearable (almost) experience but they cannot actually tweak it (corporate policies and what not) 25 don't know enough to experiment and make tweaks by themselves but can use the already made programs or follow the available instructions 20 don't bother to tweak it 27 do understand how bad the abomination is and hate it but are not expert enough to tweak it or to use another OS (for whatever reason) MS could legitimately say that 1+9+5+13+25+20=73 people out of 100 are using the OS in a satisfactorily manner. Without the nice tools and tweaks, that amount would be at least 25 less. jaclaz
  5. Yep, and this is (yet another) can of worms , AFAIK/AFAICR with SATA (and UEFI) a number of motherboards do not always assign disk numbers in the "same" order. jaclaz
  6. Only to show off a little bit and to have an occasion to use some math in the batch , how I would write the stuff: @ECHO OFFSETLOCAL ENABLEDELAYEDEXPANSIONSET lookfor=ToolsforPE.ISOSET /A Counter=0FOR /F %%A in ('MOUNTVOL^|FIND ":\"') do (dir /b %%A%lookfor% >nul 2>&1 && (SET /A Counter+=1set isofile[!Counter!]=%%A%lookfor%))SET /A §=0x9EA*2538+0x44F1*17649IF NOT DEFINED isofile[1] ECHO NO iso file was found&GOTO :endECHO Found !counter! item(s):FOR /F "tokens=2,3 delims=[]=" %%A IN ('SET isofile') DO ECHO %%A - %%BIF !counter!.==1. SET chosen=1&GOTO :past_choice:choice_loopSET /P chosen=Please choose item number:FOR /F "delims=%§%" %%? IN ("%chosen%") DO ECHO Invalid input&GOTO :choice_loopIF %chosen% GTR %Counter% ECHO Invalid input&GOTO :choice_loop:past_choiceECHO You chose item #%chosen% which is isofile[%chosen%] i.e. !isofile[%chosen%]!:endECHO.ECHO End of batchjaclaz
  7. I will try again. The data in the "Info" column in diskpart DOES NOT EXIST , it is generated dynamically. You can have n disks each with a FAT32 EFIsys partition, but only one partition on one disk will have the "System" tag in diskpart, the one that was actually used for booting the running system or, if you booted (say) a PE of some kind, NONE of them will have that tag. Each of the FAT32 EFIsys partition on each of the n disks may instead have a "SYSTEM" label, which UNLIKE the "Info" is a "static" value. So, looking for the "System" tag in "Info" can return one or no result, while looking for "SYSTEM" in "Label" may return more than one result. I hope now the point is more clear. jaclaz
  8. Today is Nissan's turn (though for a rather scarcely relevant/preoccupying) issue: http://www.bbc.co.uk/news/technology-35642749 http://www.troyhunt.com/2016/02/controlling-vehicle-features-of-nissan.html jaclaz
  9. Hey, someone seemingly liked the idea of using the accented o (ò) to trick the board parser . I would add that this: [quòte name=Sophy" timestamp="1456285606] Could someone tell me how to use [/quòte] will result in the one with the "post=" will add an (again not understandable) couple of clouds on the right of the quote that when clicked upon will bring up the original post (this is very handy when a quoted post is on a previous page or on another thread. jaclaz
  10. Please note that I am saying something slightly different. If you have one disk (GPT) with a UEFI Windows installed on the default EFIsys type partition, if you run the command from that booted OS (the one that was booted from that disk) then you will have the "System" in "Info". If you boot a PE from (say) CD/DVD, there won't be a "System" in "Info" (and then the label of "SYSTEM" might be of use). But if you have two disks, each with a EFIsys partition you will have a problem as two volumes with FAT32 in Fs and with EITHER "SYSTEM" as label OR "System" in "Info" will be found and listed. And BOTH will have a \EFI\Boot\microsoft\bcd in them. So you may need to LIST DISKs, and then DETAIL each of them. jaclaz
  11. I don't get the issue (if any) with setting counter=1 Here this: SET /A Counter=1for %%b 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 (dir %%b:\ToolsforPE.ISO >nul 2>nul && (set isofile[!Counter!]=%%b:\ToolsforPE.ISO&&SET /A Counter+=1))set isofile[1]set counterIF NOT DEFINED isofile[1] echo ISO not foundresults in isofile[1] NOT DEFINED if the iso has not been found. What is the problem? If you want to set initially Counter to 0 (or to 42) is good as well, as long as you make the check for isofile[0] or for isofile[42]. jaclaz
  12. This is why you should (if you want to tinker with your system) to study a bit of the basics. A Windows bootmanager BOOTMGR or its UEFI counterpart bootmgfw.efi is normally "backwards compatible" but cannot (rather obviously) be "forward compatible". I.e. the Windows 8.1 bootmanager can boot the Windows 7 besides the 8.1, but the windows 7 bootmanager cannot boot 8.1. So definitely you need to use the Windows 8.1 bootmanager to load the Windows 7's. It is very possible, for *any* reason that the EasyBCD did not add those Windows 7 entries correctly and/or that some settings for the BCD are "wrong" (i.e. do not allow booting the Windows 7). I have no idea what is iReboot, but I tend to avoid anything that is named with a small i as initial . You may want to report the problem to the manufacturer's forum: https://neosmart.net/forums/ or take the plunge and get familiar with the BCDedit tool, this would be a good place to start: http://www.mistyrebootfiles.altervista.org/documents/BCDEdit/index.html Or you could try this other tool : https://www.boyans.net/ JFYI there is (maybe was) an ongoing flamewar between the Authors of the two tools and I am not endorsing in any way - not even indirectly - the one or the other . jaclaz
  13. Well, no. You need to study a minimal of the environment and of the batch syntax. PATH is a "special" variable in Windows (and in DOS for this matters). And you are not really "new" to batch, it's like two years that you are a member of MSFN and try writing small batches. It seems like you take one snippet here (and one there) than modify them in a "random" or "semi-random" way and as soon as they don't work you ask for help here and as soon as you get an EXAMPLE, instead of studying it and trying to understand why it works (or why it doesn't work) you further modify it in a random or semi-random way, and this leads to another loop. Try using "mypath" or "isopath" instead of "path" in that batch. jaclaz
  14. As often happens, yes and no. It is IF seen from the booted OS from that disk. The "System" or "Boot" in the "Info" column are not a "fixed" attribute, if you boot another OS (from another media/device) that volume will be a volume like any other one with no such attribute. Looking for cAsE UnSeNsItIve string "System" might work in your case because also the volume label is "SYSTEM", but cannot say if this is a (recent) Windows "standard", in any case, if you have more that one disk with independent Windows installs this latter "feature" may be unwanted. jaclaz
  15. The feature is in practice unavailable if you use reply "normally", you need to switch into BBcode, i.e. press the button that looks totally NOT understandable, similar to a paper clip (first on the left on the toolbar when replying) that button toggles bbcode on and off. If you click on it, the above Quote of your post will look similar to this: [quòte name=Sophy" post="1118787" timestamp="1456285606] Could someone tell me how to use the Multiquot and Quote options if there is a long post and I only want to quote and reply to certain parts of it? [/quòte] so you can copy and paste the tag before and after the parts, getting something *like*: [quòte name=Sophy" post="1118787" timestamp="1456285606] Could someone tell me how to use [/quòte] Yes ;yes;. [quòte name=Sophy" post="1118787" timestamp="1456285606] the Multiquot and Quote options if there is a long post [/quòte] It is easy, once you know how to do it. [quòte name=Sophy" post="1118787" timestamp="1456285606] and I only want to quote and reply to certain parts of it? [/quòte] Sure, that is the correct approach. ;thumbup Which will result in: Yes . It is easy, once you know how to do it. Sure, that is the correct approach. jaclaz
  16. This should work then: Maybe it is another issue with copy/paste through the board? , it should "filter" the only line with both "FAT32" and "System" in it. Try separating the issues: ECHO list volume|Diskpart>result.txt TYPE result.txt|FIND "FAT32" TYPE result.txt|FIND /I "System" TYPE result.txt|FIND "FAT32"|FIND /I "System" jaclaz
  17. You need to use ENABLEDELAYEDEXPANSION to resolve variables like !CDROM!, you have already been told this, and you have been ALREADY told to READ here: http://www.robvanderwoude.com/variableexpansion.php you need to study and understand the syntax of batch files, Delayed Expansion is something that you must become familiar with. Then strip them, the idea is that you are given some examples, they are intended to be used as a way to learn batch syntax, not that of writing the batch for you, not even snippet by snippet. However, what do you think would be the effect of: SET cdletter=%cdletter:\=% How will the value of cdletter be affected? Sometimes copy and paste (it depends on the browser, the board software, etc.) may transform Tabulators in spaces, the delims in: "tokens=3,5 delims=\ " are intended to be \ (backslash) and Tabulator (not space). jaclaz
  18. Sure, it is not EXACTLY what you want, but it does show you an EXAMPLE on how to parse the diskpart list volume. An EXAMPLE is something that you need to ADAPT to your needs. In this specific case, the diskpart command is a single one, so a simpler pipe should do: Try on your system running this and post the output: FOR /F "tokens=* delims= " %%A IN ('ECHO list volume^|diskpart^|FIND /I "efisys"') DO ECHO %%AI havent' handy a winows 7 or later system with a EFI/GPT disk to check the output of diskpart, this might also do: FOR /F "tokens=* delims= " %%A IN ('ECHO list volume^|diskpart^|FIND "FAT32"^|FIND /I "System"') DO ECHO %%Ajaclaz
  19. The [] are not "special" at all, they are just a separator, the ! is a basic part of NT batches, to use DelayedExpansion: http://www.robvanderwoude.com/variableexpansion.php I really cannot understand the question/problem. Drive letter assignment is NOT carved in stone, every Operating System will assign (or not assign) a given drive letter to a given device or volume along some "rules" or "settings" that are specific to the booted environment, no surprise that a same device or volume will get assigned a different drive letter in different environments. Your code is "botched", however, if you have more than one CD-ROM devices and you want to detect them all: of course that batch will return a single drive letter for the CD-rom, the LAST CD-ROM device found. Also since you are looking for the drive letter, you should NOT loop through all the drive letters as it will be MUCH slower, loop only through the actually Mounted ones, this will be faster: SET cdletter=FOR /F %%A in ('MOUNTVOL^|FIND ":\"') DO (fsutil.exe fsinfo drivetype %%A|find "CD-ROM">nul&&set cdletter=!cdletter! %%A)ECHO CD-ROM drive letter(s) is/are %cdletter%But still there are much faster ways than fsutil fsinfo drivetype to find out if a device is a CD-ROM, *like*: For /F "tokens=3,5 delims=\ " %%A IN ('REG QUERY HKLM\SYSTEM\MountedDevices /s ^|FIND "\DosDevices\" ^| FIND "4300640052006F006D"') DO set CDROM=!CDROM! %%ASET CDROMjaclaz
  20. Sure, partition order is NOT compulsory. But the EFI System partition (the FAT32 formatted one containining the EFI bootmanager will always be of the EFIsys type. Something like this: http://stackoverflow.com/questions/8714675/how-to-detect-if-efi-partition-is-already-mounted-in-windows-via-batch-script might do nicely. JFYI, and as a side note, there is a trick to avoid making the temporary file to feed commands in diskpart, see here: http://www.msfn.org/board/topic/126069-updated-on-feb-27-2011-ordering-messed-drive-letter-batch-file/ http://www.msfn.org/board/topic/126069-updated-on-feb-27-2011-ordering-messed-drive-letter-batch-file/?p=817388 You can find here another example of the technique: http://www.msfn.org/board/topic/173642-mkprilog-batch-to-access-a-same-disk-under-two-different-interfaces/ jaclaz
  21. It is just a "safety" measure (and to use some consistency). There is no real difference on a modern, recent system, the same batch script will run the same as either .bat or as .cmd. In theory a .bat should be associated to command.com (and it would be an actual "dos" batch), whilst a .cmd should be associated to cmd.exe (and it would be a NT batch, NOT a "dos" one, on all NT systems when you open the command prompt or the command window you are NOT running dos, you are running the NT command interpreter). But if you use batches on different OS's you might need to put in them checks to make sure they run on the "right" OS or "refuse" to run on a non-expected OS. If you name a NT batch as .cmd it will NOT run on DOS (MS-DOS or FreeDOS, etc.) and on 9x/Me. jaclaz
  22. If it's OK to use a third party tool either PowerOff: http://users.telenet.be/jbosman/applications.html or Nircmd: http://www.nirsoft.net/utils/nircmd.html should do. jaclaz
  23. Maybe you should start with getting the notion that batch files on Windows NT systems are NOT "Dos" batches (and BTW it would be smart to use NOT the .bat extension but rather the .cmd one). The detection of CD-Rom drive letter is not a "new" problem, there are several examples on the board, a same CD-ROM drive may (obviously) get a different drive letter in different environments, the assigning of the Y: to the CD-ROM drive is most probably something "specific to your PE build. Something *like* this: SETLOCAL ENABLEDELAYED EXPANSIONSET /A Counter=1for %%b 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 (dir %%b:\ToolsforPE.ISO >nul 2>nul && (set isofile[!Counter!]=%%b:\ToolsforPE.ISO&&SET /A Counter+=1)IF NOT DEFINED isofile[1] echo ISO not foundbla ...Will put in isofile[1], isofile[2}, etc. all instances found. About the list, this works on XP (and may work on 7/8 as well ): @ECHO OFFSETLOCAL ENABLEDELAYEDEXPANSIONSET list=FOR /F "tokens=*" %%A IN ('FSUTIL FSINFO DRIVES ^| FIND ":"') DO SET list=!list! %%AFOR /F "tokens=2,* delims= " %%A IN ('ECHO %list%') DO SET list=%%A %%BSET listjaclaz
  24. Loosely, you are using on an old limited power machine a very recent PE (possibly based on a Windows 8/8.1 or even 10) i.e. PE 4/5/5.1/10. This is fundamentally "wrong" in the sense that you are using something that is bigger, fatter and more bloated than what you actually *want* or *need* (if the final goal is just to run boinc.exe). If you could use an older "base" (such as a Vista WAIK - PE 2.x - or a 7 WAIK - PE 3.x) the "base" image will already be smaller. I am not sure to understand which kind of profiling you are referring to. , but maybe you could use - instead of the "plain" WAIK/ADK build one of the many "customized" builders with a "minimal" project, such as Winbuilder based projects or one of Wimb's thingies, or even the QuickPE: http://reboot.pro/files/file/340-quickpe/ In other words, you should IMHO find out what is the minimum environment you need to run that program and create the minimum PE that is suited to just run it. jaclaz
  25. NOT intended as a promotion or endorsement of a Commercial product, but JFYI there is now also a cheaper new Nophone: http://www.thenophone.com/ http://www.thenophone.com/products/the-nophone-zero jaclaz
×
×
  • Create New...