Skip to content

Instantly share code, notes, and snippets.

@eyecatchup
Created December 28, 2016 07:53
Show Gist options
  • Save eyecatchup/8853938019e5864b2568d4852900ff27 to your computer and use it in GitHub Desktop.
Save eyecatchup/8853938019e5864b2568d4852900ff27 to your computer and use it in GitHub Desktop.
[Windows Registry Hack] Remapping Windows Event-Viewer Help Links to actually work.
<?php
/**
* Remapping the Windows Event-Viewer Online Help Link to actually work.
*
* Change the value of registry key HKLM\Software\Microsoft\Windows NT\CurrentVersion\EventViewer\MicrosoftRedirectionURL
* from http://go.microsoft.com/fwlink/events.asp to whereever this script sits.
*
* Idea by: http://www.howtogeek.com/school/using-windows-admin-tools-like-a-pro/lesson3/
*/
function clean($str) {
return str_replace('®', '', $str);
}
$url = 'https://google.com/search?q=' . urlencode('"Event ID ' . $_GET['EvtID'] .
'" "' . clean($_GET['EvtSrc']) . '" "' . clean($_GET['ProdName']) . '"');
header('Location: ' . $url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment