Activating a license for 2017
DOES WORK, after the above mentioned change of URL is done to the file
/Support/License.dat
[Licensing UI]
LICENSING_ADD_LICENSE=https://licensing.sketchup.com/en/2017/add-license.html
How to activate on SU2016:
It’s quite a bit more complicated than on 2017, should work with 2015 too i guess.
I found out i DO have a SU2017 license when my SU2016 workaround started to work…
The server responded that my lic. seems not to be valid… (Aha, seems i upgraded, and forgot about it.):
The “License Manager” link still works, and based on the old serial it could tell me the new one and mail me the auth.nr.
So, it looks like activating on SU2016 would work too, but i could not test, since my 2016 lic. is no longer valid after i upgraded it to 2017…
-
You need to use a tool like Fiddler.
It can intercept SU’s request to the license server and respond with a local file, in which we fix the issues of the original file:
-
The local file is a modified version of the one originally returned by the server.
The modifications:
Mainly, the code of the linked addLicenseV2.js which only works on EDGE is replaced by IE-compatible equivalent code. Gemini was able to create that 1st try… (It is directly embedded in the html doc to avoid https errors when loading from file://).
I also removed google tag manager and changed urls from relative to absolute. That’s all i think.
<!DOCTYPE html>
<!--[if IE 8]><html class="ie8"><![endif]-->
<!--[if (gt IE 8)|!(IE)]><!--><html><!--<![endif]-->
<head>
<title>SketchUp Pro 2017 - Add-License | SketchUp</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="https://licensing.sketchup.com/images/favicon.ico" type="image/vnd.microsoft.icon" />
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400,300' rel='stylesheet' type='text/css'>
<style type="text/css">
html,
body {
background-color: #d4d5d1;
font-family: 'open sans', sans-serif;
font-size: 14px;
height: 100%;
margin: 0;
overflow: hidden;
padding: 0;
width: 100%;
}
a {
display: inline-block;
font-size: 14px;
margin-top: 8px;
}
#advanced {
display: none;
height: 100%;
}
#advanced #host {
display: none;
font-size: 14px;
}
#adv-btn {
color: #4d5259;
display: inline-block;
font-size: 14px;
margin-top: 22px;
text-decoration: none;
}
#adv-btn:hover {
text-decoration: underline;
}
#add-license-btn,
#adv-license-btn,
.action-btn {
cursor: pointer;
float: right;
outline: none;
}
#ajaxBusy {
background: rgba(0,0,0,0.15) url('https://licensing.sketchup.com/images/ajax-loader.gif') no-repeat center;
background-size: 50px;
bottom: 0;
display: none;
height: 100%;
left: 0;
margin: auto;
overflow: hidden;
padding: 0;
position: absolute;
right: 0;
top: 0;
width: 100%;
z-index: 10;
}
#content {
height: 200px;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
}
.cta-btn {
background: #e72b2d;
border: 0;
color: #fff;
cursor: pointer;
display: inline-block;
font-size: 14px;
font-size: 1.4rem;
font-weight: 600;
margin: 10px 0;
padding: 9px 27px;
text-align: center;
white-space: nowrap;
}
.dialog-box {
margin: 0;
padding: 50px 40px;
width: auto;
}
.message-area {
box-sizing: border-box;
font-size: 16px;
height: 182px;
padding: 10px 40px;
text-align: center;
}
.big-message-area {
box-sizing: border-box;
font-size: 12px;
text-align: center;
}
.headline {
font-size: 24px;
font-weight: bold;
}
.cloak {
display: none;
}
.license-info.invalid {
border: 2px solid #e72b2d;
}
.guidance {
color: #4D5259;
font-size: 21px;
}
#serial-number,
#authorization-code {
box-sizing: border-box;
font-size: 16px;
margin: 10px 0 5px;
padding: 3px 5px;
width: 100%;
}
#serial-number:active,
#authorization-code:active {
outline: none;
}
.tip {
margin-top: 20px;
}
textarea {
background: #fff url('https://licensing.sketchup.com/images/bg-adv-license.jpg') center no-repeat;
background-color: #fff;
background-size: contain;
box-sizing: border-box;
font-size: 14px;
margin-top: 17px;
padding: 3px 5px;
outline: none;
overflow: auto;
resize: none;
width: 100%;
}
#welcome-window {
color: #4D5259;
height: 298px;
margin: 0 auto;
position: relative;
width: 639px;
}
</style>
</head>
<body>
<div id="welcome-window">
<div id="content">
<div id="simple" class="dialog-box">
<p class="guidance">JS translated by Gemini to IE11 compatibility: Copy and paste your license info below</p>
<input type="text" id="serial-number" placeholder="Serial Number" class="license-info">
<input type="text" id="authorization-code" placeholder="Authorization Code" class="license-info">
<a id="adv-btn" class="toggle-btn" href="#">Advanced...</a>
<button id="add-license-btn" class="cta-btn">Add License</button>
</div>
<div id="advanced" class="dialog-box cloak">
<textarea id="adv-serial" cols="50" rows="8"></textarea>
<a id="adv-btn" class="toggle-btn" href="#">Back to simple licensing...</a><button id="adv-license-btn" class="cta-btn">Add License</button>
<p id="host">
Host ID: <input type="text" id="hostId" value="Host Id" style="width: 50%;" disabled>
</p>
</div>
<div id="invalid-license" class="dialog-box cloak error">
<div class="big-message-area">
<p class="headline">Oops...</p>
<p>That doesn’t look like a valid Serial Number and Authorization Code combination.</p>
<p>Please check your license and try again.<br>
(Hint: Copy & paste works best, but also try manually typing it in.)</p>
<p>Authorization codes can be found in your license email or retrieved from our <a href="skp:openExternalUrl@https://www.sketchup.com/license/renew">License Manager</a>.<br>
For more license troubleshooting tips, please visit this <a href="skp:openExternalUrl@https://help.sketchup.com/en/sketchup/troubleshooting-license-error-messages">Help Center article</a>.</p>
</div><button id="reset" class="action-btn cta-btn return">Let me try again...</button>
</div>
<div id="incompatible-license" class="dialog-box cloak error">
<div class="big-message-area">
<p class="headline">Oops...</p>
<p>That doesn't look like a valid license for this version.<br>
Each year's version has its own unique license serial number and authorization code.</p>
<p>SketchUp Pro 2017 serial numbers begin with the letter "S".</p>
<p>Authorization codes can be found in your license email or retrieved from our <a href="skp:openExternalUrl@https://www.sketchup.com/license/renew">License Manager</a>.<br>
For more license troubleshooting tips, please visit this <a href="skp:openExternalUrl@https://help.sketchup.com/en/sketchup/troubleshooting-license-error-messages">Help Center article</a>.</p>
</div><button id="" class="action-btn cta-btn return">Let me try again...</button>
</div>
<div id="machine-limit" class="dialog-box cloak error">
<div class="message-area">
<p class="headline">Oops...</p>
<p>This SketchUp Pro license has been used on too many computers</p>
<a href="skp:openExternalUrl@https://help.sketchup.com/en/article/3000078">Learn more...</a>
</div><button id="" class="action-btn cta-btn return">Add License...</button>
</div>
<div id="expired-license" class="dialog-box cloak error">
<div class="message-area">
<p class="headline">Oops...</p>
<p>Your SketchUp Pro license has expired.</p>
<p class="tip">Tip: Contact the company that provided your SketchUp Pro license to renew your license.</p>
</div>
<a href="skp:showRemoveLicensePage" id="" class="">
Remove license...
</a>
</div>
<div id="network-error" class="dialog-box cloak error">
<div class="message-area">
<p class="headline">Oops...</p>
<p>SketchUp encountered an error with the license server.</p>
</div><button id="" class="action-btn cta-btn retry">Retry...</button>
</div>
</div>
</div>
<div id="ajaxBusy"></div>
<script type="text/javascript" src="https://licensing.sketchup.com/libraries/jquery/jquery-3.2.0.min.js"></script>
<script type="text/javascript" src="https://licensing.sketchup.com/libraries/jquery/jquery.placeholder.min.js"></script>
<!-- <script type="text/javascript" src="https://licensing.sketchup.com/libraries/sketchup/addLicenseV2.js"></script> -->
<script type="text/javascript">
(function($) {
function addLicense() {
var separator = '----------------------------------------------------------------------';
$.valHooks.textarea = {
get: function(elem) {
return elem.value.replace(/(?:\r\n|\r|\n)/g, '%0A');
}
};
var sketchupLicense = $('#adv-serial').val();
if (sketchupLicense.indexOf(separator) !== -1) {
var start_pos = sketchupLicense.indexOf(separator) + 1;
var end_pos = sketchupLicense.indexOf(separator, start_pos);
sketchupLicense = sketchupLicense.substring(start_pos, end_pos);
}
window.location.href = 'skp:addLicense@' + sketchupLicense;
}
function autoLicense(version, host, os) {
var auto = $.QueryString['auto'];
if (auto) {
callForLicense(version, host, os);
}
}
function validateInput() {
var isValid = true;
var language = window.location.pathname.split('/')[1];
var serialNumberRequired, authCodeRequired;
switch(language) {
case 'de':
serialNumberRequired = 'Seriennummer ist erforderlich';
authCodeRequired = 'Autorisierungscode ist erforderlich';
break;
case 'es':
serialNumberRequired = 'Se requiere el número de serie';
authCodeRequired = 'Se requiere el código de autorización';
break;
case 'fr':
serialNumberRequired = 'Numéro de série requis';
authCodeRequired = 'Code d\'autorisation requis';
break;
case 'it':
serialNumberRequired = 'Il numero seriale è obbligatorio';
authCodeRequired = 'Il codice di autorizzazione è obbligatorio';
break;
case 'ja':
serialNumberRequired = 'シリアル番号が必要です';
authCodeRequired = '認証コードが必要です';
break;
case 'ko':
serialNumberRequired = '일련 번호가 필요합니다';
authCodeRequired = '승인 코드가 필요합니다';
break;
case 'pt-BR':
serialNumberRequired = 'É necessário o número de série';
authCodeRequired = 'Código de autorização é necessária';
break;
case 'zh-CN':
serialNumberRequired = '需要序列号';
authCodeRequired = '需要验证码';
break;
case 'zh-TW':
serialNumberRequired = '需要序號';
authCodeRequired = '需要授權碼';
break;
case 'sv':
serialNumberRequired = 'Serienummer krävs';
authCodeRequired = 'Auktoriseringskod krävs';
break;
case 'ru':
serialNumberRequired = 'Серийный номер необходим';
authCodeRequired = 'Код авторизации необходим';
break;
default:
serialNumberRequired = 'Serial number is required';
authCodeRequired = 'Authorization Code is required';
}
if(!$('#serial-number').val()) {
$('#serial-number')
.attr('placeholder', serialNumberRequired)
.addClass('invalid');
isValid = false;
}
if(!$('#authorization-code').val()) {
$('#authorization-code')
.attr('placeholder', authCodeRequired)
.addClass('invalid');
isValid = false;
}
return isValid;
}
function callForLicense(version, host, os_user_name) {
if ($('#simple').is(':visible')) {
var serialNumber = $('#serial-number').val().trim();
var authCode = $('#authorization-code').val().trim();
var license = '{"serial_number": "' + serialNumber + '",' +
'"auth_code": "' + authCode + '",' +
'"su_version": "' + version + '",' +
'"host_id": "' + host + '",' +
'"os_user_name": "' + os_user_name + '"}';
if (validateInput()) {
var request = $.ajax({
data: 'input=' + license,
dataType: 'json',
timeout: 15000,
type: 'POST',
url: window.location.hostname === 'licensing.sketchup.com' ?
'https://api.sketchup.com/licensing/v1/activate' :
'https://stg-api.sketchup.com/licensing/v1/activate'
});
request.done(function(data) {
switch(data.response_code) {
case 0:
var license_file = data.license_file;
license_file = license_file.replace(/(?:\r\n|\r|\n)/g, '%0A');
license_file = license_file.replace(/\\/, '%5C');
window.location.href = 'skp:addLicense@' + license_file;
break;
case 1:
$('.dialog-box').hide();
$('.license-info').addClass('invalid');
$('#invalid-license').show();
break;
case 2:
$('.dialog-box').hide();
$('#machine-limit').show();
break;
case 3:
$('.dialog-box').hide();
$('#expired-license').show();
break;
case 4:
$('.dialog-box').hide();
$('#invalid-license').show();
break;
case 5:
$('.dialog-box').hide();
$('#incompatible-license').show();
break;
}
});
request.fail(function(jqXHR, textStatus, errorThrown) {
$('.dialog-box').hide();
switch(textStatus) {
case 'parsererror':
$('#invalid-license').show();
break;
case 'abort':
case 'error':
case 'timeout':
default:
$('#network-error').show();
}
});
request.always(function() {
$('#ajaxBusy').fadeOut();
});
}
}
}
function obscureFields() {
var serial = $.QueryString['serial'];
if (serial) {
var oldSerial = $('#serial-number');
var oldAuthCode = $('#authorization-code');
var newSerial = $('<input>').attr({
'type' : 'password',
'id' : 'serial-number',
'class' : 'license-info',
'value' : serialNumber
});
var newAuthCode = $('<input>').attr({
'type' : 'password',
'id' : 'authorization-code',
'class' : 'license-info',
'value' : authCode
});
newSerial.insertBefore(oldSerial);
newAuthCode.insertBefore(oldAuthCode);
oldSerial.remove();
oldAuthCode.remove();
}
}
//jQuery fix for placeholders in lte IE9
$('input, textarea').placeholder();
// Get the serial number from the query string
$.QueryString = (function(a) {
if (a === '') return {};
var b = {};
for (var i = 0; i < a.length; ++i) {
var p = a[i].split('=');
if (p.length != 2) continue;
b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, ' '));
}
return b;
})(window.location.search.substring(1).split('&'));
var serialNumber = $.QueryString['serial'];
var authCode = $.QueryString['auth'];
var suVersion = $.QueryString['su_version'];
var hostId = $.QueryString['host_id'];
var osUserName = $.QueryString['os_user_name'];
if (typeof serialNumber !== 'undefined') {
$('#serial-number').val(serialNumber);
$('#authorization-code').val(authCode);
}
var urlPath = window.location.pathname.split('/', 3);
var langCode = urlPath[1];
var versionFromPath = urlPath[2];
// 2019 and later use placeholder text instead of the background image.
var suVersionNum = parseInt(versionFromPath, 10);
if (suVersionNum <= 2018) {
var bgImage = '#fff url(/images/' + langCode + '/bg-adv-license.jpg) center no-repeat';
$('#adv-serial').css('background', bgImage);
$('#advanced textarea').on('focus', function() {
$(this).css('background', '#fff');
}).on('blur', function() {
if ($(this).val() == '') {
$(this).css('background', bgImage);
}
});
} else {
$('#adv-serial').css('background', '#fff');
}
$('#advanced').on('click', function(e) {
var hostId = $.QueryString['host_id'];
$('input#hostId').attr('value', hostId);
if (e.shiftKey) {
$('#host').toggle();
}
});
$('#add-license-btn').on('click', function() {
callForLicense(suVersion, hostId, osUserName);
});
$('#adv-license-btn').on('click', function() {
addLicense();
});
$('.toggle-btn').on('click', function() {
$('#simple').toggle();
$('#advanced').toggle();
});
$('.return').on('click', function() {
$('.error').hide();
$('.hide').hide();
$('#simple').show();
});
$('#reset').on('click', function() {
$('.error').hide();
$('.hide').hide();
$('#simple').show();
});
$('.retry').on('click', function() {
callForLicense(suVersion, hostId, osUserName);
});
$('#serial-number').on('keyup', function(e) {
if (e.which == 13) {
$('#authorization-code').focus();
}
});
$('#authorization-code').on('keyup', function(e) {
if (($('#serial-number').val()) && ($('#authorization-code').val())) {
if (e.which == 13) {
callForLicense(suVersion, hostId, osUserName);
e.preventDefault();
}
}
});
// Ajax activity indicator bound to ajax start/stop document events
$(document).ajaxStart(function() {
$('#ajaxBusy').fadeIn();
}).ajaxStop(function() {
$('#ajaxBusy').fadeOut();
});
$(function() {
obscureFields();
autoLicense(suVersion, hostId, osUserName);
});
})(jQuery);
</script>
</body>
</html>
PS:
To get developper tools on embedded IE:
Open the embedded IE u want to inspect, then start %systemroot%\system32\f12\IEChooser.exe
PPS:
I know, the topic can sometimes shift gradually, but…
What about discussing Rhino and the World somewhere else than in this thread about the Lic. Server?
(Please don’t answer, just act accordingly )