Windows 10 IoT + Raspberry Pi3B(+) + KMS38 Activation (Server) (UWP-App)

Discussion in 'Windows Embedded' started by JBL2015, Dec 14, 2018.

  1. JBL2015

    JBL2015 MDL Novice

    Mar 20, 2015
    3
    1
    0
    Hi all,

    I am searching for smart and easy solution for a KMS38 Activation (Server) (UWP-App)
    for the Raspberry Pi3B(+) Hardware with Windows 10 IoT Core as a base OS.

    Is there any idea or project (source code) available, to recompile with Visual Studio 2017
    as a UWP-App for the Windows 10 IoT Platform to have a KMS Activation Service for VL.

    Supported Microsoft Products:
    (32-bit and 64-bit)
    Windows Vista/7/8/8.1/10 (v1803) All VL Editions
    Windows Server 2008/2008R2/2012/2012R2/2016/2019 All Editions
    Office 2010 Family on Windows XP SP3 or newer
    Office 2013 Family on Windows 7 or later
    Office 2016 Family on Windows 7 SP1 or later
    Office 2019 Family on Windows 10 or later
    Visual Studio 2013 Ultimate
    Visual Studio 2015 Enterprise
    Visual Studio 2017 Enterprise

    Thanks
    JBL
     
  2. tommy_vercetti

    tommy_vercetti MDL Member

    Apr 3, 2008
    159
    18
    10
    What you are trying to achieve can be done in Rasbian with Vlmscd
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. tommy_vercetti

    tommy_vercetti MDL Member

    Apr 3, 2008
    159
    18
    10
    This file named vlmcsd in /etc/init.d/

    Code:
    #! /bin/sh
    
    ### BEGIN INIT INFO
    # Provides:        vlmcsd
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:    $remote_fs $syslog
    # Default-Start:    2 3 4 5
    # Default-Stop:        0 1 6
    # Short-Description:    KMS server
    ### END INIT INFO
    
    # Author: Hotbird64
    #
    
    # Do NOT "set -e"
    
    if [ `id -u` != 0 ]; then
      echo "Must be root to run this"
      exit 1
    fi
    
    PATH=/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
    DESC="Microsoft KMS daemon"
    
    NAME=vlmcsd
    DAEMON=/usr/local/sbin/$NAME
    PIDFILE=/var/run/$NAME.pid
    SCRIPTNAME=/etc/init.d/$NAME
    LOGFILE=syslog
    PORT=1688
    
    # Read configuration variable file if it is present
    [ -r /etc/default/$NAME ] && . /etc/default/$NAME
    
    # Exit if the package is not installed
    [ -x "$DAEMON" ] || exit 0
    
    DAEMON_ARGS="-l $LOGFILE -p $PIDFILE -P $PORT"
    
    # Load the VERBOSE setting and other rcS variables
    . /lib/init/vars.sh
    
    # Define LSB log_* functions.
    # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
    # and status_of_proc is working.
    . /lib/lsb/init-functions
    
    #
    # Function that starts the daemon/service
    #
    do_start()
    {
        status="0"
        pidofproc -p $PIDFILE $DAEMON >/dev/null || status="$?"
        
        if [ $status -eq 0 ]; then
            log_action_msg "already running"
            return 3
        fi
    
        $DAEMON $DAEMON_ARGS $EXTRA_ARGS
        return $?
    }
    
    #
    # Function that stops the daemon/service
    #
    do_stop()
    {
            if [ ! -f $PIDFILE ]; then
                    log_action_msg "service not running"
                    return 4
            fi
    
        kill `cat $PIDFILE`
        return $?
    }
    
    case "$1" in
      start)
        log_daemon_msg "Starting $DESC" "$NAME"
        do_start
        case "$?" in
            0) log_end_msg 0 ;;
            *) log_end_msg 1 ;;
        esac
        ;;
      stop)
        log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
            0) log_end_msg 0 ;;
            *) log_end_msg 1 ;;
        esac
        ;;
      restart|force-reload|reload)
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_stop
        sleep 1
        do_start
        case "$?" in
            0) log_end_msg 0 ;;
            *) log_end_msg 1 ;; # Failed to start
        esac
        ;;
      status)
        status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
        ;;
      *)
        echo "Usage: $SCRIPTNAME {start|stop|status|reload|restart|force-reload}" >&2
        exit 3
        ;;
    esac
    
    and then the vlmcsd binary in /usr/local/sbin/, use
    Code:
    systemctl enable vlmcsd
    to enable at boot and
    Code:
    systemctl start vlmcsd
    to start it
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. JBL2015

    JBL2015 MDL Novice

    Mar 20, 2015
    3
    1
    0
    Hi Tommy,

    thank you for the solution to use the vlmcsd from Hotbird64.

    My problem is now, to use the existing source from vlmcsd and build up a new project with Visual Studio and include the code.

    I am not an expert, but I will train my self with this small project to learn more :)

    From my understanding I need the following steps to build this project for IoT.

    1. Visual Studio 2017 Community
    2. Windows IoT Core Extension for VS Code / the UWP

    1. New Project > Visual C++ > UWP or Background APP with CMD for the LOGs?
    2. Include the source in this new project.
    3. Compile / Debugging?

    Is there any open point or missing here?

    Thanks
    JBL
     
  5. Agret

    Agret MDL Novice

    Aug 6, 2012
    46
    9
    0
    Yes you are missing that it isn't a C++ app, isn't UWP and won't run on Windows IoT.

    1) Setup/run vlcmsd on any other device on your network, another Pi or a desktop/laptop.
    2) Leave it attached to the same network as your Win10 IoT Pi
    3) On your Win10 IoT Pi set the KMS host to the IP address or hostname of your device running the KMS server.
    4) Activate Win10 IoT and it will succeed.
     
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    10,347
    41,265
    340
    KMS38 is an offline hack, it doesn't need or work with KMS server
     
  7. JBL2015

    JBL2015 MDL Novice

    Mar 20, 2015
    3
    1
    0
    Hi Agret,

    is it not possible to migrate the VLMSD C Code to C++ (as a UWP APP) but with out a GUI, only as a terminal / CMD / console / RD(P)?

    Clear KMS38 is a offline hack :) out of the focus for this smal project!

    Thanks
    JBL
     
  8. Shortyportuguese

    Shortyportuguese MDL Member

    Apr 3, 2019
    115
    26
    10
    Hello Guys,

    I have a doubt what kind of windows 10 version should be used on a PC standard Thin Client.
    Is Windows 10 enterprise or 10 iot?
    WES7 was great, but now Microsoft dropped this kind of system...

    Thanks in advance
     
  9. coleoptere2007

    coleoptere2007 MDL Guru

    Apr 8, 2008
    2,761
    1,429
    90
    What is your hardware config and model ?
     
  10. coleoptere2007

    coleoptere2007 MDL Guru

    Apr 8, 2008
    2,761
    1,429
    90
    You should try Windows 10 Enterprise LTSC 2019
     
  11. Shortyportuguese

    Shortyportuguese MDL Member

    Apr 3, 2019
    115
    26
    10
    Do you have other suggestions?
     
  12. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    3,819
    8,513
    120
    You can also use Windows 10 IoT Enterprise 2019 LTSC

     
  13. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    946
    604
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. apgupta

    apgupta MDL Novice

    May 20, 2010
    24
    2
    0
    Hi,
    I installed win 10 IOT Enterprise LTSC on my PC using en_windows_10_iot_enterprise_ltsc_2019_x64_dvd_a1aa819f.iso . Activated it using LTSC MAK key but the system info doesn't show up IOT Enterprise but only LTSC Enterprise. Can someone help me in this regard? Thanks LTSC.png
     
  15. whatever127

    whatever127 MDL PHP Wizard

    Nov 9, 2012
    1,041
    7,007
    60
    Separate IoT Enterprise editions exist since 1903. In 1809 IoT Enterprise LTSC is simply Enterprise LTSC with OEM key installed instead Volume:GVLK. There is absolutely no point in installing IoT Enterprise LTSC because you will end up with normal Enterprise LTSC with different key installed by default, which you changed to Volume anyway...

    Also: You have written in Raspberry Pi thread which has absolutely nothing to do with your "problem".
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...