Jump to content
WindowsAddict

Microsoft Activation Scripts - (Fork, Open Source & clean from AV's detection)

Recommended Posts

123m.m

this apps use the other side usa chenge the region😉

Edited by 123m.m

Share this post


Link to post
Share on other sites
123m.m

In the country other than America, region must change to united states

Untitled.jpg

Share this post


Link to post
Share on other sites
DLord
1 hour ago, WindowsAddict said:

Thank you for this important info.  

I guess it must be a result of conflict between Iran and the USA.

I wonder if the blocking is done by Iran or the MS or both ways,

If what you said is true then it also means that no windows and office users are getting the genuine licences, this is big.

 

Edit - 

Since you have got the license, 

clean install windows again and see if system automatically will get the license or not.

i guess that ms servers refused your activation probably because system didn't have license before, but since you've got one, they may give the license again.

 

if you don't get the licence again then,

I would request you to open a thread on MS site https://answers.microsoft.com/en-us  and see what is the MS response on this matter. (tell them it was activated from 7 pro to 10 pro upgrade)

thanks again. 

To answer your first question, the block got to be on US side because I did try the old setup with VPN and it did not work.  And yes, I do not know of anyone down here who got a genuine license, except those who bought imported laptops or desktops with OS on them.

 

As for another clean install, accept my apology but I'm too lazy to do it one more time since I've been doing it over and over again in these past few days.  Also, I already started setting up my PC, importing my files and installing apps.  But if by any chance I got to re-install, I will let you guys know what goes down.

 

As for opening a thread on MS site, it's complete waste of time as I have done that before for another issue.  They simply told me that I live in an embargoed country and as they do not officially offer or sell their products in Iran, they do not provide any support either.

 

But anyway, many thanks for the help and support and I am very happy this issue is solved; no only because I got a permanent license, but that we found a solution for others like me. :cheers:

Edited by DLord

Share this post


Link to post
Share on other sites
123m.m

the backup with acronistrue image 2019 for win

Share this post


Link to post
Share on other sites
LiamZ

Hi, I'm testing Windows 10 LTSC 2019, and I wonder why your tool does not support LTSC 2019 HWID activation, anyway I've activated with KMS38.

Thanks!!

Edited by LiamZ
forgot to say HWID activation

Share this post


Link to post
Share on other sites
WindowsAddict
22 hours ago, LiamZ said:

Hi, I'm testing Windows 10 LTSC 2019, and I wonder why your tool does not support LTSC 2019 HWID activation, anyway I've activated with KMS38.

Thanks!!

I don't know, what and why MSFT changed things in LTSC regarding HWID activation, sorry. i don't have any info. :(

Edited by WindowsAddict

Share this post


Link to post
Share on other sites
LiamZ

So, this is something related to MSFT and LTSC is not compatible with HWID  😧

Anyway 19 years is enough for me 🙃🤗

Thanks a lot again for the script!!

Share this post


Link to post
Share on other sites
LiamZ

Hi again, I have a laptop that came with Windows 10 Home edition, with a digital license linked to a microsoft account. Can I upgrade to enterprise with your script with HWID? It will be linked to a microsoft account too?

Thanks.

Share this post


Link to post
Share on other sites
WindowsAddict
33 minutes ago, LiamZ said:

Can I upgrade to enterprise with your script with HWID?It will be linked to a microsoft account too?

First you have to upgrade to Pro (Home > Pro) manually, instructions are listed in change edition option in the script.

Once that is done, use the change edition option in the script to change edition to Enterprise or any other edition.

You can establish Digital license for all of the possible Editions, and they all can/will be linked to Microsoft account. 

Share this post


Link to post
Share on other sites
LiamZ

OK, thanks, I've already done home->pro->enterprise, but always with a local account, and I didn't know if it will be a problem with a microsoft account.

Share this post


Link to post
Share on other sites
sensa0000

Thanks a lot for this elegant, transparent and clean tool!

I've just activated Windows 10 Pro with digital activation.

Share this post


Link to post
Share on other sites
teodz1984

OP/MOD/ADMIN 

Please remove the part with  (shortened for put.re direct link) on the sharecode link on page 1 post 1 

Makes it incompatible with the sharecode fixer app

Share this post


Link to post
Share on other sites
WindowsAddict
57 minutes ago, teodz1984 said:

OP/MOD/ADMIN 

Please remove the part with  (shortened for put.re direct link) on the sharecode link on page 1 post 1 

Makes it incompatible with the sharecode fixer app

Done. Thank you. :)

Share this post


Link to post
Share on other sites
uffbros

@WindowsAddict ...On page 1 I am trying to download the version .6 and I copy them links to notepad and then copy/paste to my browser but all I get is my homepage??????

Share this post


Link to post
Share on other sites
WindowsAddict
48 minutes ago, uffbros said:

@WindowsAddict ...On page 1 I am trying to download the version .6 and I copy them links to notepad and then copy/paste to my browser but all I get is my homepage??????

In my experience, use of notepad doesn't solve the hidden characters copying problem of nsaneforums.

Try to enter the links manually, it should work, note that shortened URL is case sensitive. 

 

Share this post


Link to post
Share on other sites
uffbros

Nothing worked as suggested so I switched from my browser named SlimJet to IE and it worked.

Share this post


Link to post
Share on other sites
Sponpa

Someone with good c/c++ knowledge can remove the Registry check?
Already removed everything not needed, DLL is now compiled 4kb but can be smaller once registry check is gone.
 

Spoiler
#define _WIN32_WINNT _WIN32_WINNT_WIN7
#define CryptGetHashParam CryptGetHashParam_dummy
#include <windows.h>
#include <winternl.h>
#include <shlwapi.h>
#undef CryptGetHashParam
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
#endif
#define malloc(n) LocalAlloc(LMEM_ZEROINIT, n)
#define SL_E_VALUE_NOT_FOUND 0xC004F012
typedef DWORD SLDATATYPE;
typedef GUID SLID;
typedef DWORD SLIDTYPE;
#define APP "SYSTEM\\Tokens"
typedef struct {SLID SkuId; DWORD eStatus; DWORD dwGraceTime; DWORD dwTotalGraceDays; HRESULT hrReason; UINT64 qwValidityExpiration;} SL_LICENSING_STATUS;
typedef void *HSLC, *HSLP;
static SLID consumed_skuids[256];
static int nconsumed;
static DWORD tbuf[16384];

static HRESULT sl_get(const char *path, const WCHAR *name, SLDATATYPE *t, UINT *pcbValue, PBYTE *ppbValue)
{
	DWORD pop = 0;
	DWORD ot = 4;
	DWORD sz = sizeof(tbuf);
	HKEY k;

	if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0, KEY_READ, &k))
		return SL_E_VALUE_NOT_FOUND;

	RegQueryValueExW(k, L"Populate", 0, NULL, (BYTE*)&pop, &ot);

	if (pop) {
		HKEY k2;
		if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0, KEY_READ|KEY_WRITE, &k2)) {
			RegCloseKey(k);
			k = k2;
		} else pop = 0;
	}

	int ret = RegQueryValueEx(k, name, 0, (DWORD*)&ot, (void*)&tbuf, (DWORD*)&sz);
	if (ret) {
		ret = SL_E_VALUE_NOT_FOUND;
	}
	if (ppbValue) {
		*ppbValue = LocalAlloc(0, sz);
		memcpy(*ppbValue, (void*)tbuf, sz);
	}
	if (pcbValue) *pcbValue = sz;
	if (t) *t = ot;

	RegCloseKey(k);
	return ret;
}

HRESULT WINAPI SLOpen(HSLC *out) {*out = (void*)1; return S_OK;}

HRESULT WINAPI SLGetSLIDList(HSLC hSLC, SLIDTYPE eQueryIdType, SLID *pQueryId, SLIDTYPE eReturnIdType, UINT *pnReturnIds, SLID **ppReturnIds)
{
	*ppReturnIds = malloc(sizeof(SLID) * nconsumed);
	memcpy((void*)*ppReturnIds, (void*)consumed_skuids, nconsumed * sizeof(SLID));
	*pnReturnIds = nconsumed;
	return S_OK;
}

HRESULT WINAPI SLGetLicensingStatusInformation(HSLC hSLC, SLID *pAppID, SLID *pProductSkuId, PWSTR pwszRightName, UINT *pnStatusCount, SL_LICENSING_STATUS **ppLicensingStatus)
{
	SL_LICENSING_STATUS *entry = malloc(sizeof(SL_LICENSING_STATUS) * nconsumed);
	for (int i = 0; i < nconsumed; i++) {
		memcpy((void*)&entry[i].SkuId, (void*)&consumed_skuids[i], sizeof(SLID));
		entry[i].eStatus = 1;
	}
	*pnStatusCount = nconsumed;
	*ppLicensingStatus = entry;
	return S_OK;
}

HRESULT WINAPI SLGetWindowsInformation(PCWSTR pwszValueName, SLDATATYPE *peDataType, UINT *pcbValue, PBYTE *ppbValue)
{
	__declspec(dllimport) NTSTATUS NTAPI NtQueryLicenseValue(PUNICODE_STRING,DWORD*,PVOID,DWORD,DWORD*);
	UNICODE_STRING us;
	us.Buffer = (void*)pwszValueName;
	us.MaximumLength = (us.Length = wcslen(pwszValueName)*2)+2;
	ULONG sz = sizeof(tbuf);
	ULONG typ;
	if (!NT_SUCCESS(NtQueryLicenseValue(&us, &typ, tbuf, sizeof(tbuf), &sz)))
		return SL_E_VALUE_NOT_FOUND;
	if (pcbValue == (void*)-1) {
		*((DWORD*)ppbValue) = tbuf[0];
		return S_OK;
	}
	if (peDataType)
		*peDataType = typ;
	if (pcbValue)
		*pcbValue = sz;
	if (ppbValue) {
		*ppbValue = LocalAlloc(0, sz);
		memcpy(*ppbValue, (void*)tbuf, sz);
	}
	return S_OK;
}

HRESULT WINAPI SLGetWindowsInformationDWORD(PCWSTR pwszValueName, DWORD* pdwValue)
{
	return SLGetWindowsInformation(pwszValueName, (void*)-1, (void*)-1, (PBYTE*)pdwValue);
}

HRESULT WINAPI SLGetGenuineInformation(const SLID *pAppId, PCWSTR pwszValueName, SLDATATYPE *peDataType, UINT *pcbValue, BYTE **ppbValue)
{
	return sl_get(APP, pwszValueName, peDataType, pcbValue, ppbValue);
}

HRESULT WINAPI SLGetPKeyInformation(HSLC hSLC, SLID *pPKeyId, PWSTR pwszValueName, SLDATATYPE *peDataType, UINT *pcbValue, PBYTE *ppbValue)
{
	return sl_get(APP, pwszValueName, peDataType, pcbValue, ppbValue);
}

BOOL APIENTRY WINAPI dll_main(HINSTANCE hModule, DWORD code, LPVOID ress)
{
	static int doneinit;
	if (code != DLL_PROCESS_ATTACH)
		return TRUE;
	if (doneinit)
		return TRUE;
	doneinit = 1;
	nconsumed = 1;
	return TRUE;
}

HRESULT WINAPI ok1(void *a1) {return S_OK;}

 

Spoiler
LIBRARY slc.dll
EXPORTS
SLGetPKeyInformation
SLGetProductSkuInformation = SLGetPKeyInformation
SLGetSLIDList
SLGetWindowsInformation
SLGetWindowsInformationDWORD
SLGetGenuineInformation
SLGetLicensingStatusInformation
SLOpen
SLClose = ok1

.def

reg add "HKLM\SYSTEM\Tokens" /v "Channel" /f

Is only needed with current SLC.dll.

What needs to be done: 

SLGetPKeyInformation SL_INFO_KEY_CHANNEL L"Channel", Optional L"Retail"
https://docs.microsoft.com/en-us/windows/desktop/api/slpublic/nf-slpublic-slgetpkeyinformation

 

SLGetGenuineInformation should also be looked at when doing so.
https://docs.microsoft.com/en-us/windows/desktop/api/slpublic/nf-slpublic-slgetgenuineinformation

Once removed, slc.dll can be placed into \sources and it will auto-activate if upgrading.

Also:
gatherosstate.exe %programdata%\Microsoft\Windows\ClipSVC\GenuineTicket
clipup -o  > NUL


Put it where it belongs, so -allto doesn't need to be used, only -o, simpler.

Bonus: GatherOSData from SDK is significantly faster generating token.
https://i.imgur.com/b9jKgqv.gifv

Edited by Sponpa

Share this post


Link to post
Share on other sites
DeLtA
On 2/12/2019 at 9:07 PM, uffbros said:

Nothing worked as suggested

Use This It Will Remove Hidden Characters & Speedup File Downloading From Sharecoded Links 

 

Share this post


Link to post
Share on other sites
DeLtA

@uffbros  See What is Causing This Error :

 

2h6l8Q9.png

 

There Are Characters That will not display in this compiled html , As Show in The Above Image 

Share this post


Link to post
Share on other sites
uffbros

Unless it's invisible mine never showed any characters???? I pasted exactly same way into IE and it worked in IE but not in SlimJet browser

Share this post


Link to post
Share on other sites
DeLtA
7 minutes ago, uffbros said:

I pasted exactly same way into IE and it worked in IE

Maybe IE is Removing All These Hidden Characters Before Opening URL. I'm Not Sure. 

7 minutes ago, uffbros said:

Unless it's invisible mine never showed any characters???

These Hidden Characters Can Only Be Seen In ANSI Encoding :

SEE BELOW IMAGE :

qu7dWwt.png

Edited by DeLtA

Share this post


Link to post
Share on other sites
DeLtA

@uffbros  internet Explorer Removes These Hidden Characters By Default 

 

5hmjTaR.png 

 

Share this post


Link to post
Share on other sites
WindowsAddict
3 hours ago, Sponpa said:

Someone with good c/c++ knowledge can remove the Registry check?
Already removed everything not needed, DLL is now compiled 4kb but can be smaller once registry check is gone.
 

  Reveal hidden contents

#define _WIN32_WINNT _WIN32_WINNT_WIN7
#define CryptGetHashParam CryptGetHashParam_dummy
#include <windows.h>
#include <winternl.h>
#include <shlwapi.h>
#undef CryptGetHashParam
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
#endif
#define malloc(n) LocalAlloc(LMEM_ZEROINIT, n)
#define SL_E_VALUE_NOT_FOUND 0xC004F012
typedef DWORD SLDATATYPE;
typedef GUID SLID;
typedef DWORD SLIDTYPE;
#define APP "SYSTEM\\Tokens"
typedef struct {SLID SkuId; DWORD eStatus; DWORD dwGraceTime; DWORD dwTotalGraceDays; HRESULT hrReason; UINT64 qwValidityExpiration;} SL_LICENSING_STATUS;
typedef void *HSLC, *HSLP;
static SLID consumed_skuids[256];
static int nconsumed;
static DWORD tbuf[16384];

static HRESULT sl_get(const char *path, const WCHAR *name, SLDATATYPE *t, UINT *pcbValue, PBYTE *ppbValue)
{
	DWORD pop = 0;
	DWORD ot = 4;
	DWORD sz = sizeof(tbuf);
	HKEY k;

	if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0, KEY_READ, &k))
		return SL_E_VALUE_NOT_FOUND;

	RegQueryValueExW(k, L"Populate", 0, NULL, (BYTE*)&pop, &ot);

	if (pop) {
		HKEY k2;
		if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0, KEY_READ|KEY_WRITE, &k2)) {
			RegCloseKey(k);
			k = k2;
		} else pop = 0;
	}

	int ret = RegQueryValueEx(k, name, 0, (DWORD*)&ot, (void*)&tbuf, (DWORD*)&sz);
	if (ret) {
		ret = SL_E_VALUE_NOT_FOUND;
	}
	if (ppbValue) {
		*ppbValue = LocalAlloc(0, sz);
		memcpy(*ppbValue, (void*)tbuf, sz);
	}
	if (pcbValue) *pcbValue = sz;
	if (t) *t = ot;

	RegCloseKey(k);
	return ret;
}

HRESULT WINAPI SLOpen(HSLC *out) {*out = (void*)1; return S_OK;}

HRESULT WINAPI SLGetSLIDList(HSLC hSLC, SLIDTYPE eQueryIdType, SLID *pQueryId, SLIDTYPE eReturnIdType, UINT *pnReturnIds, SLID **ppReturnIds)
{
	*ppReturnIds = malloc(sizeof(SLID) * nconsumed);
	memcpy((void*)*ppReturnIds, (void*)consumed_skuids, nconsumed * sizeof(SLID));
	*pnReturnIds = nconsumed;
	return S_OK;
}

HRESULT WINAPI SLGetLicensingStatusInformation(HSLC hSLC, SLID *pAppID, SLID *pProductSkuId, PWSTR pwszRightName, UINT *pnStatusCount, SL_LICENSING_STATUS **ppLicensingStatus)
{
	SL_LICENSING_STATUS *entry = malloc(sizeof(SL_LICENSING_STATUS) * nconsumed);
	for (int i = 0; i < nconsumed; i++) {
		memcpy((void*)&entry[i].SkuId, (void*)&consumed_skuids[i], sizeof(SLID));
		entry[i].eStatus = 1;
	}
	*pnStatusCount = nconsumed;
	*ppLicensingStatus = entry;
	return S_OK;
}

HRESULT WINAPI SLGetWindowsInformation(PCWSTR pwszValueName, SLDATATYPE *peDataType, UINT *pcbValue, PBYTE *ppbValue)
{
	__declspec(dllimport) NTSTATUS NTAPI NtQueryLicenseValue(PUNICODE_STRING,DWORD*,PVOID,DWORD,DWORD*);
	UNICODE_STRING us;
	us.Buffer = (void*)pwszValueName;
	us.MaximumLength = (us.Length = wcslen(pwszValueName)*2)+2;
	ULONG sz = sizeof(tbuf);
	ULONG typ;
	if (!NT_SUCCESS(NtQueryLicenseValue(&us, &typ, tbuf, sizeof(tbuf), &sz)))
		return SL_E_VALUE_NOT_FOUND;
	if (pcbValue == (void*)-1) {
		*((DWORD*)ppbValue) = tbuf[0];
		return S_OK;
	}
	if (peDataType)
		*peDataType = typ;
	if (pcbValue)
		*pcbValue = sz;
	if (ppbValue) {
		*ppbValue = LocalAlloc(0, sz);
		memcpy(*ppbValue, (void*)tbuf, sz);
	}
	return S_OK;
}

HRESULT WINAPI SLGetWindowsInformationDWORD(PCWSTR pwszValueName, DWORD* pdwValue)
{
	return SLGetWindowsInformation(pwszValueName, (void*)-1, (void*)-1, (PBYTE*)pdwValue);
}

HRESULT WINAPI SLGetGenuineInformation(const SLID *pAppId, PCWSTR pwszValueName, SLDATATYPE *peDataType, UINT *pcbValue, BYTE **ppbValue)
{
	return sl_get(APP, pwszValueName, peDataType, pcbValue, ppbValue);
}

HRESULT WINAPI SLGetPKeyInformation(HSLC hSLC, SLID *pPKeyId, PWSTR pwszValueName, SLDATATYPE *peDataType, UINT *pcbValue, PBYTE *ppbValue)
{
	return sl_get(APP, pwszValueName, peDataType, pcbValue, ppbValue);
}

BOOL APIENTRY WINAPI dll_main(HINSTANCE hModule, DWORD code, LPVOID ress)
{
	static int doneinit;
	if (code != DLL_PROCESS_ATTACH)
		return TRUE;
	if (doneinit)
		return TRUE;
	doneinit = 1;
	nconsumed = 1;
	return TRUE;
}

HRESULT WINAPI ok1(void *a1) {return S_OK;}

 

  Reveal hidden contents

LIBRARY slc.dll
EXPORTS
SLGetPKeyInformation
SLGetProductSkuInformation = SLGetPKeyInformation
SLGetSLIDList
SLGetWindowsInformation
SLGetWindowsInformationDWORD
SLGetGenuineInformation
SLGetLicensingStatusInformation
SLOpen
SLClose = ok1

.def

reg add "HKLM\SYSTEM\Tokens" /v "Channel" /f

Is only needed with current SLC.dll.

What needs to be done: 

SLGetPKeyInformation SL_INFO_KEY_CHANNEL L"Channel", Optional L"Retail"
https://docs.microsoft.com/en-us/windows/desktop/api/slpublic/nf-slpublic-slgetpkeyinformation

 

SLGetGenuineInformation should also be looked at when doing so.
https://docs.microsoft.com/en-us/windows/desktop/api/slpublic/nf-slpublic-slgetgenuineinformation

Once removed, slc.dll can be placed into \sources and it will auto-activate if upgrading.

Also:
gatherosstate.exe %programdata%\Microsoft\Windows\ClipSVC\GenuineTicket
clipup -o  > NUL


Put it where it belongs, so -allto doesn't need to be used, only -o, simpler.

Bonus: GatherOSData from SDK is significantly faster generating token.
https://i.imgur.com/b9jKgqv.gif

Hi, thank you very much for this nice update. 

I only know some batch, so I can't be much help , but you have given me useful pointers, I'll try my best to properly implement it. Thanks a lot again.

Edited by WindowsAddict

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...