Archive: Joining 2 text files together


Joining 2 text files together
YES I know the afro geezer has made it already and I love him for it dearly of course. Here it is.

However I also know that when I call the function - like this:

Push "$ROOT_INST_DIRECTORY\filelist.log"
Push "$ROOT_INST_DIRECTORY\filelist2.log"
Push "C:\temp\c-evol-temp.txt"
Call JoinFiles

- it gives the default XP error message, and quits on me. This does not make me a happy bunny.

Any suggestions? Thanks, I know I'm a bit of a regular here now which I apologise for!

Rob


Default XP error message? Do you mean it crashes? Can you include more details?


Oh yeah it crashes let me find the errors. I'll attach an XML file which MS so handily provide.

The basic error is just "MainExecutable.exe has encountered a problem and needs to close. We are sorry for the inconvenience."


There's that attachment


Does it work if you push the parameters in the right order? You need to push the output file first.


That text file doesn't have too much to offer. Can you copy and paste the details from the message itself (some numbers should show up when you click on "more details")? That, along with the exact NSIS version, should provide the exact location of the crash. A Dr. Watson's log will be even more useful.


Yeah i even created 3 temp files and tried to join them all together, no joy, and also 2 temp files and leave the output file to be created. All same prob.


The error report initial data says this:

AppName: Main-Executable.exe AppVer: 0.0.0.0 ModName: kernel32.dll
ModVer: 5.1.2600.1106 Offset: 0001a918

The technical info not in the XML file cannot be copied and pasted. I can look for an entry in it if you tell me what to look for.

In the NSIS dir there's a nsis20.exe file, I assume that means it's version 2.0?


Have you tried 2.01?


No I haven't, but afro's thing was written last year and I'd have thought it would work with 2.0. I can upgrade if necessary.


And eek when I install the new one and try to recompile with logging enabled, it says this:

Ui.obj : error LNK2001: unresolved external symbol __aullshr
Release-zlib/exehead_zlib.exe : fatal error LNK1120: 1 unresolved externals


Since the access violation is in kernel32.dll, I'll need the entire stack trace. Dr. Watson provides this.

See this thread about the compile problem.


I went back to the old version :)

Just for future reference as well I solved the problem by using the Windows command line operator >> which appends output to the end of a file, like this:

ExpandEnvStrings $0 "%COMSPEC%" ; Set Windows to interpret the command
nsExec::Exec '"$0" /C ${UNZIP} ${PATH} -o ${FILE} >> "filelist.log"' ; Unzip and log.


Oh and thanks again for your help kichik you're invaluable!


I'll check out the function when I get home and see if I can find a problem.

-Stu