Archive for December, 2009


Microsoft Jet Database Engine

ADO Connection String Samples

This page contains sample ADO connection strings for

Jet Expression Can Execute Unsafe Visual Basic for Applications Functions

SYMPTOMS

Using Jet 3.5x, a user can call unsafe Visual Basic for Applications functions i…

Using Jet 3.5x, a user can call unsafe Visual Basic for Applications functions in query statements from all types of Jet applications, such as ODBC or Access. For example, the following statement would result in all files being deleted from a computer’s current folder:

SELECT Shell(“Cmd /c del *.*”) As c1 From Customers
NOTE: The Shell command in this example works in Microsoft Windows NT. The command would have to be modified as follows to work on a computer running Microsoft Windows 95/98:
SELECT Shell(“Command.com /c del *.*”) As c1 From Customers
The security risk occurs when expressions contain Visual Basic for Application commands that can be harmful to a computer running the query, for example, Shell commands to delete files or format the computer.

The Microsoft Jet 4.0 database engine permits you to call unsafe Microsoft Visual Basic for Applications functions through the Microsoft Jet Expression Service. The Jet Expression Service is used to evaluate expressions in forms, in reports, and in queries.

For example, the following SQL statement may cause all files to be deleted from the current folder on your computer:

SELECT Shell("Cmd /c del *.*") As c1 From Customers

Note The Shell command in this example works in Microsoft Windows NT. You must modify the command as follows for the command to work on a computer that is running Microsoft Windows 95 or Microsoft Windows 98:

SELECT Shell("Command.com /c del *.*") As c1 From Customers

The security risk occurs when expressions contain Visual Basic for Applications commands that can do damage to the computer that is running the query, such as Shell commands to delete files or to format the computer.

The evaluation of expressions is a behavior that is desirable in many circumstances. However, if part of the expression contains a Shell command, the Shell command is parsed and then executed on the computer.

You can use Sandbox mode to block such operations. However, the default for Jet 4.0 Sandbox mode is not to enable Sandbox mode for queries that are run in Microsoft Access. Sandbox mode is enabled for all other non-Access applications, such as Open Database Connectivity (ODBC).

Keyboard Tips – Keyboard Shortcuts

Original Address: http://www.onecomputerguy.com/keyboard.htm

Internet Explorer Keyboard Shortcuts

Added 7/26/02

Viewing and exploring Web pages

F1 Display the Internet Explorer Help, or when in a dialog box, display context help on an item
F11 Toggle between Full Screen and regular view of the browser window
TAB Move forward through the items on a Web page, the Address bar, and the Links bar
SHIFT+TAB Move back through the items on a Web page, the Address bar, and the Links bar
ALT+HOME Go to your Home page
ALT+RIGHT ARROW Go to the next page
ALT+LEFT ARROW or
BACKSPACE
Go to the previous page
SHIFT+F10 Display a shortcut menu for a link
CTRL+TAB or
F6
Move forward between frames
SHIFT+CTRL+TAB Move back between frames
UP ARROW Scroll toward the beginning of a document
DOWN ARROW Scroll toward the end of a document
PAGE UP Scroll toward the beginning of a document in larger increments
PAGE DOWN Scroll toward the end of a document in larger increments
HOME Move to the beginning of a document
END Move to the end of a document
CTRL+F Find on this page
F5 or
CTRL+R
Refresh the current Web page only if the time stamp for the Web version and your locally stored version are different
CTRL+F5 Refresh the current Web page, even if the time stamp for the Web version and your locally stored version are the same
ESC Stop downloading a page
CTRL+O or
CTRL+L
Go to a new location
CTRL+N Open a new window
CTRL+W Close the current window
CTRL+S Save the current page
CTRL+P Print the current page or active frame
ENTER Activate a selected link
CTRL+E Open Search in Explorer bar
CTRL+I Open Favorites in Explorer bar
CTRL+H Open History in Explorer bar
CTRL+click In History or Favorites bars, open multiple folders

How to use Rundll32.exe in Windows

Although they are not directly executable as programs, the many DLL files present in Windows contain libraries of functions that are used throughout the operating system and in application software. Generally, these functions are used internally by programs and are not directly visible to the computer user. However, Windows XP contains a file rundll32.exe that allows command line access to certain functions that are explicitly written to be available to this executable file. In this article we discuss how to use some of these.


Syntax for using Rundll32.exe

The syntax for using Rundll32.exe must be followed precisely and is as follows:

RUNDLL32.EXE ,

The DLL name may not contain any spaces, commas or quotation marks. If the DLL name does contain spaces, use the short (8.3) version of the file name. Note that there must be a comma between the DLL name and the entry point. Also, the name of the entry point function is case-sensitive, and there can’t be any spaces between the DLL name, the comma, and the entry point function name. If the DLL file is not in a folder contained in the system path environment, then the full path must be used for the DLL name. See the Microsoft Knowledge Base for more details.

There are a number of commands employing Rundll32.exe that can be entered into Start-Run, a command window, or used in scripts. A common use is to open various Control Panel applets. (Another method specific to Control Panel is discussed here.) For example, to open the Control Panel applet for configuring the display properties enter

RUNDLL32.EXE SHELL32.DLL,Control_RunDLL desk.cpl,,0

Different tabs for the Desktop applet can be opened by changing the number at the end that is part of the argument. All of the Control Panel applets and their tabs can be opened this way by using the relevant CPL file and the appropriate tab number as arguments. The operating system also uses this method to display Control Panel. In fact, Control Panel applications are the most commonly mentioned examples in discussions of using Rundll32.exe. Examples of some different applications are discussed below.

Applications accessible by using Rundll32.exe

Rundll32.exe is used internally by Windows for a variety of DLL functions not exposed to the PC user but there are a number of DLLs that contain entry points available for external use. The most useful of these DLLs is shell32.dll. As illustrated above, this is the DLL that can be used to open various Control Panel applets.

Here are some lists of available commands (Note: some of the listed commands are for Win98 and do not work in WinXP.)

The last site listed above has a discussion of the many options for command line printer control using Rundll32.exe and printui.dll. The discussion is for Windows 2000 Professional but seems to work the same on my Windows XP Professional system. (I do not know if it applies to XP Home.) If you open a command window and enter the line below an extensive list of options will be shown. There are a variety of possible uses.

RUNDLL32 PRINTUI.DLL,PrintUIEntry /?

Another example is a command that allows you to switch the mouse-buttons for left-hand use. Unfortunately, once the switch is made it seems that it can only be undone by the old-fashioned method of going to Control Panel. In other words, it doesn’t act as a toggle but seems to be one way. The command is

RUNDLL32.EXE USER32.DLL,SwapMouseButton

If you need to switch the button settings back and forth, the command given below will take you to the mouse settings dialog

RUNDLL32.EXE SHELL32.dll,Control_RunDLL main.cpl @0,0

A further example is a command that brings up the “Open with..” dialog box for a particular file myfile.ext given as an argument. The full path for myfile.ext must be used unless its folder is in the path environment.

RUNDLL32.EXE SHELL32.DLL,OpenAs_RunDLL

An Internet Explorer application that will clear out the branding that some ISPs like AOL stick into the IE title bar is

RUNDLL32.EXE IEdkcs32.dll,Clear

The Safely Remove Hardware icon that is displayed in the notification area (also called the System Tray) when USB devices are attached can sometimes fail to appear. The utility can be opened by a command

RUNDLL32.EXE SHELL32.DLL,Control_RunDLL HotPlug.dll

The foregoing examples are a only a few of those listed in the references given above. Depending on their pattern of usage and level of computer expertise, PC users may find a variety of others that they are of interest.

Making shortcuts using Rundll32.exe

Many of the commands using Rundll32.exe are more likely to be found in scripts rather than in shortcuts for everyday use. However, creating a shortcut using one of the commands is very easy. Right-click in an empty spot in the folder where you want the shortcut to be located and choose New-Shortcut from the context menu. Enter the desired command in the line “Type the location of the item.” Click “Next,” choose a name, and click “Finish.”

A shortcut that I personally like opens the dialog box for editing the Favorites in Internet Explorer. The command is

RUNDLL32.EXE shdocvw.dll,DoOrganizeFavDlg

In Windows 98/Me two of the most commonly used shortcuts using Rundll32.exe allowed for a quick computer shutdown or for an easy reboot. These do not work in Windows XP. A different method is available using the file shutdown.exe. However, to put your computer into hibernation mode (assuming your power management supports this) the command for a shortcut is

RUNDLL32.EXE PowrProf.dll,SetSuspendState

Error messages involving Rundll32.Exe

Since Rundll32.exe is involved with many processes in Windows, it isn’t uncommon that error messages crop up that include references to it. That does not mean that Rundll32.exe is itself the actual culprit. More often than not the problem lies elsewhere, such as the DLL file that is being called. Persistent error messages may also indicate infection by a virus or a spyware or Trojan problem. Regular scans with an anti-virus and spyware removal software with updated definitions should be made. There are too many possible reasons for error messages to be discussed here but H. Leboeuf has a Web page with a large catalog of articles from the Microsoft Knowledge Base that are about Rundll32.exe error messages.

Determining which modules are being executed by Rundll.32.exe

The Windows XP tool Tasklist can be used to determine what program modules are currently being executed by rundll32.exe. (For discussion of Tasklist, go to this page.) To create a list of running tasks, open a Command Prompt window and enter the following command:

tasklist /m /fi "IMAGENAME eq rundll32.exe" >C:rundll32.txt

This will create a text file rundll32.txt on the C: drive that lists the running modules. If you prefer a different location for the text file, modify the command accordingly. Also, to simply view the running tasks in the command window, omit the part of the command that does file redirection,

how to run cmd.exe as administrator? – Scripting Elevation on Vista

[Added 2007-07-02, 16:41 Eastern Time:

Windows Control Panel Commandlines

Copy from:http://techsupt.winbatch.com/ts/T000001043001F3.html

Control Panel Commandlines

Keywords: 	  rundll control panel applets

For the actual WinBatch commands see the article Running Control Panel Applets

Debugging Tools and Symbols: Getting Started

Debugging Tools and Symbols: Getting Started

Debugging Tools for Windows is a set of extensible tools for debugging device drivers for the Microsoft Windows family of operating systems. Debugging Tools for Windows supports debugging of:

Applications, services, drivers, and the Windows kernel.

Native 32-bit x86, native Intel Itanium, and native x64 platforms.

Microsoft Windows NT 4.0, Windows 2000, Windows XP, Microsoft Windows Server 2003, Windows Vista and Windows Server 2008.

User-mode programs and kernel-mode programs.

Live targets and dump files.

Local and remote targets.

In addition to Debugging Tools for Windows, effective debugging also requires:

Special debugging routines, macros, and global variables in the Windows Driver Development Kit (DDK). You can use these routines in your driver code to send messages to a debugger and set breakpoints to aid in debugging.

Access to Windows symbol files. If you have access to the Internet while debugging, you can set your debugger’s symbol path to point to the Windows symbol server. If you do not have access to the Internet while debugging, you can download symbols in advance from the Microsoft website.

Debugging Tools for Windows includes WinDbg, a powerful debugger with a graphical interface and a console interface, as well as the console-based debuggers NTSD, CDB, and KD.

About WinDbg
WinDbg provides source-level debugging through a graphical user interface and a text-based interface.

WinDbg uses the Microsoft Visual Studio debug symbol formats for source-level debugging. It can access any public function’s names and variables exposed by modules that were compiled with Codeview (.pdb) symbol files.

WinDbg can view source code, set breakpoints, view variables (including C++ objects), stack traces, and memory. It includes a command window to issue a wide variety of commands not available through the drop-down menus. For kernel-mode debugging, WinDbg typically requires two computers (the host machine and the target machine). It also allows you to remotely debug user-mode code.

To Prepare for a Debugging Session

1.

If you want to debug kernel-mode code, set up a host computer to run the debugger and a target computer to run the code being debugged. Connect the two computers using either an IEEE 1394 cable or a null-modem cable between two serial ports.

2.

Download and install the latest version of Debugging Tools for Windows on the host computer. The tools can also be installed from the Windows DDK, the Platform SDK, or the Customer Support Diagnostics CD.

3.

Use Windows Symbol Server to access the symbol files from the host computer.

About the Microsoft Symbol Server

Symbol server technology is built into Debugging Tools for Windows. Microsoft provides access to an Internet symbol server that contains symbol files for the Microsoft Windows Server 2003, Windows XP, and Windows 2000 operating systems, as well as other Microsoft products.

The Internet symbol server is populated with a variety of Windows symbols for Microsoft Windows operating systems, including hot fixes, Service Packs, Security Rollup Packages, and retail releases. Symbols are also available on the server for current Betas and Release Candidates for Windows products, plus a variety of other Microsoft products, such as Microsoft Internet Explorer.

If you have access to the Internet during debugging, you can configure the debugger to download symbols as needed during a debugging session, rather than downloading symbol files separately before a debugging session. The symbols are downloaded to a directory location that you specify and then the debugger loads them from there.

To use the Microsoft Symbol Server

1.

Make sure you have installed the latest version of Debugging Tools for Windows.

2.

Start a debugging session.

3.

Decide where to store the downloaded symbols (the “downstream store”). This can be a local drive or a UNC path.

4.

Set the debugger symbol path as follows, substituting your downstream store path for DownstreamStore.

SRV*DownstreamStore*http://msdl.microsoft.com/download/symbols

For example, to download symbols to c:websymbols, you would add the following to your symbol path:
SRV*c:websymbols*http://msdl.microsoft.com/download/symbols

Note: http://msdl.microsoft.com/download/symbols is not browsable and is intended only for access by the debugger. For more information on setting symbol paths and using symbol servers, see the documentation accompanying Debugging Tools for Windows.

Debugger and Symbols Downloads

符号Symbol/PDB文件——Windows 应用程序调试必备

Powered by WordPress | Theme: Motion by 85ideas.