Testing GP from 2 Servers

email me

To find where the GP is coming from

nltest /dsgetdc:domain.local

The output was:

DC: \\DC1.DOMAIN.local
Address: \\10.10.10.1
Dom Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Dom Name: DOMAIN.local
Forest Name: DOMAIN.local
Dc Site Name: Default-First-Site-Name
Our Site Name: Blackops
Flags: PDC GC DS LDAP KDC TIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST
The command completed successfully

This means that the client is using DC1.

To test GP from DC2

nltest /Server:client0 /SC_RESET:domain.local\dc2

The output should be:

Flags: 30 HAS_IP HAS_TIMESERV
Trusted DC Name \\DC2.DOMAIN.local
Trusted DC Connection Status Status = 0 0x0 NERR_Success
The command completed successfully

Corrupt Flash Player Error 1722

email me

(1) Use the Adobe Flash uninstaller to remove Flash Player
here

 

(2) Delete Flash Player files and folders

C:\Windows\SysWOW64\Macromed\Flash
%appdata%\Adobe\Flash Player
%appdata%\Macromedia\Flash Player

 

(3) Launch Regedit, delete keys from

HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayer\SafeVersions\

 

Or, run script I found on a forum (save as a batch file, i.e. script.cmd):

@echo off

echo Commencing Flash cleanup > C:\FlashClean.log

echo. >> C:\FlashClean.log

echo Cleaning 00AB3E66D3B6B66469AF36907A4FB20B >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Products\00AB3E66D3B6B66469AF36907A4FB20B /f >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Features\00AB3E66D3B6B66469AF36907A4FB20B /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\00AB3E66D3B6B66469AF36907A4FB20BInstaller\Products\ /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\00AB3E66D3B6B66469AF36907A4FB20B /f >> C:\FlashClean.log

echo. >> C:\FlashClean.log

echo Cleaning C460100B160DEAB4091314A638D85563 >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Products\C460100B160DEAB4091314A638D85563 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Features\C460100B160DEAB4091314A638D85563 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\C460100B160DEAB4091314A638D85563 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\C460100B160DEAB4091314A638D85563 /f >> C:\FlashClean.log

echo. >> C:\FlashClean.log

echo Cleaning FE188D887650A344A9485EAAFE92BB43 >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Products\FE188D887650A344A9485EAAFE92BB43 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Features\FE188D887650A344A9485EAAFE92BB43 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\FE188D887650A344A9485EAAFE92BB43 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\FE188D887650A344A9485EAAFE92BB43 /f >> C:\FlashClean.log

echo. >> C:\FlashClean.log

echo Cleaning 5E5CA04FBA55A964ABB838C90E413608 >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Products\5E5CA04FBA55A964ABB838C90E413608 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Features\5E5CA04FBA55A964ABB838C90E413608 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\5E5CA04FBA55A964ABB838C90E413608 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\5E5CA04FBA55A964ABB838C90E413608 /f >> C:\FlashClean.log

echo. >> C:\FlashClean.log

echo Cleaning D90E84CDF5E493049BA3CFDE63FEEB55 >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Products\D90E84CDF5E493049BA3CFDE63FEEB55 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_CLASSES_ROOT\Installer\Features\D90E84CDF5E493049BA3CFDE63FEEB55 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\D90E84CDF5E493049BA3CFDE63FEEB55 /f >> C:\FlashClean.log

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\D90E84CDF5E493049BA3CFDE63FEEB55 /f >> C:\FlashClean.log

echo. >> C:\FlashClean.log

echo Cleaning SafeVersions tree

reg.exe DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayer\SafeVersions /f >> C:\FlashClean.log

echo. >> C:\FlashClean.log

echo Cleanup completed >> C:\FlashClean.log

exit 0

Get around UAC prompt for specific EXEs

email me

To stop UAC from prompting an end-user, add a reg key for the exe.

For example, if I want to stop UAC on foo.exe from prompting end-users:

Copy the below into notepad.exe, update the path to the EXE (change from foo.exe to the path to your EXE), save as Import.reg, then double-click the reg file to merge with the registry. Restart the computer, and then try launching the EXE.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
“C:\\Users\\Administrator\\Desktop\\foo.exe”=”RUNASADMIN”

WordPress – Fixing Stretched Images for Cell Phones

email me

I noticed that when I viewed my WordPress on a phone, the pictures were stretched (very annoying).

See the parts in bold, I made edits to my style.css — located in the theme folder. For example, mine was in wp > wp-content > themes > twentytwelve, file name: style.css

/* Minimum width of 300 pixels. */
@media screen and (min-width: 300px) {

.author-avatar {
float: left;
margin-top: 8px;
margin-top: 0.571428571rem;
}
.author-description {
float: right;
width: 80%;
}
.site {
margin: -15px -15px;
max-width: 500px;
max-width: 100rem;
overflow: hidden;

}
.site-content {
float: left;
width: 105%;
}
img {
/* This controls the image */
max-width: 100%;
height: auto;
}

.site-header h1,
.site-header h2 {
text-align: left;
}
.site-header h1 {
font-size: 26px;
font-size: 1.857142857rem;
line-height: 1.846153846;
margin-bottom: 0;
}
.main-navigation ul.nav-menu,
.main-navigation div.nav-menu > ul {
border-bottom: 1px solid #ededed;
border-top: 1px solid #ededed;
display: inline-block !important;
text-align: left;
width: 100%;
}
.main-navigation ul {
margin: 0;
text-indent: 0;
}
.main-navigation li a,
.main-navigation li {
display: inline-block;
text-decoration: none;
}
.main-navigation li a {
border-bottom: 0;
color: #6a6a6a;
line-height: 3.692307692;
text-transform: uppercase;
white-space: nowrap;
}
.main-navigation li a:hover {
color: #000;
}
.main-navigation li {
margin: 0 40px 0 0;
margin: 0 2.857142857rem 0 0;
position: relative;
}
.main-navigation li ul {
display: none;
margin: 0;
padding: 0;
position: absolute;
top: 100%;
z-index: 1;
}
.main-navigation li ul ul {
top: 0;
left: 100%;
}
.main-navigation ul li:hover > ul {
border-left: 0;
display: block;
}
.main-navigation li ul li a {
background: #efefef;
border-bottom: 1px solid #ededed;
display: block;
font-size: 11px;
font-size: 0.785714286rem;
line-height: 2.181818182;
padding: 8px 10px;
padding: 0.571428571rem 0.714285714rem;
width: 180px;
width: 12.85714286rem;
white-space: normal;
}
.main-navigation li ul li a:hover {
background: #e3e3e3;
color: #444;
}
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_item > a,
.main-navigation .current_page_ancestor > a {
color: #636363;
font-weight: bold;
}
.menu-toggle {
display: none;
}

How to Unblock a file or many files

email me

The error: “This file came from another computer and might be blocked to help protect this computer”

The reason you receive this message is because Windows has detected a file came from a different computer (so, you’re receiving it for your protection). However, this Blocking, which has to be Unblocked, can be quite annoying if you have multiple blocked files.  I did some research, and have listed different solutions for handling blocked files.

If the file is a compressed file
Before unzipping, click the Unblock button on the .ZIP, or .RAR, etc.

 

PowerShell: link
dir c:\mydir -Recurse | Unblock-File

or

Unblock-File .\MyFile.PDF

 

Streams from Microsoft

To recursively remove this stream for all files, follow these steps :

1. Download the Streams CLI executable from Microsoft

2. Put the streams.exe executable in your Windows directory

3. Run this line in the command line:  streams -s -d directory

 

Adding this reg key to your registry will give you the ability to right-click and unblock

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\unblockfile]

@=”Unblock file”
[HKEY_CLASSES_ROOT\*\shell\unblockfile\command]
@=”cmd /k streams -d \”%1\””
[HKEY_CLASSES_ROOT\Directory\shell\unblockallthefiles]
@=”Unblock the files inside”
[HKEY_CLASSES_ROOT\Directory\shell\unblockallthefiles\command]
@=”cmd /k streams.exe -d -s \”%1\””

 

Or, for Widnows 8

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\powershell] @=”Unblock Files”
[HKEY_CLASSES_ROOT\*\shell\powershell\command] @=”C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe
Unblock-File -LiteralPath ‘%L'”

Also, just for fun, check out SysInternals.

 

References

http://answers.microsoft.com/en-us/windows/forum/windows_7-security/windows-7-security-blocks-potentially-harmful-file/4f9a3014-06bc-46e6-802c-154f3de1ea38

http://www.thewindowsclub.com/fix-windows-blocked-access-file

http://blogs.technet.com/b/heyscriptingguy/archive/2012/09/14/easily-unblock-all-files-in-a-directory-using-powershell.aspx

Disable Zone Checking for All Users

email me

To disable zone checking, give it the value 1.

Solution 1
REG ADD “HKCU\Environment” /V SEE_MASK_NOZONECHECKS /T REG_SZ /D 1 /F

REG ADD “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment” /V SEE_MASK_NOZONECHECKS /T REG_SZ /D 1 /F


Solution 2

reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment” /v SEE_MASK_NOZONECHECKS /d 1

reg add “HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1” /v “Flags” /t REG_DWORD /d 219 /f


Apply a reg key: link

Save the below in notepad, named YourRegFile.reg
Double-click reg file

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Security]
“DisableSecuritySettingsCheck”=dword:00000001

 

If IE displays an error page with a yellow information bar

• Run “gpedit.msc”
• Under “Computer Configuration”
• Select “Administrative Templates”
• “Windows Components”
• “Internet Explorer”
• Change “Turn off the Security Settings Check feature” to “Enabled”

 

VBScript Snippet: link

IEZoneChecks(“ENABLE”)’Turns off zone check
Put run here
IEZoneChecks(“DISABLE”)’reenables zone check
Sub IEZoneChecks(doThis)
‘Prevents “Open File – Security Warning” dialog box from displaying on Windows XP SP2 and above
‘Reference: Microsoft KB article 889815
Dim env : Set env = wshShell.Environment(“PROCESS”)
If uCase(doThis) = “DISABLE” Then
‘Ensure variable exists before attempting to remove it
env(“SEE_MASK_NOZONECHECKS”) = 0
env.Remove(“SEE_MASK_NOZONECHECKS”)
ElseIf doThis = “ENABLE” Then
env(“SEE_MASK_NOZONECHECKS”) = 1
End If
End Sub

 

Enable Zone Checking

REG Delete “HKCU\Environment” /V SEE_MASK_NOZONECHECKS /F

REG ADD “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment” /V SEE_MASK_NOZONECHECKS /T REG_SZ /D 0 /F

 

References

http://support.microsoft.com/kb/889815
http://www.visualbasicscript.com/SEE_MASK_NOZONECHECKS-m63039.aspx

Qfiniti Install Command

email me

This is the command to use in your packages/scripts to install Qfiniti

“%CD%\setup.exe” /s /v”/qb! ALLUSERS=\”1\” ADDLOCAL=\”Supervisor,Agent,G729Codec\” REMOVE=\”SoapToolKit,SystemMonitor,SystemConfiguration,AgentAssistAdminClient\” TYPE=\”WINDOWS_AUTO\” WEBSERVER=\”YourQfinitiServer.domain.name\””

Something extra I do

%windir%\system32\REG.exe DELETE “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run” /v “Qfiniti AME” /f

%windir%\system32\REG.exe DELETE “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run” /v “Qfiniti AME” /f