반응형

안녕하세요.

 

VISIO로  그림 그릴 일이 있는데 저희 연구실 같은 경우는 VISIO 제품키를 따로 구매하지 않아 KMS로 인증시도를 했습니다. 

 

학교 인터넷을 사용하니 내PC지키미 같은 보안 프로그램으로 자동으로 설치됩니다. 

 

이 프로그램이 아주 빡이 치는게, 노트북 와이파이를 학교로 한 번 잡았다 싶으면 자동으로 설치되어 삭제도 쉽지가 않습니다. 

 

문제는 KMS 자체를 내PC지키미가 막아 버리니, 삭제하기가 귀찮아 새로운 방법을 찾았습니다. 

 

https://msguides.com/project-visio

 

How to install and use Project / Visio (2016/2019) without product key

The majority of Microsoft software products have a 30-days trial in order to let the user try them for free. This allow users to see the value of the product and if they have been happy with it…

msguides.com

 

영구 라이센스는 아니고 6개월 무료 라이센스이지만, 쉽게 갱신할 수 있으므로 KMS 별도 설치 없이 사용 가능합니다. 

 

아래를 참고하시면 됩니다. 

 


    1. 명령 프롬프트에서 명령줄을 통해 제품을 활성화합니다.

 

PC에 설치된 Project/Visio의 위치를 엽니다.


ProgramFiles 폴더에 설치하면 경로는 "%ProgramFiles%\Microsoft Office\Office16" 또는 "%ProgramFiles(x86)%\Microsoft Office\Office16"이 됩니다. 사용 중인 Windows OS의 아키텍처에 따라 다릅니다.

 

이 문제가 확실하지 않은 경우 걱정하지 마십시오. ( 하지만 현재 대부분은 64bit이므로 첫번 째로 가시면 됩니다.)

 

위의 두 명령을 모두 실행하면 됩니다. 그 중 하나는 실행되지 않고 화면에 오류 메시지가 출력됩니다. 

( CMD를 관리자 모드로 들어가야 합니다. )

cmd 

cd /d %ProgramFiles%\Microsoft Office\Office16
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16

 

 

    2. 정품 라이선스를 볼륨 1로 변환하십시오.

 

설치 프로그램을 Microsoft에서 가져온 경우 이 단계가 필요합니다. 반대로 Volume ISO 파일에서 Project 또는 Visio를 설치하는 경우 이는 선택 사항이므로 원하는 경우 건너뛰십시오. 

 

저 같은 경우는 VISIO2019만 필요하므로 For Visio 2019 코드를 복사해 CMD에 붙여 넣습니다.

 

For Project 2016

for /f %x in ('dir /b ..\root\Licenses16\projectprovl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x"

For Project 2019

for /f %x in ('dir /b ..\root\Licenses16\projectpro2019vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x"

For Visio 2016

for /f %x in ('dir /b ..\root\Licenses16\visioprovl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x"

For Visio 2019

for /f %x in ('dir /b ..\root\Licenses16\visiopro2019vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x"

 

 

    3. KMS 클라이언트 키를 사용하여 Project/Visio를 활성화합니다.

 

PC가 인터넷에 연결되어 있는지 확인하고 다음 명령을 실행합니다. THE_CLIENT_KEY를 제품의 KMS 클라이언트 키로 바꾸는 것을 잊지 마십시오. 순서대로 CMD에 입력하세요. 

 

cscript ospp.vbs /inpkey:THE_CLIENT_KEY
cscript ospp.vbs /sethst:s8.uk.to
cscript ospp.vbs /setprt:1688
cscript ospp.vbs /act

The full list of client keys:

Project 2016: YG9NW-3K39V-2T3HJ-93F3Q-G83KT
Project 2019: B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B
Visio 2016: PD3PC-RHNGV-FXJ29-8JK7D-RJRJK
Visio 2019: 9BGNQ-K37YR-RQHF2-38RQ3-7VCBB

0xC004F074 오류가 표시되면 인터넷 연결이 불안정하거나 서버가 사용 중임을 의미합니다. 장치가 온라인 상태인지 확인하고 성공할 때까지 "act" 명령을 다시 시도하십시오.

 

 

아래는 전체 예시입니다. 

C:\Windows\system32>cd /d %ProgramFiles%\Microsoft Office\Office16
 
C:\Program Files\Microsoft Office\Office16>cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
The system cannot find the path specified.
 
C:\Program Files\Microsoft Office\Office16>for /f %x in ('dir /b ..\root\Licenses16\projectpro2019vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x"
 
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /inslic:"..\root\Licenses16\ProjectPro2019VL_KMS_Client_AE-ppd.xrm-ms"
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
 
---Processing--------------------------
---------------------------------------
Installing Office license: ..\root\licenses16\projectpro2019vl_kms_client_ae-ppd.xrm-ms
Office license installed successfully.
---------------------------------------
---Exiting-----------------------------
 
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /inslic:"..\root\Licenses16\ProjectPro2019VL_KMS_Client_AE-ul-oob.xrm-ms"
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
 
---Processing--------------------------
---------------------------------------
Installing Office license: ..\root\licenses16\projectpro2019vl_kms_client_ae-ul-oob.xrm-ms
Office license installed successfully.
---------------------------------------
---Exiting-----------------------------
 
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /inslic:"..\root\Licenses16\ProjectPro2019VL_KMS_Client_AE-ul.xrm-ms"
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
 
---Processing--------------------------
---------------------------------------
Installing Office license: ..\root\licenses16\projectpro2019vl_kms_client_ae-ul.xrm-ms
Office license installed successfully.
---------------------------------------
---Exiting-----------------------------
 
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /sethst:s8.uk.to
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
 
---Processing--------------------------
---------------------------------------
Successfully applied setting.
---------------------------------------
---Exiting-----------------------------
 
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /setprt:1688
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
 
---Processing--------------------------
---------------------------------------
Successfully applied setting.
---------------------------------------
---Exiting-----------------------------
 
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /inpkey:B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
 
---Processing--------------------------
---------------------------------------
<Product key installation successful>
---------------------------------------
---Exiting-----------------------------
 
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /act
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
 
---Processing--------------------------
---------------------------------------
Installed product key detected - attempting to activate the following product:
SKU ID: 2ca2bf3f-949e-446a-82c7-e25a15ec78c4
LICENSE NAME: Office 19, Office19ProjectPro2019VL_KMS_Client_AE edition
LICENSE DESCRIPTION: Office 19, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: PKD2B
<Product activation successful>
---------------------------------------
---------------------------------------
---Exiting-----------------------------
 
C:\Program Files\Microsoft Office\Office16>

 

 

728x90
반응형
반응형

안녕하세요.

 

프로그래밍을 하면서 여러 동작을 하기 위해서는 쓰레드란 개념을 알아야 합니다. 

 

우선, 작업관리자를 한 번 보겠습니다.

 

작업관리자

CPU는 한 번에 한 가지의 동작밖에 하지 못합니다. 하지만 G(10의 9제곱)단위로 동작합니다.

 

작업관리자를 확인하면 CPU는 하나인 반면, 프로세스는 184개가 1958개의 쓰레드를 통해 동작하는 것을 확인할 수 있습니다.

 

CPU는 시간, 우선순위 등 여러가지 방식으로 할당합니다.

 

예를 들어,

 

간단한 쓰레드 구조

이런식으로 쓰레드 1번 수행, 2번 수행, 다음 3번 수행하면서 반복합니다.

 

그러나 그 속도가 굉장히 빨라 사람들이 사용하는데 알아차리지 못합니다. 

 

#쓰레드를 선언하지 않은 예제
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import time
import sys


class MainWidget(QWidget):
    def __init__(self):
        super().__init__()
        thread_start = QPushButton("시 작!")
        thread_start.clicked.connect(self.increaseNumber)

        vbox = QVBoxLayout()
        vbox.addWidget(thread_start)
		
        self.resize(200, 200)
        self.setLayout(vbox)
	
    #버튼을 누르면 1씩 증가하는 함수
    def increaseNumber(self):
        for i in range(10):
            print("Thread :",i)
            time.sleep(1)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    widget = MainWidget()
    widget.show()
    sys.exit(app.exec_())

쓰레드를 선언하지 않고 버튼을 누르면 0부터 9까지 수행하는 간단한 PyQt5를 예시를 보겠습니다.

 

코딩에서는 쓰레드를 선언하지 않았지만, 사실 여기에는 쓰레드가 사용되고 있습니다. 

 

바로 GUI에서 사용되고 있습니다. 

 

이 프로그램을 돌려 보시면, 버튼을 누르고 함수가 수행을 마칠 때까지 GUI는 동작하지 않습니다.

 

아마 응답하지 않는다고 경고창이 뜰 것입니다. 

 

그 이유는 이 프로그램에 할당된 쓰레드는 하나이고, 이미 함수를 동작하는데 쓰레드가 사용되고 있으니, GUI는 그 동안 동작하지 않습니다. 

 

그렇다면 쓰레드를 한 번 사용해서 GUI도 움직이고, 함수도 동작하는 예제를 작성해보겠습니다.

#쓰레드를 선언한 간단한 예제
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import time
import sys


#쓰레드 선언
class Thread1(QThread):
    #parent = MainWidget을 상속 받음.
    def __init__(self, parent):
        super().__init__(parent)
    def run(self):
        for i in range(10):
            print("Thread :",i)
            time.sleep(1)


class MainWidget(QWidget):
    def __init__(self):
        super().__init__()
        thread_start = QPushButton("시 작!")
        thread_start.clicked.connect(self.increaseNumber)

        vbox = QVBoxLayout()
        vbox.addWidget(thread_start)

        self.resize(200,200)
        self.setLayout(vbox)

    def increaseNumber(self):
        x = Thread1(self)
        x.start()

if __name__ == '__main__':
    app = QApplication(sys.argv)
    widget = MainWidget()
    widget.show()
    sys.exit(app.exec_())

QThread를 선언하고 자신이 실행시키고자 하는 함수를 run에 작성해줍니다. 

 

그리고 선언한 쓰레드 클레스를 객체를 생성해주고 객체를 start해주면 간단하게 해결됩니다.

 

728x90
반응형

+ Recent posts