shorterxp Posted June 22, 2016 Share Posted June 22, 2016 (edited) Dear MSFN I'm curious how to resolve... essentially everything works like it should on a slower machine, yet when I replicate installation on a newer build, command lines which should be executed sequentially, some get missed out, as if the computer is too fast to keep up. The nlite install is XP and is identical in each case, the only thing different is newer hardware. It's actually a list of command lines in a "register.bat" (not sure if .cmd works better). This is executed after completed extraction of a SFX.exe, a cabinet called upon by RunOnce utility at setup. Everyhting works flawlessly on an older laptop, both a single and a dual core, just not this 3GHZ quad core, 8GB ram machine. This is hardly consequential but it's a VBS script which I already spent considerable time trying to get going (let's waste more heh). Essentially dummy .zip file is called open, following VBS script closes it immediately after, this initializes .zip folders in XP before logon, which would otherwise show unrecognized because of nlite (I left that option unticked but you can't be sure with nlite!) @echo off REGSVR32.EXE /s MpaDecFilter.ax REGSVR32.EXE /s DSMSplitter.ax REGSVR32.EXE /s DSMMuxer.ax REGEDIT /s hubble.reg REGEDIT /s AddressBar.reg REGEDIT /S Qlaunch.reg REGEDIT /S misc.reg REGEDIT /S color.reg REGEDIT /s mplayerc.reg ZipFile.zip %windir%\system32\cmd.exe /C "START /WAIT CScript %windir%\system32\ZipClose.vbs //NoLogo" del %systemdrive%\windows\system32\*.reg exit Is there something I can put between the lines, a delay perhaps or is this something different? I'm concerned that a machine can just run missing out entire chunks of code - makes you question the integrity of XP sometimes Ideas Appreciated Edited September 9, 2016 by shorterxp Link to comment Share on other sites More sharing options...
jaclaz Posted June 22, 2016 Share Posted June 22, 2016 Possibly you have EXTENSIONS ENABLED. Use Start /Wait "PUT A TITLE HERE" REGSVR32.EXE /s MpaDecFilter.ax etc.. See:http://ss64.com/nt/start.html Does it make a difference? Side notes: What is the point of using %Windir$\System32\cmd.exe? IF the batch runs, a cmd.exe has been already started. You normally use .cmd for batch files intended to be run under NT and .bat for batch files intended to be run under DOS and 9x/Me. In theory .bat is associated to command.com, whilst .cmd is associated to cmd.exe. jaclaz Link to comment Share on other sites More sharing options...
shorterxp Posted June 23, 2016 Author Share Posted June 23, 2016 (edited) Hi JA Gee extensions never thought of that. They are off on default - is it more appropriate to ignore them in the lines then? IIRC this issue seems be specific to BATS executed from within/after SFX extraction. "%Windir$\System32\cmd.exe" and what follows is a example I copied/pasted. Should I get rid of it? I will give your /wait suggestion a go. Thanks for the link. Keeping in mind nlite.cmd from runonce calls out SFX which in turn executes the problematic .bat... Are you suggesting to put .cmd in the SFX instead? I think DOS is gui-less windows, therefor my gut says I should use .cmd. Wonder why bat be so popular(?) Another occasion you have helped me out buddy, one and only ... cheers Edited June 23, 2016 by shorterxp Link to comment Share on other sites More sharing options...
shorterxp Posted June 23, 2016 Author Share Posted June 23, 2016 I think you mean this type of extensions... Link to comment Share on other sites More sharing options...
Tripredacus Posted June 23, 2016 Share Posted June 23, 2016 9 minutes ago, shorterxp said: I think you mean this type of extensions... Look in the link that was posted for command extensions. When executing a 32-bit GUI application, CMD.EXE does not wait for the application to terminate before returning to the command prompt. This new behavior does NOT occur if executing within a command script. Link to comment Share on other sites More sharing options...
shorterxp Posted June 23, 2016 Author Share Posted June 23, 2016 So to confirm, either use bat with wait, or just replace .bat with a identical text file (saved as .cmd) and run the .cmd from within SFX. Alternatively to be hardcore, use both :devil:... I've yet to test. I will update to see how things work out. I still find it odd the slower machine doesn't do this. Thanks again. Link to comment Share on other sites More sharing options...
jaclaz Posted June 24, 2016 Share Posted June 24, 2016 (edited) Usual disambiguation needed. DOS is an operating system (command line only). It has a scripting language that uses the .bat extension for its scripts to trigger the command interpreter which is command.com Windows 9x/Me is essentially DOS (see above) with added a GUI shell (this is intentionally simplified, let's not have the usual "no Windows 9x/Me is a full 32 bit OS" type of objection), it still uses .bat files and the command.com command interpreter. Windows NT and later DO NOT HAVE DOS, they have a command interpreter (which is cmd.exe and not command.com) that runs script files, similar but NOT identical to DOS batches, with the .cmd extension, but also a .bat file will run in NT and later. It is recommended in NT and later to use the .cmd extension because this way a batch file written for cmd.exe but having the .bat extension won't be accidentally run on a DOS or Windows 9x/Me system, personally I remove the association to .bat from NT systems in order to avoid the reverse. We are talking here of COMMAND EXTENSIONS, they are a feature of the command interpreter (cmd.exe) not FILE EXTENSIONS (in Explorer). By default AFAICR these are turned on, but they are user configurable, so it is good practice to always start a .cmd batch eith either: @ECHO OFF SETLOCAL ENABLEEXTENSIONS or @ECHO OFF SETLOCAL DISABLEEXTENSIONS in order to know for sure if locally (i.e. within the batch) they are ON or OFF. jaclaz Edited June 24, 2016 by jaclaz Link to comment Share on other sites More sharing options...
shorterxp Posted September 9, 2016 Author Share Posted September 9, 2016 (edited) Yeah, sorry for taking long time to post as fixed. It was indeed extensions, as you suggested, they were enabled (on by default) and was calling CSScript command twice, once via CScript, and second ZipClose.vbs (.vbs is looked up automatically and appropriate .exe used, as is typical when extensions are on). I just had to remove "CScript" from the line. I also made the BAT a CMD. Code is much tidier now and all works well. Thanks for the help! Edited September 9, 2016 by shorterxp Link to comment Share on other sites More sharing options...
jaclaz Posted September 9, 2016 Share Posted September 9, 2016 Good, everything is well that ends well . jaclaz 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