Special Thanks to a colleague who provided this. The following are commands that you can use in the command prompt in Windows:
Accessibility Controls = access.cpl
Accessibility Wizard = accwiz
Add Hardware Wizard = hdwwiz.cpl
Add/Remove Programs = appwiz.cpl
Administrative Tools = control admintools
Adobe Acrobat ( if installed ) = acrobat
Adobe Distiller ( if installed ) = acrodist
Adobe ImageReady ( if installed ) = imageready
Adobe Photoshop ( if installed ) = photoshop
Automatic Updates = wuaucpl.cpl
Basic Media Player = mplay32
Bluetooth Transfer Wizard = fsquirt
Calculator = calc
Ccleaner ( if installed ) = ccleaner
C: Drive = c:
Certificate Manager = cdrtmgr.msc
Character Map = charmap
Check Disk Utility = chkdsk
Clipboard Viewer = clipbrd
Command Prompt = cmd
Command Prompt = command
Component Services = dcomcnfg
Computer Management = compmgmt.msc
Compare Files = comp
Control Panel = control
Create a shared folder Wizard = shrpubw
Date and Time Properties = timedate.cpl
DDE Shares = ddeshare
Device Manager = devmgmt.msc
Direct X Control Panel ( if installed ) = directx.cpl
Direct X Troubleshooter = dxdiag
Disk Cleanup Utility = cleanmgr
Disk Defragment = dfrg.msc
Disk Partition Manager = diskmgmt.msc
Display Properties = control desktop
Display Properties = desk.cpl
Display Properties (w/Appearance Tab Preselected ) = control color
Dr. Watson System Troubleshooting Utility = drwtsn32
Driver Verifier Utility = verifier
Ethereal ( if installed ) = ethereal
Event Viewer = eventvwr.msc
Files and Settings Transfer Tool = migwiz
File Signature Verification Tool = sigverif
Findfast = findfast.cpl
Firefox = firefox
Folders Properties = control folders
Fonts = fonts
Fonts Folder = fonts
Free Cell Card Game = freecell
Game Controllers = joy.cpl
Group Policy Editor ( xp pro ) = gpedit.msc
Hearts Card Game = mshearts
Help and Support = helpctr
Hyperterminal = hypertrm
Hotline Client = hotlineclient
Iexpress Wizard = iexpress
Indexing Service = ciadv.msc
Internet Connection Wizard = icwonn1
Internet Properties = inetcpl.cpl
Internet Setup Wizard = inetwiz
IP Configuration (Display Connection Configuration) = ipconfig /all
IP Configuration (Display DNS Cache Contents) = ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) = ipconfig /flushdns
IP Configuration (Release All Connections) = ipconfig /release
IP Configuration (Renew All Connections) = ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS) = ipconfig /registerdns
IP Configuration (Display DHCP Class ID) = ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) = ipconfig /setclassid
Java Control Panel ( if installed ) = jpicpl32.cpl
Java Control Panel ( if installed ) = javaws
Keyboard Properties = control keyboard
Local Security Settings = secpol.msc
Local Users and Groups = lusrmgr.msc
Logs You Out of Windows = logoff
Malicious Software Removal Tool = mrt
Microsoft Access ( if installed ) = access.cpl
Microsoft Chat = winchat
Microsoft Excel ( if installed ) = excel
Microsoft Diskpart = diskpart
Microsoft Frontpage ( if installed ) = frontpg
Microsoft Movie Maker = moviemk
Microsoft Management Console = mmc
Microsoft Narrator = narrator
Microsoft Paint = mspaint
Microsoft Powerpoint = powerpnt
Microsoft Word ( if installed ) = winword
Microsoft Syncronization Tool = mobsync
Minesweeper Game = winmine
Mouse Properties = control mouse
Mouse Properties = main.cpl
MS-Dos Editor = edit
MS-Dos FTP = ftp
Nero ( if installed ) = nero
Netmeeting = conf
Network Connections = control netconnections
Network Connections = ncpa.cpl
Network Setup Wizard = netsetup.cpl
Notepad = notepad
Nview Desktop Manager ( if installed ) = nvtuicpl.cpl
Object Packager = packager
ODBC Data Source Administrator = odbccp32
ODBC Data Source Administrator = odbccp32.cpl
On Screen Keyboard = osk
Opens AC3 Filter ( if installed ) = ac3filter.cpl
Outlook Express = msimn
Paint = pbrush
Password Properties = password.cpl
Performance Monitor = perfmon.msc
Performance Monitor = perfmon
Phone and Modem Options = telephon.cpl
Phone Dialer = dialer
Pinball Game = pinball
Power Configuration = powercfg.cpl
Printers and Faxes = control printers
Printers Folder = printers
Private Characters Editor = eudcedit
Quicktime ( if installed ) = quicktime.cpl
Quicktime Player ( if installed ) = quicktimeplayer
Real Player ( if installed ) = realplay
Regional Settings = intl.cpl
Registry Editor = regedit
Registry Editor = regedit32
Remote Access Phonebook = rasphone
Remote Desktop = mstsc
Removable Storage = ntmsmgr.msc
Removable Storage Operator Requests = ntmsoprq.msc
Resultant Set of Policy ( xp pro ) = rsop.msc
Scanners and Cameras = sticpl.cpl
Scheduled Tasks = control schedtasks
Security Center = wscui.cpl
Services = services.msc
Shared Folders = fsmgmt.msc
Sharing Session = rtcshare
Shuts Down Windows = shutdown
Sounds Recorder = sndrec32
Sounds and Audio = mmsys.cpl
Spider Solitare Card Game = spider
SQL Client Configuration = clicongf
System Configuration Editor = sysedit
System Configuration Utility = msconfig
System File Checker Utility ( Scan Immediately ) = sfc /scannow
System File Checker Utility ( Scan Once At Next Boot ) = sfc /scanonce
System File Checker Utility ( Scan On Every Boot ) = sfc /scanboot
System File Checker Utility ( Return to Default Settings) = sfc /revert
System File Checker Utility ( Purge File Cache ) = sfc /purgecache
System File Checker Utility ( Set Cache Size to Size x ) = sfc /cachesize=x
System Information = msinfo32
System Properties = sysdm.cpl
Task Manager = taskmgr
TCP Tester = tcptest
Telnet Client = telnet
Tweak UI ( if installed ) = tweakui
User Account Management = nusrmgr.cpl
Utility Manager = utilman
Volume Serial Number for C: = label
Volume Control = sndvol32
Windows Address Book = wab
Windows Address Book Import Utility = wabmig
Windows Backup Utility ( if installed ) = ntbackup
Windows Explorer = explorer
Windows Firewall = firewall.cpl
Windows Installer Details = msiexec
Windows Magnifier = magnify
Windows Management Infrastructure = wmimgmt.msc
Windows Media Player = wmplayer
Windows Messenger = msnsgs
Windows Picture Import Wizard (Need camera connected) = wiaacmgr
Windows System Security Tool = syskey
Windows Script host settings = wscript
Widnows Update Launches = wupdmgr
Windows Version ( shows your windows version ) = winver
Windows XP Tour Wizard = tourstart
Wordpad = write
Zoom Utility = igfxzoom
Friday, May 25, 2012
Friday, February 17, 2012
A Step by Step method to place the .Net application in the system tray
This is a snippet. The original article is found here. Another solution is found here.
Add an event handler for the NotifyIcon.DoubleClick event and code it as follows so that the application will be restored when the icon is double-clicked.
Additional notes from the comments in the article:
-->
And if you do not want show the icon when the application run but show it when it be hidden, you can set the
notifyicon.visible = false.
and when the form Minimized
set notifyicon.visble = true
and when in the double click event handler, set the visible to false again.
-->
to capture the X button, use the _FormClosing event.
private void _FormClosing(object sender, FormClosingEventArgs args)
Make sure you check the reason matches the user hitting the X:
if (args.CloseReason == CloseReason.UserClosing)
-->
The default setting for this check box is cleared, allowing multiple instances of the application to be run. You can do this by following the steps below:
- To get started, open an existing C# Windows form (or create a new one).
- Open the Visual Studio Toolbox.
- Drag a NotifyIcon control onto the form. The control will named notifyIcon1 by default and placed below the form because it has no visual representation on the form itself.
- Set the NotifyIcon control's Text property to the name you want to appear when the user pauses the mouse over the application's icon. For example, this value could be "KillerApp 1.0".
- Set the control's Icon property to the icon that you want to appear in the System Tray.
- Add an event handler for the form's Resize event that will hide the application when it's minimized. That way, it won't appear on the task bar.
private void Form1_Resize(object sender, System.EventArgs e)
{
if (FormWindowState.Minimized == WindowState)
Hide();
}
Add an event handler for the NotifyIcon.DoubleClick event and code it as follows so that the application will be restored when the icon is double-clicked.
private void notifyIcon1_DoubleClick(object sender,
System.EventArgs e)
{
Show();
WindowState = FormWindowState.Normal;
}
Adding a Context Menu- From the Visual Studio Toolbox, drag a ContextMenu control onto the form.
- Right-click the ContextMenu control and select the Edit Menu.option.
- Type in the options that you want to appear in your context menu. For example, you can add options such as Restore and Close Application. As with any menu, double-click the menu item to create and code each item's handler. As an example, you could copy the code from the form's DoubleClick handler into the context menu's Restore handler and for the Close Application menu item; simply call the form's Close method.
- Finally, set the NotifyIcon control's ContextMenu property to the new context menu you just created by selecting the menu from the drop-down list. Figure 2 shows a simple Tray context menu.
Additional notes from the comments in the article:
-->
And if you do not want show the icon when the application run but show it when it be hidden, you can set the
notifyicon.visible = false.
and when the form Minimized
set notifyicon.visble = true
and when in the double click event handler, set the visible to false again.
-->
to capture the X button, use the _FormClosing event.
private void _FormClosing(object sender, FormClosingEventArgs args)
Make sure you check the reason matches the user hitting the X:
if (args.CloseReason == CloseReason.UserClosing)
-->
The default setting for this check box is cleared, allowing multiple instances of the application to be run. You can do this by following the steps below:
- Right-Click on MyProject inside SolutionExplorer --> Open
- Select Application tab
- Set the Make single instance application checkbox Checked/Unchecked as per the requirement.
Tuesday, January 3, 2012
SSH Reference
Good Reference on ssh and ssh2:
http://burnz.wordpress.com/2007/12/14/ssh-convert-openssh-to-ssh2-and-vise-versa/
http://burnz.wordpress.com/2007/12/14/ssh-convert-openssh-to-ssh2-and-vise-versa/
Monday, December 5, 2011
Embedding pre filtered table in Google Site
If you have a Google spreadsheet with lots of data and you want to embed different results in different pages with a Google site, this is how you do it.
First create a Google sheet and share it with the following option (Anyone with link):
Next populate your Worksheet (for example):
Highlight all the data and Insert a Named Range and give it a name. In this example, I called it SampData.
Insert a new sheet and put in the first cell your query. In my case, I place the following:
One key thing to note that for the where clause, you need to use the cell column in this case is B instead of the field name.
Next insert a Gadget to the worksheet call table Gadget.
You will then be prompted for the range, specify the range in the worksheet that has the query results. In my case, it is Sheet7!A:E.
You can create as many worksheets with different results as you want.
Next go to you Google site, create the page and add the table gadget there. The easiest way, is to click insert Gadget and then add by url and paste the following:
http://www.google.com/ig/modules/table.xml
The gadget will require the data, the data is available by clicking on the gadget in the worksheet and select Get Query Data source url. Copy and paste the data source url to the gadget in the google site:
You can use the same gadget in the worksheet and change the range (using different sheets) to get different filtered results to display on your Google site.
First create a Google sheet and share it with the following option (Anyone with link):
Next populate your Worksheet (for example):
Highlight all the data and Insert a Named Range and give it a name. In this example, I called it SampData.
Insert a new sheet and put in the first cell your query. In my case, I place the following:
=Query(SampData, "select * where B='Rent'")
One key thing to note that for the where clause, you need to use the cell column in this case is B instead of the field name.
Next insert a Gadget to the worksheet call table Gadget.
You will then be prompted for the range, specify the range in the worksheet that has the query results. In my case, it is Sheet7!A:E.
You can create as many worksheets with different results as you want.
Next go to you Google site, create the page and add the table gadget there. The easiest way, is to click insert Gadget and then add by url and paste the following:
http://www.google.com/ig/modules/table.xml
The gadget will require the data, the data is available by clicking on the gadget in the worksheet and select Get Query Data source url. Copy and paste the data source url to the gadget in the google site:
You can use the same gadget in the worksheet and change the range (using different sheets) to get different filtered results to display on your Google site.
Thursday, December 1, 2011
Performing Word Search
I finally found something I can't do with Google Search. It is trying to solve look for words of a specific length, either start with end with etc. Basically a word search. We normally do that when we want to solve a puzzle but in this particular case, it was a homework assignment for my daughter.
Luckily there are a few sites that provide solutions.
http://www.morewords.com/ To find a 5 character word which starts with a, you just search a----
http://www.onelook.com/ To find a 5 character word which starts with a, you just search a????. However, with this site, you may need to click on common words and phases otherwise it will include a lot of other results which may contain -, ' etc.
Luckily there are a few sites that provide solutions.
http://www.morewords.com/ To find a 5 character word which starts with a, you just search a----
http://www.onelook.com/ To find a 5 character word which starts with a, you just search a????. However, with this site, you may need to click on common words and phases otherwise it will include a lot of other results which may contain -, ' etc.
Friday, November 25, 2011
What influences Oracle SysDate
Sysdate, per Oracle documentation will do the following:
“SYSDATE returns the current date and time set for the operating system on which the database server resides. The data type of the returned value is DATE, and the format returned depends on the value of the NLS_DATE_FORMAT initialization parameter. The function requires no arguments. In distributed SQL statements, this function returns the date and time set for the operating system of your local database.”
By default if nothing is set, sysdate will return the date/time based on the setting of the OS it is running on. However, it is possible to set the TZ variable to change it. On the Unix site, it is a matter of creating an environment setting as follow (which will set the listener to use GMT - your OS could be using a different timezone):
"export TZ=GMT;$ORACLE_HOME/bin/ lsnrctl start $LISTENER"
When the above setting is set, all connections that logs into the database using the listener will use GMT timezone.
This means that if I will use the GMT timezone if I connect using the following command.
sqlplus scott/tiger@orcl
However, if I were to connect to the Unix box and then connect without the @ (meaning without going through the listener, I will use the timezone from the O/S. As in connecting via:
sqlplus scott/tiger
Further description can be found in the Metalink FAQ - 227334.1
Additional note:
- The timezone is set at the time when the listener is started. So if you change the timezone after that, it will not be reset unless you restart the listener.
- The same applies for the database, it will follow the timezone when you start the database.
- It is possible to set different timezone for different listener running on different ports.
Reference:
David Marcos' Blog
Thursday, September 15, 2011
Create Gantt chart using Google Apps
The step by step process is described in the following url.
Key information are as follow:
In particular, for the Google Gantt chart tool to work correctly, you should include columns with the following data.
Unique ID (optional) – This column will contain a unique number assigned to each row of the table (1, 2, 3, 4, … for example). You only really need to include this column if certain tasks in your list are dependent on the completion of other tasks and you want this information reflected in your Gantt chart. If not, you don’t have to worry about this column.
Name – In this column, include the name or a brief description of each task.
Start – Enter the proposed start date for the task in this column.
Finish – This column should contain the proposed or actual completion date of the task.
Percent Complete – The number in this column should indicate what percentage of the task has been completed. Tip: Leave off the percent sign in order for the Gantt chart tool to read this field properly.
Prerequisites (optional) – Like the Unique ID field, this column is only needed if certain tasks are dependent on others. If they are, input the Unique ID of any prerequisite task here.
Note that you can give these columns any title you wish and that you can include additional columns with other project data – just make sure that the above information is included somewhere in the table.
Key information are as follow:
In particular, for the Google Gantt chart tool to work correctly, you should include columns with the following data.
Unique ID (optional) – This column will contain a unique number assigned to each row of the table (1, 2, 3, 4, … for example). You only really need to include this column if certain tasks in your list are dependent on the completion of other tasks and you want this information reflected in your Gantt chart. If not, you don’t have to worry about this column.
Name – In this column, include the name or a brief description of each task.
Start – Enter the proposed start date for the task in this column.
Finish – This column should contain the proposed or actual completion date of the task.
Percent Complete – The number in this column should indicate what percentage of the task has been completed. Tip: Leave off the percent sign in order for the Gantt chart tool to read this field properly.
Prerequisites (optional) – Like the Unique ID field, this column is only needed if certain tasks are dependent on others. If they are, input the Unique ID of any prerequisite task here.
Note that you can give these columns any title you wish and that you can include additional columns with other project data – just make sure that the above information is included somewhere in the table.
Wednesday, September 14, 2011
Multi Threading Java Script
I just found out that it is possible to do multithreading with Javascript. This is only possible with the HTML 5 WebWorker. The article on this is found here.
Unfortunately, this feature is only selected in several browsers, namely, IE 10, Firefox (since 3.6), Safari (since 4.0), Chrome & Opera 11.
Some snippets below:
The following is from the article. Read the article for the full explanation and detail:
You’ll then start the worker (and thus a thread under Windows) by sending it a first message:

The worker will live until you kill it. Beware of that. As they are not automatically garbage collected, it’s up to you to control their states. Moreover, keep in mind that instantiating a worker will have some memory cost and don’t negligate the cold start time neither. To stop a worker, there are 2 possible solutions:
1 – from the main calling page by calling the terminate() command.
2 – from the worker itself via the close() command.
DEMO: You can test this slightly enhanced sample in your browser here ->
http://david.blob.core.windows.net/html5/HelloWebWorkers_EN.htm <-
But the only way to send some structurated messages to a worker is to use the JSON format. Hopefully, browsers that currently support Web Workers are nice enough to also natively support JSON. How kind they are!
Let’s then take our previous code sample. We’re going to add an object of type WorkerMessage. This type will be used to send some commands with parameters to our Web Workers.
Let’s use now the following simplified HelloWebWorkersJSON_EN.htm web page:
Unfortunately, this feature is only selected in several browsers, namely, IE 10, Firefox (since 3.6), Safari (since 4.0), Chrome & Opera 11.
Some snippets below:
/* Checking if Web Workers are supported by the browser */
if (window.Worker) {
// Code using the Web Workers
}
The sample test page is found here.
The following is from the article. Read the article for the full explanation and detail:
You’ll then start the worker (and thus a thread under Windows) by sending it a first message:
myHelloWorker.postMessage();Indeed, the Web Workers and the main page are communicating via messages. Those messages can be formed with normal strings or JSON objects. To illustrate simple messages posting, we're going to start by reviewing a very basic sample. It will post a string to a worker that will simply concatenate it with something else. To do that, add the following code into the “helloworker.js” file:
function messageHandler(event) {
// Accessing to the message data sent by the main page
var messageSent = event.data;
// Preparing the message that we will send back
var messageReturned = "Hello " + messageSent + " from a separate thread!";
// Posting back the message to the main page
this.postMessage(messageReturned);
}
// Defining the callback function raised when the main page will call us
this.addEventListener('message', messageHandler, false);
We’ve just defined inside “helloworkers.js” a piece of code that will be executed on another thread. It can receive messages from your main page, do some tasks on it and send a message back to your page in return. We then need to write the receiver in the main page. Here is the page that will handle that:
<!DOCTYPE html>
<html>
<head>
<title>Hello Web Workers<title>
</head>
<body>
<div id="output">div>
<script type="text/javascript">
// Instantiating the Worker
var myHelloWorker = new Worker('helloworkers.js');
// Getting ready to handle the message sent back
// by the worker
myHelloWorker.addEventListener("message", function (event) {
document.getElementById("output").textContent = event.data;
}, false);
// Starting the worker by sending a first message
myHelloWorker.postMessage("David");
// Stopping the worker via the terminate() command
myHelloWorker.terminate();
</script>
</body>
</html>
The result will the be: “Hello David from a separate thread!”. You’re now impressed, aren’t you? The worker will live until you kill it. Beware of that. As they are not automatically garbage collected, it’s up to you to control their states. Moreover, keep in mind that instantiating a worker will have some memory cost and don’t negligate the cold start time neither. To stop a worker, there are 2 possible solutions:
1 – from the main calling page by calling the terminate() command.
2 – from the worker itself via the close() command.
DEMO: You can test this slightly enhanced sample in your browser here ->
http://david.blob.core.windows.net/html5/HelloWebWorkers_EN.htm <-
Posting messages using JSON
Of course, most of the time we will send some more structurated data to the workers. By the way, Web Workers can also communicate between each others using Message channels.But the only way to send some structurated messages to a worker is to use the JSON format. Hopefully, browsers that currently support Web Workers are nice enough to also natively support JSON. How kind they are!
Let’s then take our previous code sample. We’re going to add an object of type WorkerMessage. This type will be used to send some commands with parameters to our Web Workers.
Let’s use now the following simplified HelloWebWorkersJSON_EN.htm web page:
Hello Web Workers JSON
We’re using here the Unobtrusive JavaScript approach which helps us dissociating the view from the attached logic. The attached logic is then living inside this HelloWebWorkersJSON_EN.js file:// HelloWebWorkersJSON_EN.js associated to HelloWebWorkersJSON_EN.htm
// Our WorkerMessage object will be automatically
// serialized and de-serialized by the native JSON parser
function WorkerMessage(cmd, parameter) {
this.cmd = cmd;
this.parameter = parameter;
}
// Output div where the messages sent back by the worker will be displayed
var _output = document.getElementById("output");
/* Checking if Web Workers are supported by the browser */
if (window.Worker) {
// Getting references to the 3 other HTML elements
var _btnSubmit = document.getElementById("btnSubmit");
var _inputForWorker = document.getElementById("inputForWorker");
var _killWorker = document.getElementById("killWorker");
// Instantiating the Worker
var myHelloWorker = new Worker('helloworkersJSON_EN.js');
// Getting ready to handle the message sent back
// by the worker
myHelloWorker.addEventListener("message", function (event) {
_output.textContent = event.data;
}, false);
// Starting the worker by sending it the 'init' command
myHelloWorker.postMessage(new WorkerMessage('init', null));
// Adding the OnClick event to the Submit button
// which will send some messages to the worker
_btnSubmit.addEventListener("click", function (event) {
// We're now sending messages via the 'hello' command
myHelloWorker.postMessage(new WorkerMessage('hello', _inputForWorker.value));
}, false);
// Adding the OnClick event to the Kill button
// which will stop the worker. It won't be usable anymore after that.
_killWorker.addEventListener("click", function (event) {
// Stopping the worker via the terminate() command
myHelloWorker.terminate();
_output.textContent = "The worker has been stopped.";
}, false);
}
else {
_output.innerHTML = "Web Workers are not supported by your browser. Try with IE10: download the latest IE10 Platform Preview";
}
At last, here is the code for the web worker contained in helloworkerJSON_EN.js the file:
function messageHandler(event) {
// Accessing to the message data sent by the main page
var messageSent = event.data;
// Testing the command sent by the main page
switch (messageSent.cmd) {
case 'init':
// You can initialize here some of your models/objects
// that will be used later on in the worker (but pay attention to the scope!)
break;
case 'hello':
// Preparing the message that we will send back
var messageReturned = "Hello " + messageSent.parameter + " from a separate thread!";
// Posting back the message to the main page
this.postMessage(messageReturned);
break;
}
}
// Defining the callback function raised when the main page will call us
this.addEventListener('message', messageHandler, false);
Once again, this sample is very basic. Still, it should help you to understand the underlying logic. For instance, nothing prevents you to use the same approach to send to a worker some gaming elements that will be handled by an AI or physics engine.
Subscribe to:
Posts (Atom)