Friday, December 21, 2012

Exchange 2010 KB2756496 error 80070643


Update Rollup 7-v2 for Exchange Server 2010 Service Pack 1 (KB2756496)

Installation date: ‎12/‎21/‎2012 11:31 PM

Installation status: Failed

Error details: Code 80070643

Update type: Important

This update rollup resolves problems that were found in Exchange Server 2010 Service Pack 1 (SP1) since Exchange Server 2010 SP1 was released and replaces previously released update rollups for Exchange Server 2010 SP1.

More information: 
http://support.microsoft.com/?kbid=2756496
http://go.microsoft.com/fwlink/?LinkId=207096

Help and Support: 
http://technet.microsoft.com/en-US/exchange/dd203064

Fix:
http://www.expta.com/2012/08/exchange-2010-sp2-roll-up-4-does-not.html?showComment=1349847237817#c894835615165077581

Edited C:\Program Files\Microsoft\Exchange Server\V14\Scripts\ManageScheduledTask.ps1

and changed line 462 to write-output instead of return.

Exchange 2010 & Windows Server 2012 exchange management console crash.

Trying to gather data from the exchange console kept getting: error FX:{A5406CA3-6393-48a0-8827-CF06F0C94C55} Exception has been thrown by the target of an invocation.

Everything showed "Unavailable".

Fix is here:

http://social.technet.microsoft.com/forums/en-US/exchangesvrdeploylegacy/thread/02881780-9982-4a5a-a7fd-1cf609913779

Open mmc, add the exchange management console snap in and save it as emc.msc

create a bat file 


set __COMPAT_LAYER=RUNASINVOKER
set COMPLUS_Version=v2.0.50727
"C:\Users\youri\Desktop\emc.msc"

and the management console will work.

Friday, November 30, 2012

"Unable to find a version of the runtime to run this application."

Saw this trying to install software using ClickOne with a dependency on .NET framework full on windows XP.

"Unable to find a version of the runtime to run this application."

.NET framework 4 full was installed.

Solution was to download .NET framework 2.0

http://www.microsoft.com/en-us/download/details.aspx?id=20137

Let windows update install .NET framework 3.5 update.

Install .net Framework 4.


Thursday, September 20, 2012

xrdp_sec_incoming: error reading /etc/xrdp/rsakeys.ini file

xrdp_sec_incoming: error reading /etc/xrdp/rsakeys.ini file  

Fix : run xrdp as root

Tuesday, April 10, 2012

Visual Studio 2010 and "Cannot publish because a project failed to build".

Problem is with visualmicro addon.

Tools->add-in manager - > Visual Micro Arduino
Uncheck "start" and "command line" and everything works

Thursday, March 1, 2012

Apps on my Toshiba Thrive

Box.net
Stopwatch & Timer
PaintJoy
QuickPic
Whiteboard Pro
SSHDroid
Earth
Wifi Analyzer
Opera Mobile
Copilot Live USA
ColorNote
MyFitnessPal
Amazon AppStore
Parcels
Google Sky Map
MX VIdeo Player
ES File Explorer
Adsense Dashboard
Dolphin for PAD
Skype
TeamworkPM
Tapatalk
GetJar
Calculator
AdFree

Saturday, February 11, 2012

My steps for rooting a toshiba thrive hmj 37.31.5.011

Toshiba thrive version HMJ 37.31.5.0011.

I got all the information from thriveforums.org threads.

1. Downgrade to HMJ37.01.5.0032
http://www.thriveforums.org/forum/dalepl-development/4359-downgrade-official-toshiba-hmj37-31-5-0011-hmj37-01-5-0032-rollback.html

2.) Boot into recovery mode ( power off -> hold power + volume up)
3.) Select white package, select 'install update from external card'
4.) Reboot - thrive is downgraded
5.) Turn on usb debugging in settings -> applications -> development
6.) Download dalenet easy flash tool http://www.thriveforums.org/forum/dalepl-development/1974-root-tool-dalenet-thrive-10-1-easy-flash-tool.html
7.) Download a rooted ROM
8.) Extract easy flash tool
9.) Plug in thrive, install adb drivers (they were part of easy flash tool zip) (takes a while)
10.) PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\adb.exe devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
280400643406517 device
11.) shutdown, boot into recovery mode
12.) select fast boot (usb icon)
13.) Device looks like hangs at 'starting usb download protocol'
14.) PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\fastboot.exe devices
?       fastboot
15.) Reboot it
16.)PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\fastboot.exe reboot
rebooting...

finished. total time: -0.000s

17.) Steps 9-16 confirm that the usb connection is good
18.) Reboot into fastboot again
19.) Run  thrive_easy_flash_tool.bat
20.) Select #1
21.) extract update.zip from rom image onto the sd card
22.) go to applications -> super user and update it
23.) root has been obtained
24. safe boot again
25.) thrive easy flash tool
26.) 3 - install  flash recovery
27.) Install clockwork
28.) thrive will hang at installing mrb image
29.) reboot into recovery, select the package icon
30.) should be in CWM mode, install zip from sdcard
31.) reboot from the cwm menu
32.) Should be on the right image now & rooted

Wednesday, February 8, 2012

VB.net defeat simple padding obfuscation

There is an applicationthat obfuscates a serial number by padding each character. Here is a de-obfuscator I made.

First: define the array with all the characters the algorithm uses:






    Public charArray() As Char = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", _
                           "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", _
                           "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", _
                           "V", "W", "X", "Y", "Z"}

Function that will deobfuscate it.

    Private Function OffsetAChar(ByVal chartooffset As Char, ByVal offset As Integer)
        Dim posInArray As Integer = Array.IndexOf(charArray, chartooffset)
        Dim ArrayLength As Integer = charArray.Length

        If posInArray + offset = ArrayLength Then
            Return "0"
        End If

        If (posInArray + offset) <= ArrayLength And (posInArray + offset) > 0 Then
            Return charArray(posInArray + offset)
        End If

        If posInArray + offset = 0 Then
            Return 0
        End If

        If (posInArray + offset) < 0 Then
            Return charArray(ArrayLength + posInArray + offset)
        End If

        If (posInArray + offset) > ArrayLength Then
            Return charArray(Math.Abs(ArrayLength - (posInArray + offset)))
        End If

    End Function


Usage is simple:

        Dim charArray2() As Char

        Dim ArraySTring As String = txtDecode.Text
        ArraySTring = ArraySTring.Replace("-", "")
        charArray2 = ArraySTring


       txtCodeDecoded.Text += OffsetAChar(charArray2(0), -19).ToString.ToUpper


Figuring out the offset of two letters


    Public Function OffsetFinder(ByVal letter1 As Char, ByVal letter2 As Char)

        Dim CharPos1 = Array.IndexOf(charArray, letter1)
        Dim CharPos2 = Array.IndexOf(charArray, letter2)
        Return CharPos2 - CharPos1

    End Function

VB.net 2010 run an app, activate it, and send keys.

This isn't an elegant way to do it, but it works for me. It runs a program, sends alt+h, a, tab, then ctrl+c to copy text to a clipboard and puts the contents of the clipboard into a textbox.

In sendkeys:
 % = alt
vbTab = tab
^ = crl
{escape} = ESC

Imports System.Diagnostics.Process
Imports System.Threading

Public Class Form1


Public Sub GetSerials()
Dim pInfo As ProcessStartInfo = New ProcessStartInfo("C:\Program Files (x86)\CustomApp\Bin\customapp.exe")

      pInfo.WindowStyle = ProcessWindowStyle.Maximized
        Process.Start(pInfo)
        Thread.Sleep(3000)

AppActivate("CustomApp 1.1.5")


        System.Windows.Forms.SendKeys.SendWait("%")
        System.Windows.Forms.SendKeys.SendWait("h")
        System.Windows.Forms.SendKeys.SendWait("a")
        System.Windows.Forms.SendKeys.SendWait(vbTab)
        System.Windows.Forms.SendKeys.SendWait("^c")
        TextBox2.Text = (TextBox1.Text & " : " & Clipboard.GetText & vbCr)

        System.Windows.Forms.SendKeys.SendWait("{escape}")
        System.Windows.Forms.SendKeys.SendWait("%")
        System.Windows.Forms.SendKeys.SendWait("f")
        System.Windows.Forms.SendKeys.SendWait("q")



    End Sub


End Class

Monday, January 23, 2012

VB.net and oracle package that returns boolean

Public Function VALIDATE_NUMBER(ByVal num As String)
 
'connection string
 oraconnstring = "Data Source=" & OracleDataSource & ";User ID=" & OracleUserID & ";Password=" & OraclePassword & ";"

 'initialize command
        Dim oraclecmd As New OracleCommand
        oraConnection.Open()


        'Initiate the package command
        oraclecmd = oraConnection.CreateCommand
        oraclecmd.CommandType = CommandType.StoredProcedure
        oraclecmd.CommandText = "CUSTOM_PACKAGE.GET_NUM"

        'create parameters that will be passed with command
        Dim dbNum As OracleParameter
        Dim dbPartNum As OracleParameter
        Dim dbCode As OracleParameter
        'serialnumber is sent to package
        dbNum = oraclecmd.Parameters.Add("I_STR_NUMBER", OracleDbType.Varchar2)
        dbNum.Value = serialnum
        dbNum.Direction = ParameterDirection.Input
        dbNum.Size = 25
        'value is modified by oracle package
        dbPartNum = oraclecmd.Parameters.Add("O_STR_PART_NUMBER", OracleDbType.Varchar2)
        dbPartNum.Value = DBNull.Value
        dbPartNum.Direction = ParameterDirection.InputOutput
        dbPartNum.Size = 25
        'value is modified by oracle package
        dbCode = oraclecmd.Parameters.Add("O_STR_HEAT_CODE", OracleDbType.Varchar2)
        dbCode.Value = DBNull.Value
        dbCode.Value = "default"
        dbCode.Direction = ParameterDirection.InputOutput
        dbCode.Size = 25
        oraclecmd.ExecuteNonQuery()
'populate class
       numinfo.PartNumber = dbForgingPartNum.Value.ToString
       numinfo.Code = dbHeatCode.Value.ToString
 
 
        Return numinfo
 
        oraConnection.Dispose()
end function
-------------
if the package returns a boolean value, which vb.net/oracle adapter can't handle, then a solution is to create a wrapper around that package.
  oraclecmd = oraConnection.CreateCommand
 
        'initiate return value
        Dim ReturnValue As OracleParameter = oraclecmd.Parameters.Add(":ReturnValue", OracleDbType.Varchar2)
        ReturnValue.Direction = ParameterDirection.Output
        ReturnValue.Size = 1
 
        'Wrapper for the stored function (anonymous block)
        'boolean datatype is not available outside of pl/sql
 
        oraclecmd.CommandType = CommandType.Text
        oraclecmd.CommandText = "declare tmp boolean; ReturnValue varchar2(1) ;begin tmp := FS.GETSN('" & value & "');if tmp = true then :ReturnValue := 'T'; else ReturnValue := 'F'; end if; end;"
 
        'execute the anonymous block
        oraclecmd.ExecuteNonQuery()
 
        'convert returnvalue into a string
        Dim a As String = oraclecmd.Parameters(":ReturnValue").Value.ToString
A will be T or F.