Content Type
Profiles
Forums
Events
Everything posted by jaclaz
-
echo %date%
jaclaz replied to net_user's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Scripts which are required to output localized Strings are often going to have to be altered for each environment. The example you have posted above is basically Bilingual, we could perhaps expand it by adding German, but where would it end? Sure , I know where it starts, not where it ends.... ...till then if you have an Italian system it works (tested) should also on a En-Us one (untested). In other words it wasn't meant as the "ultimate batch solution to all date formatting problems" , but rather as a "quick and dirty batch solution that may work, and YMMV" . I presume that members using another localization can add their own "months" and "country code", since the few lines that need changes/additions are quite clearly laid down. jaclaz -
Yes, there are quite a few of these. Clonedrive have been around since a lot of time, and while handy, in a NT based system (2K/XP/2003/Vista /2008/7) besides many other ones, a tool capable of mounting also floppy and hard disk images is even handier. I normally use IMDISK: http://www.ltr-data.se/opencode.html/ http://reboot.pro/forum/59/ jaclaz
-
Happy problem is solved/culprit has been found. jaclaz
-
echo %date%
jaclaz replied to net_user's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
This "pure batch" should work. @ECHO OFF SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION ::Get the current date format FOR /F "tokens=2,3,4 delims=(/)" %%A IN ('VER ^| DATE ^| FIND "("') DO ( Set First=%%A Set Second=%%B Set Third=%%C ) ::Get the Current Date FOR /F "tokens=2,3,4 delims=:/" %%A IN ('VER ^| DATE ^| FIND /V "("') DO ( Set /A First_value=%%A Set /A Second_value=%%B Set /A Third_value=%%C ) ::Add here Local settings ::This is Italian IF "%First%%Second%%Third%"=="ggmmaa" ( SET Day=First SET Month=Second SET Year=Third SET Lang=IT ) ::This is English-US IF "%First%%Second%%Third%"=="mmddyy" ( SET Day=Second SET Month=First SET Year=Third SET Lang=ENUS ) ::SET Variables ::Change string values of variables according to your language IF "%Lang%"=="ENUS" Set Months=January February March April May June July August September October November December IF "%Lang%"=="IT" Set Months=Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre Set Counter=0 For %%A IN (%Months%) DO ( SET /A Counter+=1 SET Month_!Counter!=%%A ) SET Index=!%Month%_value! ::Example output (change as you wish order of variable output and/or add separators) ECHO !%Day%_value! !Month_%Index%! !%Year%_value! jaclaz -
I'll try to clarify the extents of my previous posts. There are mainly three "vital" sets of drivers in a NT system: Mass Storage drivers Video drivers Chipset/processor drivers Once upon a time: there were NO Sata disks and *all* (or most) PC's used "Standard Dual Channel PCI IDE Controller" driver the drivers for existing video cards were included in the set of "built-in" drivers. a "same family" of motherboards/processors used the same chipset/processor drivers In most cases you could "move" NT systems with a few very simle steps. Nowadays, since: each SATA controller has it's own drivers each video card has it's own dirver each motherboard/chipset has it's own driver the "move" has become much more complex (still possible, but complex in most cases). Anyway, unless we are talking of so-called "volume License" OS, it is likely that you will need reactivation for XP. Here is the "old way": http://www.michaelstevenstech.com/moving_xp.html SInce then, some new techniques/approaches have been developed, including that of "injecting" drivers on the offline image/disk (and much more): http://www.911cd.net/forums//index.php?showforum=43 jaclaz
-
Installed second hard drive. vista will not boot.
jaclaz replied to esecallum's topic in Windows Vista
It looks more complex than it is. And of course you can use other methods/paths, including that of restoring Vista bootsector with the "repair" .iso or the EasyBCD and then add to the Vista BCD the entry for the "legacy" NT 5 (XP), and as said it is possible that once you have the Vista BOOTMGR booting again it will automagically find the BOOT.INI and add it's option to the BCD. What I tried to tell you was more WHAT you need to do (represented by the given links and pictures) and one possible way to do it (as opposed to "the only way to do it") . EasyBCD is a tool, you need to know WHAT to do with it, then learn HOW to do it with the tool, in order to be successful, form your initial post you sounded like you hadn't no idea of the WHAT, once you know it, learning HOW is just a matter of reading docs: http://neosmart.net/wiki/display/EBCD/Repairing+the+Windows+Vista+Bootloader which anyway contain quite a bit of deceiving info : The above is - to say the least - inaccurate, in your case there is NO damage whatsoever to the Vista files/structure, and all is needed is to restore the Vista bootsector CODE. Another app capable of doing this is RMBootSect.: http://sites.google.com/site/rmprepusb/documents/release-2-0 What you need to know is that you are not in a condition of "catastrophic failure" and you need NOT to take the whole set of steps listed in the mentioned page, you ONLY need to run bootsect.exe (or similar tool) to restore the Vista bootsector that was overwritten by the XP install, then, if an entry for XP is not automatically added, add it manually. jaclaz -
A very simple one: http://reboot.pro/414/ Current link: http://f0dder.dcmembers.com/fsekrit.index.php jaclaz
-
Installed second hard drive. vista will not boot.
jaclaz replied to esecallum's topic in Windows Vista
Let's clear the possible misunderstanding. And no, BCD itself won't probably be of use. When you install an OS; it will boot from FIRST hard disk. (normally and specifically from Active Primary partition of FIRST hard disk). If you added a "new", second hard disk, and did not remove/disconnect the "old" first one, the former will be second disk. When you install XP, it will: overwrite the MBR (containing the VIsta MBR) of the FIRST hard disk with the XP one (this normally is NOT a problem unless you use bitlocker) overwrite the PBR (or bootsector) of the active partition on FIRST hard disk (containing Vista boot code invoking BOOTMGR) with XP one (invoking NTLDR) Quite obviously XP install cannot know nothing about Vista, so it doesn't provide for a way to ADD to it's booting scheme, based on NTLDR+NTDETECT.COM+BOOT.INI, a previous install of a later OS. Now what you need is two-fold: you need to restore the Vista boot then use bcdedit, EasyBCD or any other BCD editor to add to the BCD an entry for booting XP. An alternative is chainloading from NTLDR/BOOT.INI a third party bootmanager capable of directly chainloading the NTLDR and the BOOTMGR, like grub4dos. In the Active, Primary partition of your FIRST disk you should have: BOOTMGR \boot\BCD\ NTLDR NTDETECT.COM BOOT.INI Then get grub4dos from here: http://code.google.com/p/grub4dos-chenall/downloads/detail?name=grub4dos-0.4.5b-2011-05-09.7z&can=2&q= Open it in 7-zip and extract ONLY the file grldr to the active primary partition of first hard disk. Now open the BOOT.INI on first hard disk and add to it a line: C:\grldr="grub4dos" Save and reboot. You should land to a chioice between Windows XP and grub4dos, choose grub4dos. You should land to a grub> prompt. In it type: chainloader /bootm and press [TAB] key. You should be able to see bootmgr listed (and the line should autocomplete to) chainloader /bootmgr if not type the missing characters until it is complete as per above. Then press the [ENTER] key. Now type: boot and press the [ENTER] key. Additional info in the Guide: http://diddy.boot-land.net/grub4dos/Grub4dos.htm The Vista should boot normally. It is possible that you will also find added an option to boot XP "automagically". If not it's time to use a BCD editor to add an entry for XP. Reboot and repeat the above, veryfying that the entry in BCD works, ie: choice between XP and grub4dos choose grub4dos repeat given commands at grub4dos prompt choice between Vista and Xp choose XP you should now have looped to #1 above choose XP verify it boots OK Then: reboot choice between XP and grub4dos choose grub4dos repeat given commands at grub4dos prompt choice between Vista and Xp choose Vista verify it boots OK Then, still booted in Vista you need to run bootsect.exe /NT60 C: http://technet.microsoft.com/en-us/library/cc749177(WS.10).aspx in order to restore the PBR/bootsector code to the one loading Vista's BOOTMGR Some details of how a "normal" XP+Vista boot are here: http://www.multibooters.co.uk/multiboot.html with pictures. You are currently in this situation: You have to get into this one: Booting Vista: Booting XP: jaclaz -
Install Win XP and Office 2003 Problem - SOLVED!
jaclaz replied to Mobes's topic in Install Windows from USB
@Mobes The batch should have generated THREE logs: %temp%\source.log %SystemDrive%\source.log %SystemRoot%\source.log Just use this batch: echo Source %Source% set temp set System PAUSE echo Source %Source% > %temp%\source.log echo Source %Source% > %SystemDrive%\source.log echo Source %Source% > %SystemRoot%\source.log And read it's output before hitting "any" key. jaclaz -
Let's (for the moment) assume that you have NOT this problem. What makes you think that an OS like (I presume) XP (or anyway any of the NT family) will be able to boot on different hardware without SERIOUS changes to it's settings (drivers)? Normally an OS configured on a given hardware CANNOT be booted successfully on different hardware. When it happens, IF it happens it is more a "collision" or coincidence than anything else. More over there are high probabilities that once an attempt to boot has been made on the "new" hardware, the OS won't be able to boot again on the "old" hardware. You might need (as said set apart the problem you are currently facing) a completely different approach. jaclaz
-
A side question then, what kind of backup do you trust ? Tape, removable media ? Also NEVER trust a tape. Also NEVER trust a CD/DVD. The only real solution is REDUNDANCY: http://en.wikipedia.org/wiki/Redundancy_(engineering) Let's say that you have in a given timeframe, say three years, the same probability of a failure for *any* magnetical or optical backup media. Let's assume that every 100 media (CD/DVD, tapes or hard disks) you have an average of 5 "total" failures in the given timeframe, a 5% probability. The consequence of one failure if only one "original" exists, is obviously (partial or total) data loss in 100% of cases, i.e. you have 5% probabilty of losing data. 1 original + 1 backup probabilities are not 50% of 5% i.e. 2.5%, but rather around 0.05x0.05=0,0025 or 0,25% 1 original + 1 backup + 1 copy of backup probabilities are not 33% of 5% i.e. around 1.65%, but rather around 0.05x0.05x0.05=0,000125 or 0,025% See last example here: http://www.weibull.com/hotwire/issue25/hottopics25.htm In my experience Optical media like CD/DVD have shown (if properly stored, i.e. not overheated/exposed to sun, and possibly held vertically in their case) a relatively high level of reliability, definitely higher than tapes (which in my personal experience have always been a most frightful nightmare, in practice NEVER actually working when needed ). But again, you should use some burning app with redundancy/error correction, examples: Commercial: http://www.infinadyne.com/accuburn-r.html Freeware/Open Source: http://dvdisaster.net/en/ Hard disks are pretty fine too (besides being more handy). BE AWARE of the "false" security a RAID 5 may provide: https://www.redhat.com/archives/fedora-list/2003-December/msg01731.html Of course it depends on the actual value you give to your data, as a RAID 10 solution is costly, and actually more aimed to "no downtime" than to "data integrity", but having two copies (besides the "original") of all meaningful data is doable by almost everyone, point is that most people are on the extremes of the line: some simply do not backup "anything" (until it is too late ) some backup "everything" (with an unneeded amount of time for the process and money for the media that is very high) Very few do the "right thing" (IMHO): have meaningful data backed up with redundancy (example: work data, family pictures and movies, etc.) simply ignore "expendable" items, (example: programs, commercial movies, songs, anything that can be replaced or procured anew IF needed) If some common sense is used, you will find out that the actual UNreplaceble things amount to a fraction of the contents of your hard disk, so everyone can afford to have this relatively small amount of data properly saved (TWICE). jaclaz
-
Batch file to find directories
jaclaz replied to JMA1GDO's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Sure , most people have not much fantasy when naming folders.... OT, and JFYI, a few people actually find FUN using malformed names : jaclaz -
Wrong question. Hard disks know nothing about time passing. SMART know even less. To a hard disk 1 year, 1 month, 1 week, 1 hour, 1 minute or 1 second are just the same thing: 1 unit. SMART is trying to tell you that probably (but NOT definitely) and judging from what happened lately inside the HD, it is possible that in 1 (or very few) units your hard drive will die on you. Historically SMART has a correct prection ratio (accuracy of actual consequences derived from SMART warnings) very, and I mean VERY near 0% (zero), meaning that I have seen disks with SMART nagging about above thresholds error whirling away for years without ANY problem and disks 100% OK that failed less than 1 hour later. BUT sector reallocation is the single SMART parameter that apparently can be trusted to a certain extent. See the known google study: http://labs.google.com/papers/disk_failures.pdf And anyway, why risking? Get another hard disk, NOW, image the old disk to it, re-initialize the old disk with it's manufacturer utility, use the old one ONLY for "tertiary" (i.e. third item or second copy ) in your backup setup. It is possible that for this it will work allright for a few more years, but don't trust it (actually NEVER trust a disk drive). jaclaz
-
HP Notebook: The recovery partition could not be found
jaclaz replied to ahmad2080's topic in Software Hangout
Yes, guess why at first boots you get a nagging reminder about making the CD/DVD's? (you know the one that pi§§es you off and that you check to never show again?) Even better than the above would be to buy PC's that come with either "full" software and OS media or with a pre-made recovery media. And an even better one would be to make yourself an image of the disk. Back to your problem: It is possible that the Recovery partition contents are still "OK" (at least before you changed something in it) but *something* minor - but stil needed - has gone beserk, like the actual MBR that loads the partition or the bootsector of the recovery partition or even a small "tag file" somewhere. No way to know. Please note that the OP that started this thread had an HP with Vista installed, yours has XP MCE, they "behave" differently as OS, it is probable that also the recovery system partition uses different versions of the tools or different tools altogether. A good idea would be if you could start a new thread about your issue. Since your XP is booting allright, it will be easier to get some info. Provided that your "XP" drive is C:\ and that the "Recovery partition" is D:\, open a command prompt and run in it: DIR D: /S>C:\HP_MCE.DIR Compress the resulting file C:\HP_MCE.DIR into a .zip archive and attach the archive to your post. Additionally get HDhacker: http://dimio.altervista.org/eng/ and use it to backup the MBR (first sector of \\.\PhysicalDrive) and the bootsectors/PBR of partitions C:\ and D:\ (first sector of each \\.\Logicaldrive). Also add these three files to the .zip archive. Maybe with this data we can find the "culprit" or find an alternative way to actually start the recovery process. As said, a good idea would be - if you have this possibility - to make a full, dd-like image of the whole disk (better be safe than sorry) in order to be able, should things go worse that they are, to get back safely to current situation. jaclaz -
Batch file to find directories
jaclaz replied to JMA1GDO's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
That's strange. On my XP machine I can have directories containing ";" in the name, "forbidden" characters are: \ / : * ? " < > | And this is confirmed here: http://support.microsoft.com/kb/177506/en-us though the ";" is NOT in the list of "allowed". jaclaz -
Cannot say, there are NO specs on those pages, you want a "3.3V" TTL cable and NOT a "5 V" one, read, AGAIN, READ ME FIRST: point #10 AND FGA'S: point #6 BUT, the PL2303 series of chips appear to be 3.3V: ask the seller to confirm it is 3.3 and NOT 5 V jaclaz
-
HP Notebook: The recovery partition could not be found
jaclaz replied to ahmad2080's topic in Software Hangout
First thing, if you have the option, CREATE the CD/DVD's. You were NOT supposed to make partition active, using attrib, etc. The "partition cannot be found" means, strangely enough , that the partition has not been found (this can happen for a number of reasons, among which somethng - even accidental that changed the partition ID or a "tag" file in it or it's volume name, or whatever). Since you semingly CAN make the CD/DVD,s do them, NOW, it may be your last and ONLY possibility. jaclaz -
How to install Windows from USB- WinSetupFromUSB with GUI
jaclaz replied to ilko_t's topic in Install Windows from USB
I guess that the question was "can you post a snippet of the AutoIt code you have in WinsetupfromUSB (or make a selfstanding little app)?" @kadetov1 Some info is here, though not really "finalized" AFAICU: jaclaz -
Batch file to find directories
jaclaz replied to JMA1GDO's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
You are welcome , but as said, stil a lot of work (error trapping) is needed. What if the user just hits [ENTER]? What if he enters "a", "b" (or "micky mouse" or "goofy" ) ? You do understand that the batch changes current directory to <driveroot>\projects\ and "never goes back", right? jaclaz -
Batch file to find directories
jaclaz replied to JMA1GDO's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Wouldn't "tokens=* delims=" or "delims=" be better? I mean, we don't know if any dir has ";" in it's name.... http://www.robvanderwoude.com/ntfortokens.php jaclaz -
Batch file to find directories
jaclaz replied to JMA1GDO's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
How MANY results do you expect? I mean like: a handful less than ten between ten and 99 infinite In the meantime a couple notes. What is the %CD%? Since you are looking ONLY for directories, you should use the /AD switch: DIR /b /AD and maybe also the /s one, as this way you will get a "full path" as reply You cannot "feed a list" to SET /P! You don't need to create a temporary file, this should work: @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION CLS cd \. cd projects SET My_path=%~dp0 SET My_search="*%**" :loop SET /A My_counter=0 SET MY_ DIR "%My_search%" /AD /b >nul 2>&1 IF %ERRORLEVEL%==1 ECHO NOT FOUND&GOTO :EOF FOR /F %%A in ('DIR "%My_search%" /AD /b' ) DO ( SET /A My_counter+=1 ECHO !My_counter! - %%A&SET My_dir_!My_counter!=%%A ) SET /p My_choice=Please input number of directory: IF NOT %My_choice% LEQ %My_counter% ECHO Wrong, last dirnum is %My_counter%&PAUSE&GOTO :loop ECHO You chose directory !My_dir_%My_choice%! SET MY_ Mind you only a rough sketch, some more serious error control is needed if it is to go into the hands of "final users". The ERRORLEVEL check can be avoided (and thus the double DIR command) if you check the output of the DIR command when NO item is found, in your language. jaclaz -
Cloud computing and future career as IT Professional ?
jaclaz replied to albertwt's topic in General Discussion
Sorry, but it is stronger than me , two possible scenarios for the future.... http://www.marriedtothesea.com/ jaclaz -
The Solution for Seagate 7200.11 HDDs
jaclaz replied to Gradius2's topic in Hard Drive and Removable Media
Ok, got it Reading around some more, it appears that CC1H should not be affected by BSY or LBA.0. So I'm in the wrong thread, sorry about that. What else can I do? What does that clicking mean, what's the disk trying to do at that time? I'm thinking that there is still hope of data recovery with a spinning rotor and a PCB detected by BIOS. I'll try to find a relevant thread.. if anyone has suggestions, please direct me. Thank you. PS: I cannot afford the professional services from Seagate, so I'm gonna try to do it myself. No ideas, sorry. The fact that you cannot "talk" to the PCB should mean that the PCB has some problems (alt least in the TTL serial module), so you have to try to change it, only you cannot do it as a DYI job, and you need anyway to have someone with the proper knowledge/tools to get the data from the eprom on your PCB and put them on the replacement one or physically desolder and re-solder the EPROM. I wouldn't trust the "CC1H1" is not affected. In some cases the procedure to fix the BSY or LBA0 has been reported to anyway reset *something*. Compare with READ-ME-FIRST point #1 (last sentence of "FOREWORD"): Essentially if you can perform the fix, it may solve the problem nonetheless (or it may be irrelevant) but curretnly you CANNOT perform the fix since you cannot talk to the disk. WHICH other "working hard disk" did you try? Same exact model (7200.11)? The cable may be able to talk to the other HD and may have problems with the settings needed for the 7200.11. Or you may have had a "bad connection" somehow. Trying once again to get to the prompt is advised, but if you cannot you are pretty much stuck wothout "professional" help. jaclaz -
The Solution for Seagate 7200.11 HDDs
jaclaz replied to Gradius2's topic in Hard Drive and Removable Media
READ this sticky : AND the two posts just above yours. jaclaz -
echo %date%
jaclaz replied to net_user's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
See here: http://www.robvanderwoude.com/datetiment.php Depending on how "universal" you want the solution to be, there are solutions anging from very simple to very complex. A simple one, only valid for your example/language/regional setting could be: FOR /F "tokens=2" %%A IN ("%Date%") DO ECHO %%A Another one is: CALL :SUB %Date% .... GOTO :EOF .... :SUB ECHO %2 GOTO :EOF jaclaz