Oscar Prophet
9th November 2005 23:59 UTC
Question about a DOS command (yes DOS)
I had to do a quick and dirty installaion to repair a customer's fubar. I needed to check the windows version. I usually do not have to do this so I have not looked at the proper script.
Using the VER command, I wanted to put the os version into a text file. I tried to do this:
ExecShell open "c:\ver.exe" "> test.txt"
and then
ExecShell open "c:\ver.exe > test.txt"
(also tried "Exec")
Neither worked (but NSIS did not gibe any errors) so I finally just copped out and used
ExecShell open "C:\testing\a.bat"
which did the trick.
Not a big deal, but I was wondering why the first and the second bits of code did not work or cause an error at compile.
Joel
10th November 2005 00:13 UTC
If you want to get Windows version, check the forum & the wiki for some functions :)
mwb1100
10th November 2005 04:54 UTC
Re: Question about a DOS command (yes DOS)
Originally posted by Oscar Prophet
Not a big deal, but I was wondering why the first and the second bits of code did not work or cause an error at compile.
The reason is that there is no ver.exe program. The "ver" command is implemented internally by the cmd.exe command interpreter. You probably would have had better luck using the command:
"cmd.exe /c ver > test.txt"
Though I'm not 100% sure that the redirection would work.
Takhir
10th November 2005 07:42 UTC
Batch file is better way for compatibility with old Wins http://forums.winamp.com/showthread....84#post1803084
To hide DOS window and to redirect output to log file you can use ExecDos plug-in.
Another way (not require output string parsing) - version plug-in http://nsis.sourceforge.net/Detect_Windows_Version
Afrow UK
10th November 2005 08:53 UTC
Or as already suggested use an NSIS function:
http://nsis.sourceforge.net/Docs/AppendixC.html#C.5
-Stu