dism /online /Enable-Feature /FeatureName:TelnetClient
Thursday, July 7, 2016
Add WPAD to DNS server, Proxy server
run in powershell on DNS server (Domain Controller):
dnscmd /config /globalqueryblocklist wpad
or from Regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\ParametersGlobalQueryBlockLIst add wpad to value data.
Add WPAD to DNS server, Proxy server
run in powershell on DNS server (Domain Controller):
dnscmd /config /globalqueryblocklist wpad
or from Regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\ParametersGlobalQueryBlockLIst remove wpad
Monday, May 30, 2016
Tuesday, May 24, 2016
Get Windows and Office version on remote computers
for /F "tokens=*" %x in ('type c:\tmp\pc.txt') do cscript /nologo C:\tmp\office_versions.vbs "%x">>C:\tmp\os_office.txt
Wednesday, May 18, 2016
Sharepoint 2013 Gallery SlideShow
http://www.getinthesky.com/2014/04/sharepoint-image-gallery-doesnt-suck/
Friday, May 13, 2016
Sharepoint Visio WebPart Hyperlink disable Press CTRL
1. Place a ScriptEditor webpart on the same page that has the Visio webpart
2. Paste the following code into the webpart:
<script type="text/javascript">
// Declare global variables.
var vwaControl;
var vwaPage;
var vwaShapes;
var currentShape;
// Declare global variables.
var vwaControl;
var vwaPage;
var vwaShapes;
var currentShape;
Sys.Application.add_load(onApplicationLoad)
// Search the SharePoint page to get the WebPartID# for the Visio Web Access Web Part.
function getVWAWebPartID()
{
// Get a NodesList of all the div tags on the page.
var divArray = document.getElementsByTagName("div");
var webPartElementID;
// Iterate through the NodesList to get the node with the class attribute "VisioWebAccess."
for (var i = 0; i < divArray.length; i++) {
var node = divArray[i];
// Return the first instance of the Visio Web Access Web Part.
if (node.className == "VisioWebAccess") {
webPartElementID = node.parentNode.parentNode.id;
break;
}
}
return webPartElementID;
}
function getVWAWebPartID()
{
// Get a NodesList of all the div tags on the page.
var divArray = document.getElementsByTagName("div");
var webPartElementID;
// Iterate through the NodesList to get the node with the class attribute "VisioWebAccess."
for (var i = 0; i < divArray.length; i++) {
var node = divArray[i];
// Return the first instance of the Visio Web Access Web Part.
if (node.className == "VisioWebAccess") {
webPartElementID = node.parentNode.parentNode.id;
break;
}
}
return webPartElementID;
}
//Apply the handlers in the "OnLoad" event, for we need this each time we click a Shape
function onApplicationLoad()
{
vwaControl= new Vwa.VwaControl(getVWAWebPartID());
vwaControl.addHandler("diagramcomplete", onDiagramComplete);
vwaControl.addHandler("shapeselectionchanged", ClickIt);
vwaControl.addHandler("shapemouseenter", getShape);
vwaControl.addHandler("shapemouseleave", unselectShape);
}
function onApplicationLoad()
{
vwaControl= new Vwa.VwaControl(getVWAWebPartID());
vwaControl.addHandler("diagramcomplete", onDiagramComplete);
vwaControl.addHandler("shapeselectionchanged", ClickIt);
vwaControl.addHandler("shapemouseenter", getShape);
vwaControl.addHandler("shapemouseleave", unselectShape);
}
//This is the "MouseEnter" event that fires when you enter/hover a Shape
getShape = function (source, args)
{
currentShape=null;
currentShape=vwaShapes.getItemById(args) ;
}
getShape = function (source, args)
{
currentShape=null;
currentShape=vwaShapes.getItemById(args) ;
}
//This is the "MouseLeave" event that fires when the mousecursor leaves/unselects the shape
unselectShape = function (source, args)
{
currentShape=null ;
}
unselectShape = function (source, args)
{
currentShape=null ;
}
//The event that fires when a diagram is loaded
function onDiagramComplete() {
try {
vwaPage = vwaControl.getActivePage();
vwaShapes = vwaPage.getShapes();
currentShape=null;
}
catch (err) {
//alert(err);
}
}
function onDiagramComplete() {
try {
vwaPage = vwaControl.getActivePage();
vwaShapes = vwaPage.getShapes();
currentShape=null;
}
catch (err) {
//alert(err);
}
}
//The function that enables the single click!
function ClickIt()
{
if (currentShape != null)
{
var drawingURL = vwaControl.getDiagramUrl();
while(drawingURL.indexOf('%20')>0)
{
drawingURL=drawingURL.replace('%20',' ');
}
vwaPage = vwaControl.getActivePage();
var vwaPageName = vwaPage.getId();
var n=currentShape.getHyperlinks();
if (n.length>0 )
{
vwaPages = vwaControl.getAllPageIds();
var pageCount = vwaPages.length;
// Get page ID from array of pages IDs.
for (var i = 0; i < pageCount; i++)
{
vwaPageId = vwaPages[i];
//Set variable PageName to the URL of the Shape
vwaPageName=n[0].value;
//Clean up the URL
while(vwaPageName.indexOf('%20')>0)
{
vwaPageName=vwaPageName.replace('%20',' ');
}
//If the PageID exists in the PageName (URL of the Shape)
if (vwaPageName.indexOf(vwaPages[i])>0)
{
//HERE IT IS!! OPEN THE SHAPE WITH A SINGLE CLICK!!!
//By using "OpenDiagram" instead of "setActivePage" the Shape gets deselected after the click!
vwaControl.openDiagram(drawingURL, i);
//Call "onApplicationLoad" to set the handlers again for the 'new' Diagram
onApplicationLoad();
break;
}
}
}
}
}
onApplicationLoad();
break;
}
}
}
}
}
</script>
Subscribe to:
Posts (Atom)