How do I -can i? detect what ver of win is being used?

Get help using Construct 2

Post » Mon Oct 17, 2016 2:07 pm

i dont think this is possible, but im gonna ask... JUST in case

is there a way to check what version of windows is being used ... like win7/8/8.1/10 ??

thanks!
B
26
S
5
G
1
Posts: 31
Reputation: 1,398

Post » Mon Oct 17, 2016 3:19 pm

Image
B
64
S
23
G
7
Posts: 1,481
Reputation: 10,823

Post » Mon Oct 17, 2016 3:29 pm

What you could do, is to wrap with NW.js and to insert an action "Run file".
This file would then be a .bat containing the following actions:
Code: Select all
wmic os get Caption /value > [filedirectory]\filename.txt

(Add ",CSDVersion" after Caption to get Servicepack version as well)

The .bat file will save the Windows Version with "Caption=[Windows Version]" to a txt-file in the directory of your choice (make sure to have the rights to write files there).

You would then have to load the txt via the "AJAX" object action (preferrably "request project file") and parse the contents to a variable for example.


Yep, quite complicated.
But if it's worth it for you... ;)
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Mon Oct 17, 2016 6:00 pm

Image
B
64
S
23
G
7
Posts: 1,481
Reputation: 10,823

Post » Mon Oct 17, 2016 6:07 pm

@korbaach your 1st reply reminded me i was already using userAgent to check for the browser.. and the other info i was looking for was also in there!

i ended up using the same code and looking for the specific os i needed (win7) instead of the browser

used this in a compare 2 vals
- find(uppercase(Browser.UserAgent),"Windows NT 6.1")

works perfect

thanks for the help guys!
B
26
S
5
G
1
Posts: 31
Reputation: 1,398


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests