bphlpt Posted June 11, 2011 Share Posted June 11, 2011 (edited) Sorry it didn't work for you. It's been a while since I've run Win2K, after running it for ~10 years. The above standalone script has only been tested, by me, on XP and Win7 x32. I didn't think about it possibly having a problem on Win2K, though I'm not sure why it should. I found it in Strel's SNMSynth program, http://www.msfn.org/board/topic/127790-silent-net-maker-synthesized-20100118-w2kxp2k3-x86/, which I believe is supposed to run on Win2K. So I'm confused.The original code snippet is this::FILEVERSCRIPTECHO>>TMP\FILEVER.VBS Option ExplicitECHO>>TMP\FILEVER.VBS Dim FSystemECHO>>TMP\FILEVER.VBS Set FSystem = CreateObject^("Scripting.FileSystemObject"^)ECHO>>TMP\FILEVER.VBS WScript.Echo FSystem.GetFileVersion^(WScript.Arguments^(0^)^)ECHO>>TMP\FILEVER.VBS Set FSystem = NothingGOTO :EOFCheers and Regards Edited June 11, 2011 by bphlpt Link to comment Share on other sites More sharing options...
tomasz86 Posted June 12, 2011 Author Share Posted June 12, 2011 (edited) I don't know if it's me doing something wrong or the script is wrong but I tested it on 3 different systems (w2k adv srv, w2k pro, xp pro) and always got errors... :/ On the other hand, I've been using SNMSynch with no problems here. Edited June 12, 2011 by tomasz86 Link to comment Share on other sites More sharing options...
dencorso Posted June 12, 2011 Share Posted June 12, 2011 Codeboxes are adding trailing spaces, of late. I believe jaclaz was the first to report it. Check you script for trailing spaces and be sure to remove them. They can be a PITA because they break otherwise working programs sometimes, but you don't usually see them, unless you're looking for them. This is a longshot, by maybe it'll solve your issue. Link to comment Share on other sites More sharing options...
tomasz86 Posted June 26, 2011 Author Share Posted June 26, 2011 (edited) Actually there was something wrong with my system, not with the script I reinstalled everything any now FILEVER.VBS seems to work as it is. I also found a use for dencorso's yanklines script to remove duplicates from update.ver.The real problem is update.inf. What has to be done is to merge everything according to headings in each update.inf file and then remove duplicates but only under the same heading. I don't know how to do it yet If I use yanklines for the whole update.inf, all duplicates are indeed removed but some identical lines must exist under different headings - yanklines removes all of them At this moment I just use Kdiff3 to merge update.infs as it takes less time than thinking how to prepare a script to do it automatically Edited June 26, 2011 by tomasz86 Link to comment Share on other sites More sharing options...
jaclaz Posted June 26, 2011 Share Posted June 26, 2011 Have you actually tried FEDIT?Can you post a single example of a "base" update.inf + a couple examples of the files to be merged?jaclaz Link to comment Share on other sites More sharing options...
tomasz86 Posted June 26, 2011 Author Share Posted June 26, 2011 (edited) Yes, I downloaded and checked all tools mentioned in this topic but I don't really know how I could use FEDIT when merging these files :/Here is an example (fragments only as full update.inf files are very long)Full update.inf files here: http://www.mediafire.com/file/y4nklybw4mbuog1/update.infs_to_merge.7z1.inf[Version] Signature = "$Windows NT$" LanguageType = %LangTypeValue% NtBuildToUpdate = 2195 NtMajorVersionToUpdate = 5 NtMinorVersionToUpdate = 0 MaxNtBuildToUpdate = 2195 MaxNtMajorVersionToUpdate = 5 MaxNtMinorVersionToUpdate = 0 MinNtServicePackVersion = 768 MaxNtServicePackVersion = 1024 ThisServicePackVersion = 1280 CatalogFile = %SP_SHORT_TITLE%.cat[System32.Files] acctres.dll adsiis.dll adsldp.dll,,,8 adsldpc.dll,,,8[Cache.Files] acctres.dll adsiis.dll adsldp.dll,,,8 adsldpc.dll,,,8[Strings] CMAKRegkey="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Cmak.exe" ProxyRegKey="SYSTEM\CurrentControlSet\Services\WSPSrv\Parameters" IeRegKey="Software\Microsoft\Windows\CurrentVersion\App Paths\iexplore.exe" ResKitPathKey="SOFTWARE\Microsoft\ResKit\NameSpace\Windows 2000 Resource Kit" HyperRegKey="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\hypertrm.exe" EudcRegKey="Software\Microsoft\Windows\CurrentVersion\App Paths\eudcedit.exe" AdmtRegKey="SOFTWARE\Microsoft\ADMT" TsclientRegKey="SOFTWARE\Classes\conman.exe\DefaultIcon" BUILDTIMESTAMP =20050809.32623 HelpLink = "http://support.microsoft.com?kbid=891861" URLInfoAbout = http://support.microsoft.com SP_KB_NUMBER = "KB891861" SERVICE_PACK_NUMBER = 52.inf[Version] Signature = "$Windows NT$" LanguageType = %LangTypeValue% NtBuildToUpdate = 2195 NtMajorVersionToUpdate = 5 NtMinorVersionToUpdate = 0 MaxNtBuildToUpdate = 2195 MaxNtMajorVersionToUpdate = 5 MaxNtMinorVersionToUpdate = 0 MinNtServicePackVersion = 1024 MaxNtServicePackVersion = 1024 ThisServicePackVersion = 1280 CatalogFile = %SP_SHORT_TITLE%.cat[System32.Files] adsmsext.dll,,,8 BASESRV.DLL,,,8 browser.dll,,,8 browseui.dll cabinet.dll[Cache.Files] adsmsext.dll,,,8 BASESRV.DLL,,,8 browser.dll,,,8 browseui.dll cabinet.dll[Strings] CMAKRegkey=SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Cmak.exe ProxyRegKey=SYSTEM\CurrentControlSet\Services\WSPSrv\Parameters IeRegKey=Software\Microsoft\Windows\CurrentVersion\App Paths\iexplore.exe ResKitPathKey=SOFTWARE\Microsoft\ResKit\NameSpace\Windows 2000 Resource Kit HyperRegKey=SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\hypertrm.exe EudcRegKey=Software\Microsoft\Windows\CurrentVersion\App Paths\eudcedit.exe AdmtRegKey=SOFTWARE\Microsoft\ADMT TsclientRegKey=SOFTWARE\Classes\conman.exe\DefaultIcon BUILDTIMESTAMP =20080110.104158 HelpLink = "http://support.microsoft.com?kbid=942831" URLInfoAbout = http://support.microsoft.comLangTypeValue = 9 Edited June 26, 2011 by tomasz86 Link to comment Share on other sites More sharing options...
jaclaz Posted June 26, 2011 Share Posted June 26, 2011 You are right these particular .inf files need some "special treatment".There are lots of "beautifying" uneeded spaces that create havoc! Additionally you simply cannt write properly with FEDIT something that is ALREADY between double quotes (like "$Windows NT$").I'll do some tests with batch and a bunch of utilities and let you know.jaclaz Link to comment Share on other sites More sharing options...
jaclaz Posted June 28, 2011 Share Posted June 28, 2011 I'll do some tests with batch and a bunch of utilities and let you know.Did some tests, and the matter is a bit complex, but now I can say it can be done, though not with "ini related" tools, since the .inf seem like having a "queer" set of rules.Don't expect anything too soon, but I have great expectations from a new approach I just took ... jaclaz Link to comment Share on other sites More sharing options...
tomasz86 Posted June 28, 2011 Author Share Posted June 28, 2011 Thank you very much for your interest.Don't worry and just take your time It's better not to be too hasty when doing these things (as I experienced myself when doing some of my projects...). Link to comment Share on other sites More sharing options...
Yzöwl Posted June 28, 2011 Share Posted June 28, 2011 It's better not to be too hasty when doing these things (as I experienced myself when doing some of my projects...).I'm interested to know which projects you've done! Link to comment Share on other sites More sharing options...
tomasz86 Posted June 28, 2011 Author Share Posted June 28, 2011 I'm interested to know which projects you've done!Most of them are in my signature except of these also several unofficial updates for Win2k... Link to comment Share on other sites More sharing options...
Yzöwl Posted June 28, 2011 Share Posted June 28, 2011 Thanks for the reply, I didn't realise you were classing those as projects. Link to comment Share on other sites More sharing options...
tomasz86 Posted June 29, 2011 Author Share Posted June 29, 2011 I didn't realise you were classing those as projects.Should I not? Alternatively you can say it's just a one big project called "Let's keep Windows 2000 alive!". Link to comment Share on other sites More sharing options...
jaclaz Posted July 12, 2011 Share Posted July 12, 2011 (edited) NOT the intended "final" result, ONLY "intermediate steps".Find attached three batches.splitinf.cmd - to split an existing .inf (run it with one parameter, the original .inf)join_inf.cmd - to join the split parts created by the above (run it with one parameter, the SPLIT_ directory)beautify.cmd - to make the result more readable and reset some changes I have to do to the Split parts to process them easily in batchgsar is needed:http://home.online.no/~tjaberg/Basically:create a directory (please NO spaces in paths or filenames) like C:\INFTESTput in it the batches, gsar.exe and the (basis)Windows2000-KB891861-v2-x86-ENU.EXE.inf (please rename it to something manageable, like "base2K.inf"), never use in filenames characters that are parsed by the command line, like "(", ")", "&" "|" and interpreted like commands or are however part of syntax or need to be escaped normally, even if allowed on the filesystem, see here:http://en.wikipedia.org/wiki/Filename(please note how right now the batches do use "[" and "]" so may be not good on a FAT filesystem, please use them on a NTFS one) open a command prompt and navigate to the directory you made:CD /D C:\INFTESTrun:splitinf.cmd base2K.infjoin_inf.cmd SPLIT_base2Kbeautify.cmd JOINED_base2K.infthe "end result", i.e. BEAUTY_JOINED_base2K.inf should be comparable with the original base2K.inf and be a "fully" working .inf fileIf not, post which problems there are.Once we get these steps working successfully, we will talk about the actual merging of the "base" with another "split" file....Also, I have noticed that in some of the "example files" there are many "empty" sections, are they actually *needed* (right now they are mantained as they are)?Please note how the above are early, preliminary tests and the actual .cmd's need to be cleaned and polished a lot (and quite a bit of "error controls" need to be added to them).jaclazsplit_inf.zip Edited July 12, 2011 by jaclaz Link to comment Share on other sites More sharing options...
tomasz86 Posted July 13, 2011 Author Share Posted July 13, 2011 (edited) Wow I've just done four tests:1. A simple update.inf from a single W2K update - w2k_KB838989.infNo problems. The only difference was in the number of spaces under [Version].2. Update.inf from Update Rollup 1 for W2K - w2k_KB891861-v2.infThere are two problems:- "==" changes to "§#§"- "&" changes to "§##§" 3. Update.inf from Update Rollup 2 for W2K - w2k_KB891861-UR2-v2.infFirst of all, I got this when doing splitinf.cmd It continued after that. No problems occured during join_inf.cmd and beautify.cmd.In the final file:- "ECHO is off." was inserted several times in many different places.- one line is missing (?)- "mod by jaclaz" at the end of the file4. Update.inf from SP4 for W2K - w2k_SP4.inf- In SP4's update.inf there is [sourceDisksFiles] twice (each of them is different). One of them was changed.As for the empty sections, they are not needed when empty and needed when not empty. There are some sections that are almost never used but there can be just one update that uses such a section. I think it's better to have them all Edited July 13, 2011 by tomasz86 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now