DJPro Posted August 14, 2006 Share Posted August 14, 2006 Hi wixfigura,I had exactly the same error since wpi 5.1.Make sure you have the file '$winnt$.inf' in your system32 folder in windows.That was the problem I had because after an unattended install of windows i always deleted some files automatically included that file.It also didn't work with a standalone cd or dvd of WPI.When I putted back that '$winnt$.inf' file everything worked normal.Maybe this could help you? Link to comment Share on other sites More sharing options...
wixfigura Posted August 14, 2006 Author Share Posted August 14, 2006 Yeah - thats it!!! Now it works! I havent found that $winnt$.inf so Ive made an empty one. Whats that file for, if it works with nothing inside? And what does WPI do with a file that needs nothing inside? Ive searched inside the WPIscript Files and installer - file, but nothing to find. ???? Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 14, 2006 Share Posted August 14, 2006 Well WTF does that file have to do with anything? I for the life of me cannot figure out why that file would have anything to do with WPI. Link to comment Share on other sites More sharing options...
zorphnog Posted August 14, 2006 Share Posted August 14, 2006 (edited) Its used to set the dospath environment variable in generate.js, but I'm not sure what you would use the dospath variable for. Edited August 14, 2006 by zorphnog Link to comment Share on other sites More sharing options...
sadicq Posted August 14, 2006 Share Posted August 14, 2006 (edited) Look at the ReplacePath() function in generate.js.It reads some variables from that file.Edit: I and zorphnog posted at the same time. Edited August 14, 2006 by sadicq Link to comment Share on other sites More sharing options...
DJPro Posted August 14, 2006 Share Posted August 14, 2006 Yeah - thats it!!! Now it works! I havent found that $winnt$.inf so Ive made an empty one. Whats that file for, if it works with nothing inside? And what does WPI do with a file that needs nothing inside? Ive searched inside the WPIscript Files and installer - file, but nothing to find. ????Well glad for you it works now, it took me some time to figure it out why WPI 5.1 to 5.3 didn't work on my machine. Simply because of that file I was missing. Accordingly to line 120 in generate.js that file is indeed needed. This wasn't so in older versions of WPI (before 5.1).Greetz Link to comment Share on other sites More sharing options...
Djé Posted August 14, 2006 Share Posted August 14, 2006 (edited) Hey guys, I'm saying since 2 weeks that the problem is lying there... @wixfigura: Would you have replied to my questions that it would have been fixed in 5.3...This $winnt$.inf file is written by windows setup with the variables used during installation (most of them are coming from winnt.sif). In there, the dospath variable records the location of the source of the windows files actually used during installation. The code added in 5.1 was a new feature allowing the use of that location as a variable in WPI.Compared to the %CDROM% variable, it has the big advantage to exist whatever the type of install is (CD-based, HDD-based, network installation, local source, etc.), and doesn't require the use of the marker files such as wpi.hta, win51 or drivers.cab.@wixfigura: DJPro deleted the file. what about you? How come you don't have it? nLite?Use the fix below to keep going without minding for that file (it will skip the variable if the file is not found):* New ReplacePath() function in generate.js:function ReplacePath(v){ position="generate.js"; whatfunc="ReplacePath()"; var i; var rs = new String(); cddrv = FindCDRom(); sysdir = WshEnv("WINDIR") + "\\system32"; var dospath = new String(); //Exact location from which windows was installed (works with CD-based install & winnt(32).exe based install) if (FileExists(sysdir + "\\$winnt$.inf")) { var winntinf=fso.OpenTextFile(sysdir + "\\$winnt$.inf", 1); // It's recorded in the 'dospath' directive of the [data] section of \system32\$winnt$.inf. var matches = winntinf.ReadAll().match(/\ndospath=(.*)/i); winntinf.Close(); if (matches) { dospath=matches[1]; if (dospath.substring(dospath.length - 2, dospath.length - 1)=="\\") //dospath may have a trailing slash ... or not (depending on the location) dospath = dospath.substring(0, dospath.length - 2); // So let's remove it if it's there } } rs = v; //Replace WPI's special environment variables rs = rs.replace(/%wpipath%/gi,wpipath); // same as before rs = rs.replace(/%cdrom%/gi, cddrv); // same as before rs = rs.replace(/%sysdir%/gi, sysdir); rs = rs.replace(/%dospath%/gi, dospath); //Replace other (standard) environment variables (either global or defined in the process calling WPI) var envarname, envvars = rs.match(/%[^ %\f\n\r\t\v]+%/gi); // find ALL substrings enclosed in '%' and not containing '%' itself or a white space character if (envvars) // if any match { for(i=0; i<envvars.length; i++) // loop on the matches { envarname=envvars[i].substring(1, envvars[i].length - 1); // strip the match from its enclosing '%' rs = rs.replace(envvars[i],WshEnv(envarname)); // replace it by the corresponding environment variable } } return rs;} Edited August 14, 2006 by Djé Link to comment Share on other sites More sharing options...
mritter Posted August 14, 2006 Share Posted August 14, 2006 Ok, problem solved and updated.The default line for gcond[] was there before I took over the programming. There is no real reason for it to be there, just to save a little typing. I will update the code to not save it in the config.js file if not used. The guy that added the gcond put that code in there. Link to comment Share on other sites More sharing options...
Ramona Posted August 22, 2006 Share Posted August 22, 2006 (edited) FYIx64 stores this file in system32 but since the app that runs your script (mshat.exe) is only 32-bit it referances SysWOW64 instead of system32 Edited August 22, 2006 by Ramona Link to comment Share on other sites More sharing options...
Y3PP3R Posted September 4, 2006 Share Posted September 4, 2006 (edited) [sorry wrong topic, multiple windows open] Edited September 4, 2006 by Y3PP3R 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