Skip to main content

Posts

Showing posts from 2015

Generating OPC Automation IDL, TLB and header files from OPCDAAuto.dll

OPC Automation IDL, TLB and header files are not easy to find. You can obtain this files from OPC Foundation if you are a member or maybe from OPC application vendor. The IDL file can be reverse engineered using OLE-Com Object Viewer. Once the IDL is generated TLB and other files can be generated from it as well. Below is a general direction how to do this. Steps to reverse generate IDL, TLB and header files for OPCDAAuto.dll: Download Windows 7 SDK. I am using GRMSDKX_EN_DVD.iso as the OS is Windows 7 64-bit. Install the SDK. Open CMD Shell (Start | All Programs | Microsoft Windows SDK v7.0 | CMD Shell) Change directory to bin folder. Run oleview.exe , this will open a 32-bit version of the application. Note that this is important as the OPCDAAuto.dll I have is 32-bit as well. Navigate to Type Libraries | OPC Automation 2.0 (Ver 1.0) Double click to view Type Library definition. Do File | Save As... to D:\OPCDaAuto\OPCDaAuto.IDL . Go back to the cmd.exe as per step

Check Windows input message queue idle in Python

Code below shows how to check for message queue input idle. Note that WaitForInputIdle waits only once per process on any thread. So if one of the thread returns idle then it will return right away.  Tested on: Windows 10 TH2 (build 1511) Python 3.5.1 64-bit Also need to install pywin32, like: c:\> pip install pypiwin32 This should be run on elevated prompt.

How to resolve external hosts when using pfSense as firewall/router

pfSense 2.2.5 does not automatically resolve external hosts (but not hosts from the internet) using DNS servers provided by DHCP from the WAN interface. To force it resolve, do: Navigate via Web UI: Services | DNS Resolver Scroll down to Domain Overrides Add entry Domain: [a domain suffix, e.g., test.org] IP address: [DNS server IP] What are the side effects without the above changes? pfSense clients not able to access internet, especially when internet is controlled via a proxy. Windows clients unable to access Windows share even using FQDN

Windows 10 Mail app "Something went wrong We're sorry, but we weren't able to do that."

Upgraded from Windows 8 to Windows 10, Mail app stopped working with the following message Something went wrong We're sorry, but we weren't able to do that. Error code: 0x8007000d. Workaround is to re-install the app, see http://8thstring.blogspot.com/2015/12/how-to-remove-windows-10-mail-and.html to remove it. Once removed you can go to Windows Store to install Mail again.

Uploading custom project homepage to Srouceforge

It took me a while to find the latest instructions on how to upload my own webpage for my project in Sourcefoge. I have shamelessly copied the instructions below for posterity. For managing Project Web space Project web Hostname: web.sourceforge.net Path: htdocs/ Username: Combine your SourceForge.net Username with your SourceForge.net project UNIX name using a comma ( "," ) See Example Password: Your SourceForge.net Password An example session might look like the following for Username "jsmith" uploading a file for his project with a UNIX name of "fooproject": [jsmith@linux ~]$ sftp jsmith,fooproject@web.sourceforge.net Connecting to web.sourceforge.net... The authenticity of host 'web.sourceforge.net (216.34.181.57)' can't be established. RSA key fingerprint is 68:b3:26:02:a0:07:e4:78:d4:ec:7f:2f:6a:4d:32:c5. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'web.sourceforge.net,216.34.181.57'

The panel encountered a problem while loading "TrashAppletFactory::TrashApplet"

Installed Ubuntu 15.04 CLI (network install), then installed Ubuntu MATE minimal installation. The issue is that every time I login I run into an application crashing. The panel encountered a problem while loading "TrashAppletFactory::TrashApplet"  I am guessing that this is for the Trash Can on the desktop, clicking on Delete will prevent this error message from showing up again next time. Of course you will not have the Trash on the desktop. References: https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/727660 https://bug654843.bugzilla-attachments.gnome.org/attachment.cgi?id=201328

Windows 10 OneNote Sorry something went wrong

Created Windows 10 Enterprise VM using a local account then associated with Live ID/Microsoft Account, then dis-associated again as I was using the wrong ID. Re-associated with another account, it seems to work but OneNote is having problem. Error shows like: Sorry, something went wrong. We are unable to sign you in. Please try again later. Re-tried and re-tried nothing works. The workaround is to uninstall and then reinstall OneNote. Unfortunately, OneNote is one of the built in applications and cannot be removed using Apps & Features in SYSTEM settings. To uninstall, drop to PowerShell with elevated/administrative privileges and run the following: PS C:\> Get-AppxPackage *microsoft.office.onenote* | Remove-AppxPackage Once removed, open Store (Windows Store application) then install OneNote. Launching OneNote should now ask for new credentials. Have fun! Reference(s): http://answers.microsoft.com/en-us/insider/forum/insider_office-insider_onenote/onenote-un

PowerShell Quick Tips: Rename a computer

Rename local computer to W8M1 and restart PS D:\> Rename-Computer -NewName W8M1 -Restart The above command works with Powershell 3.0. For Powershell 2.0, below can be used on an elevated privileges. PS D:\> $computer = Get-WmiObject Win32_ComputerSystem -ComputerName <old_name> PS D:\> $computer.Rename("<new_name>") PS D:\> $os = Get-WmiObject Win32_OperatingSystem PS D:\> $os.psbase.Scope.Options.EnablePrivileges = $true PS D:\> $os.Reboot() Using WMIC to rename a computer D:\> WMIC ComputerSystem where Name="%computername%" call Rename Name=NewName References: http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/c9dcf26a-5476-4199-8311-b101c969a47a/ http://blogs.technet.com/b/askds/archive/2009/02/19/renaming-a-computer-using-wmic-and-how-to-get-around-that-aggravating-invalid-global-switch-error.aspx

Windows 10 E B 10074 text corruption in File Explorer

Just installed Windows 10 Enterprise build 10074. First impression? Feels slower than build 10041. Also noticed that File Explorer shows corrupted string in Quick Access folder. [6/3/2015] Same issue is observed on Windows Server Technical Preview 2 (Windows 2016).

Project Spartan (Edge) does not open on the default Administrator account on Windows 2016

Looks like Microsoft is now getting really serious with security. Their newest browser, code named "Project Spartan" or Edge, does not run if the user is the default administrator account on Windows 2016 (Windows Server Technical Preview 2).

How to install GUI on Windows Server (2016) Technical Preview 2

Windows Server Technical Preview 2 (Windows Server 2016?) does not have the option to install the full GUI. Figure 1.  It does have the option to install minimum shell (MinShell). This will provide access to Server Manager and the cmd.exe as shown below. Figure 2. The GUI can be installed, that I know of, either using Server Manager or PowerShell. To install using Server Manager, do  Manage | Add Roles and Features . Hit on Next button using the default selection until you reach Features dialog. Under the feature User Interface and Infrastructure , select Server Graphical Shell . Figure 3. Feature dialog Progress the dialog/wizard window until completion. Power users can also install the GUI using PowerShell, like: PS C:\>Install-WindowsFeature Server-Gui-Shell -Restart Reference(s): https://4sysops.com/archives/how-to-install-the-gui-on-windows-server-2016/

pip fails to run on Windows 10 E build 10074

Installed Windows 10 E 64-bit build 10074, followed by Python 2.7.9 32-bit. Running pip fails the with message Fatal error in launcher: Job information querying failed Issue is open in Github, see below https://github.com/pypa/pip/issues/2748 This issue is also reported in Python.org, see https://bugs.python.org/issue24127 Workaround: C:\>python -m pip install comtypes

Updating Eclipse Kepler shows 'Backup of file eclipse.exe failed'

Tried to update Eclipse Kepler but failed with message below. An error occurred while uninstalling session context was:(profile=epp.package.testing, phase=org.eclipse.equinox.internal.p2.engine.phases.Uninstall, operand=[R]org.eclipse.rcp.configuration_root.win32.win32.x86 1.0.0.v20130521-1847 --> null, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction). Backup of file D:\eclipse\eclipse.exe failed. Can not remove : D:\eclipse\eclipse.exe The workaround? Rename existing eclipse.exe to say eclipse1.exe Run eclipse1.exe Do Eclipse update 

Change Tfs scrum working days

By default Tfs scrum template sets Monday to Friday as working days, and Saturday/Sunday as excluded. To change the days or include Saturday/Sunday for the work, do: Click on the " Administer Account ", this is the gear icon. Navigate to Control Panel > [CollectionName] > [Project] > [Project] Team . Click on Settings , then change as appropriate. Notes: Tested on Tfs 2013/Visual Studio online (as of 04/25/2015)

Fix corrupted console font on Ubuntu 15.04

My tasksel looks like below. To fix this do: $: sudo dpkg-reconfigure console-setup Then select:  UTF-8 Guess optimal character set Terminus 8x16 Select different font type as appropriate. Keywords: tty;console;command line;cli install Refs: http://askubuntu.com/questions/173220/how-do-i-change-the-font-or-the-font-size-in-the-tty-console