static UIID

Created at 24 Mar 2020, 15:41
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TJ

Tj11

Joined 24.10.2019

static UIID
24 Mar 2020, 15:41


Dear Panagiotis,

Could you please advise on installing a license to cbot.

I want to get unique code of computer using :

 

using System;
using System.Collections.Generic;
using System.Management;
 
class Program
{
    static void Main(string[] args)
    {
        Dictionary<string, string> ids = new Dictionary<string, string>();
        ManagementObjectSearcher searcher;
        
        try
        {
            //UUID
            searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT UUID FROM Win32_ComputerSystemProduct");
            foreach (ManagementObject queryObj in searcher.Get())
                ids.Add("UUID", queryObj["UUID"].ToString());
        }
        catch { }
 
        foreach (var x in ids)
            Console.WriteLine(x.Key + ": " + x.Value);
        Console.ReadKey();

        //source : https://www.cyberforum.ru/csharp-net/thread352410.html
    }
}

 

But looks like cAlgo doesn't support   ManagementObjectSearcher.

Maybe there is alternative way without going to 3rd party license packages ?


@Tj11
Replies

PanagiotisCharalampous
24 Mar 2020, 15:56

Hi Tj11,

You just need to add the relevant reference. See below

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

Tj11
24 Mar 2020, 16:04 ( Updated at: 21 Dec 2023, 09:21 )

RE:

PanagiotisCharalampous said:

Hi Tj11,

You just need to add the relevant reference. See below

Best Regards,

Panagiotis 

Join us on Telegram

Great !!!  It works :)))

Thanks a lot Panagiotis !!!!


@Tj11

Tj11
24 Mar 2020, 16:06 ( Updated at: 21 Dec 2023, 09:21 )

RE:

PanagiotisCharalampous said:

Hi Tj11,

You just need to add the relevant reference. See below

Best Regards,

Panagiotis 

Join us on Telegram

 

 

 

Just to let you know :

on light color scheme font color in search box is white (invisible) :

 


@Tj11