Old 9th November 2005, 22:59   #1
Oscar Prophet
Junior Member
 
Join Date: Nov 2005
Posts: 1
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.
Oscar Prophet is offline   Reply With Quote
Old 9th November 2005, 23:13   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
If you want to get Windows version, check the forum & the wiki for some functions


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 10th November 2005, 03:54   #3
mwb1100
Junior Member
 
Join Date: Nov 2005
Posts: 1
Re: Question about a DOS command (yes DOS)

Quote:
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.
mwb1100 is offline   Reply With Quote
Old 10th November 2005, 06:42   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
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
Takhir is offline   Reply With Quote
Old 10th November 2005, 07:53   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Or as already suggested use an NSIS function:
http://nsis.sourceforge.net/Docs/AppendixC.html#C.5

-Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump