Old 9th June 2009, 17:48   #41
jweinraub
Senior Member
 
Join Date: Jan 2004
Posts: 197
Send a message via AIM to jweinraub
where do i get exdll.h and other dependencies so i can build my own copy so i can try to add win7 items?
jweinraub is offline   Reply With Quote
Old 9th June 2009, 18:03   #42
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,165
download the source @ http://sourceforge.net/project/showf...ckage_id=15374

or browse the code directly:
http://nsis.svn.sourceforge.net/view...Contrib/ExDLL/

and

http://nsis.svn.sourceforge.net/view...17&view=markup

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 25th June 2009, 13:29   #43
TJK
Junior Member
 
Join Date: Jun 2006
Posts: 17
GetVersion update for Windows 8 and 2008R2

Hello

I currently use GetVersion to successfully control the scripts behaviour dependent on the Windows version and architecture.

I see that WinVer.nsh is updated to include the ability to detect Windows 7 and Windows Server 2008 R2 - but since I already use GetVersion I'd prefer to continue using it rather than to switch to WinVer.nsh.

Will GetVersion be similarly updated to detect and report Windows 7 and Windows Server 2008 R2 and if so does anyone have any idea when - or is GetVersion no longer being updated?

Thanks

Tim
TJK is offline   Reply With Quote
Old 24th July 2009, 00:00   #44
PadaKwaak
Junior Member
 
Join Date: Jul 2009
Location: South Africa
Posts: 1
TJK, you could, for the while being, identify Windows 7 by checking both WindowsServerName and WindowsVersion.
The WindowsVersion would report 6.1 for Windows7/Windows Server 2008 R2.
The WindowsServerName would be blank for Windows 7 & filled in for Windows Server 2008 R2.

I have included the modifications for Windows 7/Windows Server 2008 R2 and compiled it with Visual C++ 2008 Express, which resulted in the DLL being 21kB! Here is the dll & modified source: http://www.mediafire.com/?sharekey=9...4e75f6e8ebb871

I haven't tested it for Vista & Windows 7 yet.
A friend of mine got the following error when he used my dll in Win7 x64 "Could not load: C:\Users\ludwig\AppData\Local\Temp\nszCDEE.tmp\GetVersion.dll"
I guess it has to do with .NetFX.

Regards
Chris

Last edited by PadaKwaak; 24th July 2009 at 00:23.
PadaKwaak is offline   Reply With Quote
Old 24th July 2009, 12:46   #45
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I have updated the plugin.

Stu
Afrow UK is offline   Reply With Quote
Old 24th July 2009, 14:17   #46
TJK
Junior Member
 
Join Date: Jun 2006
Posts: 17
Thanks
TJK is offline   Reply With Quote
Old 20th August 2009, 16:19   #47
Miguel Ventura
Junior Member
 
Join Date: May 2009
Location: Lisbon, Portugal
Posts: 2
Exclamation still missing locale dependent SP version functions

Stu please also add functions to get from wServicePackMajor and wServicePackMinor instead of the localized WindowsServicePack using szCSDVersion

I've added those functions (I'm attaching them). I'm just not sharing the binary DLL 'cause it gets huge (100+KB) when I compile it here.

Best regards,
Miguel
Attached Files
File Type: txt newfuncs.txt (1.0 KB, 243 views)
Miguel Ventura is offline   Reply With Quote
Old 21st August 2009, 14:51   #48
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Thanks, done.

Stu
Afrow UK is offline   Reply With Quote
Old 14th September 2009, 12:44   #49
ts1612
Junior Member
 
Join Date: Sep 2009
Posts: 1
Post Feature wish/idea

First of all thanks for the very great plugin

When you display the architecture you return just 32 or 64, but not the processor architecture like AMD64, IA64, EM64T, x64. But sometimes it would be important to know things exactly (e.g. if you want to auto install Net Framework 2.0 the installers of MS are depending on the architecture as the installer is different for IA64 and x64).

I totally understand, that in most cases the result 32 or 64 is enough, but why not making an additional function GetVersion::WindowsProcessorArchitecture which shows the processor architectiure string.
ts1612 is offline   Reply With Quote
Old 17th October 2009, 14:50   #50
Speed78
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 109
Hey Stu,

thank for this plugin. I've updated the download version information and the changelog on the download page.

Kind regards

Rainer
Speed78 is offline   Reply With Quote
Old 20th October 2009, 11:33   #51
th_mi
Member
 
Join Date: Sep 2005
Location: Sitting next to my desk
Posts: 56
Unfortunately this plugin lacks of detecting the real windows version if the installer is started under compatibility settings.

In this case "GetVersionEx" returns the values of the OS selected in the compatibility settings, not the real installed OS!

See the MSDN:
Link: http://msdn.microsoft.com/en-us/libr...51(VS.85).aspx

"If compatibility mode is in effect, the GetVersionEx function reports the operating system as it identifies itself, which may not be the operating system that is installed. For example, if compatibility mode is in effect, GetVersionEx reports the operating system that is selected for application compatibility."

This signature is currently on vacation!
th_mi is offline   Reply With Quote
Old 20th October 2009, 13:28   #52
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,165
And this is a fight you will ALWAYS lose, you could check the version of system dll's etc, but in the end, if the OS wanted to, it could lie about those also, that's the whole point of forcing a compatibility setting

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 21st October 2009, 10:34   #53
th_mi
Member
 
Join Date: Sep 2005
Location: Sitting next to my desk
Posts: 56
Quote:
Originally posted by Anders
And this is a fight you will ALWAYS lose
No! Microsoft itself give the advice to find out the version by checking the OS properties and the version number of i.e. kernel DLL. This is a very save way to find out the real OS.
And I'm sure this possibility will never be disabled since it will be always necessary to get the real OS version, since Win2000, XP, Vista and Seven hape parts with annoying different behaviour which is handled differently.

The article postet at Monday, February 26, 2007 is very interesting and points out reliable possibilities:

http://17slon.com/blogs/gabr/2007_02_01_archive.html

This signature is currently on vacation!
th_mi is offline   Reply With Quote
Old 19th May 2010, 09:57   #54
gummibrot@gmx.n
Junior Member
 
Join Date: May 2010
Posts: 1
Strange results for getVersion

Hi there,

I tried to use this promising plugin for my installer project, but when I do so, I'm getting some strange results from the functions. See attached file.

I seems that the result string of GetVersion::WindowsType is translated into chinese or some other "cryptic" language thing.

Installer is run in English. But I use unicode version of NSIS to be able to install in Japanese.
All other strings I use are displayed correctly.

My system setup:
Windows XP Professional SP3, German

Any ideas?

Thanks,
Jo
Attached Thumbnails
Click image for larger version

Name:	Clipboard02.jpg
Views:	164
Size:	1.3 KB
ID:	46981  
gummibrot@gmx.n is offline   Reply With Quote
Old 19th May 2010, 10:05   #55
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
The plug-in is not Unicode. It needs rebuilding (among mods). I haven't got the time to do it at the moment.

Stu
Afrow UK is offline   Reply With Quote
Old 19th May 2010, 11:02   #56
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,165
you could try http://nsis.sourceforge.net/CallAnsiPlugin_plug-in (Does not work on every plugin, but you can always give it a shot)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th July 2010, 16:49   #57
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Finally got around to building a Unicode version along with some other changes. Uploaded v1.2.

Stu
Afrow UK is offline   Reply With Quote
Old 11th July 2010, 12:16   #58
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
When I tried using version 1.2 of the GetVersion (ANSI) plugin on my Windows 7 Professional 64-bit system GetVersion::WindowsType reported "Business" instead of "Professional"
pengyou is offline   Reply With Quote
Old 11th July 2010, 15:18   #59
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
It does that for me too. I am using the correct constant values defined in winnt.h so it must be right.

Stu
Afrow UK is offline   Reply With Quote
Old 11th July 2010, 16:20   #60
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
I think the plugin should be returning "Professional" when it is run on a Windows 7 Professional system.

I found this on MSDN:

The following table indicates the product types that were introduced in 6.1.0.0, and what they will map to if GetProductInfo is called with version 6.0.0.0 on a 6.1.0.0 system.
code:
New for 6.1.0.0 Value returned with 6.0.0.0
PRODUCT_PROFESSIONAL PRODUCT_BUSINESS
PRODUCT_PROFESSIONAL_N PRODUCT_BUSINESS_N
PRODUCT_STARTER_N PRODUCT_STARTER



See http://msdn.microsoft.com/en-us/libr...58(VS.85).aspx
pengyou is offline   Reply With Quote
Old 12th July 2010, 15:53   #61
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Uploaded v1.3.

Stu
Afrow UK is offline   Reply With Quote
Old 12th July 2010, 17:29   #62
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
Thanks for the new version of the plugin.

GetVersion::WindowsType now reports "Professional" when used on my Windows 7 Professional 64-bit system.
pengyou is offline   Reply With Quote
Old 23rd July 2010, 16:38   #63
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Fixed Unicode build (Visual Studio's fault for not retaining UNICODE define when upgrading the vcproj from 2005 to 2010).

Stu
Afrow UK is offline   Reply With Quote
Old 12th October 2010, 13:49   #64
jksoft
Junior Member
 
Join Date: Oct 2010
Posts: 2
Bug in latest version

I just downloaded the latest version of the GetVersion plugin from the NSIS website and there appears to be a bug. When I do my GetVersion::WindowsType call, it is popping up a message box that says Professional in the title and Professional in the box itself. It looks like some debug code may have been left in. It is version 1.4.0.1.
jksoft is offline   Reply With Quote
Old 12th October 2010, 13:50   #65
jksoft
Junior Member
 
Join Date: Oct 2010
Posts: 2
I guess since you have include the source, I could also recompile it but just wanted to make you aware.
jksoft is offline   Reply With Quote
Old 12th October 2010, 15:59   #66
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Thanks, fixed.

Stu
Afrow UK is offline   Reply With Quote
Old 25th March 2011, 19:58   #67
BoscoBilly
Junior Member
 
Join Date: May 2009
Posts: 43
Winver returns Vista instaed of 7 on win7 64 bit

My app needs to run in the compatability mode on win7 64.
My NSIS installer mis-identifies the OS as Windows Vista 64 bit rather than Win7.
Is this the same problem mentioned above, wherein CM will set an OS, not necessarily the installed OS, so that winver is mislead?
Is there a way to detect the correct installed OS at this time?
Thx.
BoscoBilly is offline   Reply With Quote
Old 25th March 2011, 22:26   #68
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,165
Kernel32::CreateRemoteThreadEx is new in Win7, you could check for it by calling GetProcAddress with the system plugin:
PHP Code:
!include LogicLib.nsh

System
::Call 'Kernel32::LoadLibraryA(m "Kernel32")i.s'
System::Call 'Kernel32::GetProcAddress(is,m "CreateRemoteThreadEx")i.r0'
${If} $<> 0
    MessageBox mb_ok Seven
+
${EndIf} 

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 25th March 2011, 22:37   #69
BoscoBilly
Junior Member
 
Join Date: May 2009
Posts: 43
Thanks, Anders.
I'll check this out.
BoscoBilly is offline   Reply With Quote
Old 1st August 2012, 07:42   #70
sols_HeG
Junior Member
 
Join Date: Aug 2011
Posts: 5
Hi there,

are you still working on this PlugIn?
I would like to check a Windows Server 2012

Great PlugIn bytheway

Greetings from Munich
heg
sols_HeG is offline   Reply With Quote
Old 1st August 2012, 11:15   #71
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I will upload the plug-in at some point but I would recommend that you can use this instead anyway... It's an updated version of WinVer.nsh which is bundled with NSIS: http://www.afrowsoft.co.uk/dl/WinVer.nsh

${If} ${IsWin2008}
...

Edit: Anders has rightly pointed out that as Windows 8 is not out yet the version number could be different in the final product. This may not be likely but use this at your own risk!

Stu
Afrow UK is offline   Reply With Quote
Old 11th August 2012, 03:06   #72
NgocHuyPAV
Junior Member
 
Join Date: Aug 2012
Posts: 1
Thank Afrow UK. I used GetVersion 6 months ago. It's good! But GetVersion plugin doesn't support Win 8! Can you upgrade for GetVersion plugin? I'm look forward to hearing your answer! Thank you!
NgocHuyPAV is offline   Reply With Quote
Old 11th August 2012, 10:45   #73
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
See the post above yours.

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