Coder Dan
Thursday, September 20, 2012
How to extract msu/msp/msi/exe files from the command line
http://www.windowswiki.info/2009/02/19/how-to-extract-msumspmsiexe-files-from-the-command-line/
I find these commands quite helpful — maybe you know them already — if not, here you go:
Microsoft Hotfix Installer (.exe)
setup.exe /t:C:\<target_dir>\ /c
Microsoft Update Standalone Package (.msu)
expand -F:* update.msu C:\<target_dir>
cd <target_dir>
expand -F:* update.cab C:\<target_dir>
Microsoft Patch File (.msp)
msix patch.msp /out C:\<target_dir>
msix.zip
Windows Installer Package (.msi)
msiexec /a setup.msi /qb TARGETDIR=C:\<target_dir>
Friday, June 1, 2012
WinDBG: How to load specific version of mscordacwks.dll for debugging crash dumps
http://geekswithblogs.net/rupreet/archive/2012/03/12/148966.aspx
To solve this, we need this specific version of the assembly to continue debugging. The minor version of the framework changes whenever Microsoft releases some patches, hot fixes or service packs. Depending on what patch or hot fix is applied on that machine, the version of the assembly will differ.
One of the easy ways to resolve is to copy the mscordacwks.dll from the machine the dump was taken and copy in the “discoverable” folder (path which is part of .sympath).
But there are times when that machine is not available or don’t have access to it or simply you are not able to get your hands on the specific assembly.
This site(http://www.mskbfiles.com/mscorwks.dll.php) details out each and every hotfix/patch with specific framework version number associated to it so that when we need a specific version, we can download the patch and extract the required assemblies.
Once the update/hotfix is downloaded, we extract the required assemblies using the below commands –
c:\ >expand.exe -f:* C:\Windows6.0-KB983589-x64.msu C:\temp
c:\ >expand.exe -f:* C:\temp\Windows6.0-KB983589-x64.cab C:\temp\cab
In the cab folder, the required assembly would be present.
The other way to extract the files is to use Winzip or some compression tool which lets you extract files from *.cab.
Just rename the assembly in mscordacwks_<arch>_<arch>_<version>.dll format and place it in the discoverable path of the debugger (path which is part of .sympath).
Tuesday, February 21, 2012
Friday, February 10, 2012
Thursday, February 2, 2012
android open contextmenu when click on listview item
package androidTest.app;
import android.app.Activity;
import android.app.ListActivity;
import android.content.res. Configuration;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu. ContextMenuInfo;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView. OnItemLongClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class AndroidTestActivity extends Activity implements
OnItemLongClickListener {
private Activity activity = null;
private ListView _listview;
private String _selectedItem;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate( savedInstanceState);
setContentView(R.layout.main);
activity = this;
_listview = (ListView)findViewById(R.id. lvTagValues);
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_ item_1, PENS);
_listview.setAdapter( arrayAdapter);
this.registerForContextMenu(_ listview);
_listview. setOnItemLongClickListener( this);
_listview. setOnItemClickListener(
new android.widget.AdapterView. OnItemClickListener()
{
public void onItemClick(AdapterView<?> arg0, View view,
int position, long id) {
//Take action here.
_selectedItem = (String) _listview.getItemAtPosition( position);
activity.openContextMenu(_ listview);
System.out.println("...context is called");
}
}
);
}
@Override
public void onConfigurationChanged( Configuration newConfig) {
// TODO Auto-generated method stub
super.onConfigurationChanged( newConfig);
System.out.println("... 11configuration is changed...");
}
static final String[] PENS = new String[]{
"MONT Blanc",
"Gucci",
"Parker",
"Sailor",
"Porsche Design",
"item1",
"item2",
"item3",
"item4",
"item5",
"item6",
"item7",
"item8",
"item9",
"item10",
"item11"
};
@Override
public void onCreateContextMenu( ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
// TODO Auto-generated method stub
System.out.println("...on create context menu...");
super.onCreateContextMenu( menu, v, menuInfo);
menu.setHeaderTitle("Context Menu");
menu.add(0, v.getId(), 0, "Action 1");
menu.add(0, v.getId(), 0, "Action 2");
}
@Override
public boolean onContextItemSelected(MenuItem item) {
if(item.getTitle()=="Action 1"){
function1(item.getItemId());
}
else if(item.getTitle()=="Action 2"){
function2(item.getItemId());
}
else {return false;}
return true;
}
private void function1(int itemID){
System.out.println("...menu 1 is clicked" + Integer.toString(itemID));
}
private void function2(int itemID){
System.out.println("...menu 2 is clicked" + Integer.toString(itemID));
}
public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
System.out.println("...on long click close context menu...");
activity.closeContextMenu();
// TODO Auto-generated method stub
return false;
}
}
import android.app.Activity;
import android.app.ListActivity;
import android.content.res.
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class AndroidTestActivity extends Activity implements
OnItemLongClickListener {
private Activity activity = null;
private ListView _listview;
private String _selectedItem;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(
setContentView(R.layout.main);
activity = this;
_listview = (ListView)findViewById(R.id.
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_
_listview.setAdapter(
this.registerForContextMenu(_
_listview.
_listview.
new android.widget.AdapterView.
{
public void onItemClick(AdapterView<?> arg0, View view,
int position, long id) {
//Take action here.
_selectedItem = (String) _listview.getItemAtPosition(
activity.openContextMenu(_
System.out.println("...context is called");
}
}
);
}
@Override
public void onConfigurationChanged(
// TODO Auto-generated method stub
super.onConfigurationChanged(
System.out.println("...
}
static final String[] PENS = new String[]{
"MONT Blanc",
"Gucci",
"Parker",
"Sailor",
"Porsche Design",
"item1",
"item2",
"item3",
"item4",
"item5",
"item6",
"item7",
"item8",
"item9",
"item10",
"item11"
};
@Override
public void onCreateContextMenu(
ContextMenuInfo menuInfo) {
// TODO Auto-generated method stub
System.out.println("...on create context menu...");
super.onCreateContextMenu(
menu.setHeaderTitle("Context Menu");
menu.add(0, v.getId(), 0, "Action 1");
menu.add(0, v.getId(), 0, "Action 2");
}
@Override
public boolean onContextItemSelected(MenuItem item) {
if(item.getTitle()=="Action 1"){
function1(item.getItemId());
}
else if(item.getTitle()=="Action 2"){
function2(item.getItemId());
}
else {return false;}
return true;
}
private void function1(int itemID){
System.out.println("...menu 1 is clicked" + Integer.toString(itemID));
}
private void function2(int itemID){
System.out.println("...menu 2 is clicked" + Integer.toString(itemID));
}
public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
System.out.println("...on long click close context menu...");
activity.closeContextMenu();
// TODO Auto-generated method stub
return false;
}
}
Friday, December 16, 2011
WPF Performance Suite
Guide
http://msdn.microsoft.com/en-us/library/aa969767(v=VS.90).aspx
Install Path:
Program Files\Microsoft Windows Performance Toolkit\WPF Performance Suite\WpfPerf.exe
http://msdn.microsoft.com/en-us/library/aa969767(v=VS.90).aspx
Install Path:
Program Files\Microsoft Windows Performance Toolkit\WPF Performance Suite\WpfPerf.exe
Monday, December 5, 2011
Root Samsung Exhibit II
http://androidforums.com/exhibit-4g-all-things-root/444258-anyone-root-samsung-exhibit-ii-4g-t679.html
ZergRush zip file attached.Install the phone drivers on your pc, in your phone turn usb debugging on, plug your phone into your pc and let the drivers install.Unzip the zergRush file to a new folder on your desktop,open the folder and click on the .bat file and let it run . To check if you rooted...you should see apps called superuser and terminal emulator in your app draw. You can also download root checker from the market to verify...enjoy.
This WORKS for the Exhibit 4g ll and Exhibit 4g.
ZergRush zip file attached.Install the phone drivers on your pc, in your phone turn usb debugging on, plug your phone into your pc and let the drivers install.Unzip the zergRush file to a new folder on your desktop,open the folder and click on the .bat file and let it run . To check if you rooted...you should see apps called superuser and terminal emulator in your app draw. You can also download root checker from the market to verify...enjoy.
This WORKS for the Exhibit 4g ll and Exhibit 4g.
Subscribe to:
Posts (Atom)