Archive for December, 2008

Just want to deploy a standalone exe from visual basic 2008 express?

Write the project, then build and save the project. The default location of the built exe in XP is:

“My Documents\Visual Studio 2008\Projects\ProjectName\ProjectName\bin\Release\ExeName.exe”

The basic configuration of the autorun.inf states the program to run when the CD is inserted in the drive and the icon to display when the disk is viewed by Windows Explorer or other directory listing software. The text-only file, which resides in the root directory of the CD, should follow this pattern:

[autorun]
open=myprogram.exe
icon=myicon.ico

The icon file should also reside in the root directory of the CD.

Variations

Often the program you want to run will not be located in the root directory of the CD. If that is the case you must include the path:

[autorun]
open=folder1\folder1A\myfile.exe
icon=myicon.ico

Sometimes you may need to pass an argument to the program to be auto played:

[autorun]
open=myprogram.exe /argument
icon=myicon.ico

Not a program

Sending customers, salespeople, investors, and employees presentations, PDF files, and HTML documents requires a slight variation to the basic autorun.inf file and the addition of a DOS batch file to the CD root directory. The autorun.inf file opens a batch file, which then opens the file using the default program designated for that file type. For example:

[autorun]
open=autorun.bat index.htm
icon=myicon.ico

And the autorun.bat file reads:

echo off
@start %1 %2 %3 %4 %5 %6 %7 %8 %9
@exit

There is a variation on this idea that takes advantage of the ShellExecute command:

[autorun]
ShellExecute=index.htm
icon=training.ico 

 

 

Environment

  • BlackBerry® Enterprise Server software versions 4.1 Service Pack 2 (4.1.2) through 4.1 Service Pack 5 (4.1.5)
  • BlackBerry® Mobile Data System (BlackBerry MDS Services)

Details

Proxy servers are used in organizations to access external resources. The Hypertext Transfer Protocol (HTTP) proxies must be configured with BlackBerry MDS Services using BlackBerry Manager. The rules for configuring HTTP proxies are described in this section. Administrators for BlackBerry MDS Services must be familiar with how to configure HTTP proxies.

Blackberry MDS Services settings

BlackBerry MDS Services settings for HTTP proxies include the following:

  • Uniform Resource Locator (URL) regular expression
  • Proxy string
  • Proxy server account (optional)
  • Proxy server password (optional)
  • Proxy priority
  • Description (optional)

 

URL regular expression

The URL regular expression determines which HTTP proxy rule is used when an HTTP request is made. BlackBerry MDS Services matches the HTTP URL to the URL regular expressions in the proxy setting list. Proxy settings are applied using the first rule that matches.  HTTP proxies should be configured such that a more specific rule has a higher priority than a more generic rule. For example, a regular expression such as http://www.rim.com/abc/.* should have a higher priority than a regular expression, such as http://www.rim.com/.*. Use the regular expression definition in Java® for URL expressions. For more information, visit www.java.sun.com and search for the description of the pattern for java.util.regex in the application programming interface (API) documentation for Java® 2 Platform, Standard Edition (J2SE™) 1.5.0.

Proxy Definition

BlackBerry MDS Services supports four types of proxy definitions

  • PROXY (a proxy server definition)
  • DIRECT (no proxy server)
  • AUTO (auto detection from OS)
  • PAC (proxy definition in PAC file)

A proxy string can have one of the following formats:

  • PROXY <proxy server host>:<proxy server port>
  • DIRECT
  • AUTO
  • PAC <PAC file URL>

 

Non-proxy addresses

In some organizations, a proxy server is configured such that a proxy server uses a non-proxy host list. BlackBerry MDS Services requires a proxy setting for the proxy server with each HTTP request and for each non-proxy address where the proxy type is DIRECT. Also, a DIRECT non-proxy setting should have a higher priority than the proxy setting for the proxy server. For example:

Proxy Server: atg07-yyz:8080

non-proxy address: www.yahoo.com>, *.rim.net

The BlackBerry MDS Services proxy settings should be configured as follows:

URL regular expression Proxy String Priority
(?i:http(s)://www.yahoo.com.*) DIRECT 1
(?i:http(s)://.*.rim.net..*) DIRECT 2
(?i:http(s)://.*) PROXY  atg07-yyz:8080 3

BlackBerry MDS Services and other BlackBerry Enterprise Server components

Do not configure a proxy server between BlackBerry MDS Services and other BlackBerry Enterprise Server components. A DIRECT connection between BlackBerry MDS Services and other BlackBerry Enterprise Server components is mandatory. For example, do not configure a proxy server between BlackBerry MDS Services and BlackBerry MDS Connection Service.

Note: A HTTP proxy configuration for the BlackBerry MDS Connection Service should be considered as well.

Procedure

To configure proxy settings for the BlackBerry Mobile Data System (BlackBerry MDS) Connection Service, complete the following steps:

  1. In BlackBerry Manager, select BlackBerry MDS Connection Service.
  2. On the Connection Service tab, click Edit Properties.
  3. Click Proxy.
  4. Double-click Proxy Mappings.
  5. Click New.
  6. In the URL field, type the Uniform Resource Locator (URL) expression that the proxy mapping rule will control.
  7. In the Description field, type a description of the proxy mapping rule.
  8. Double-click Proxy String.
  9. Click New.
  10. In the Proxy Type drop-down list, do any of the following configurations:
    • Click PROXY, then double-click the Proxy String field. Type the proxy server name and port number, or exclude the URL from routing through the proxy server.
    • Click DIRECT, double-click the Proxy String field, and delete the default value.
  11. Click OK.
  12. Click OK again.

Additional Info

To configure a specific URL for an internal site that already has the Catch All proxy URL configuration in place (http://.* <http://.*/> ), place the new URL before the Catch All proxy URL as described in the example below.

Example

BlackBerry device users need to browse internal web sites and can currently only browse external web sites. The current proxy mappings are configured with http://.* or the default long universal string. To configure the proxy mappings, the specific entries should come before the Catch All setting. The Catch All setting will only be evaluated if the web site the BlackBerry device user is browsing does not meet the first criteria in the list.

The resulting list should look like the following:

http://<internal_server_name>.*  

http://.*

where <internal_server_name> is the specific server that will be accessed internally

Refer to RIM’s KB11028 for full details.

A FTP URL syntax is in the form of :

ftp://user:password@host:port/path

so that some or all of the parts user:password@, :password, :port and /path may be excluded. The components obey the following rules:

user

a user name (user id) on the host

password

the password corresponding to the user name; note: if the user and password field in a URL contains character : or @ or /, the character must be encoded

host

the fully qualified domain name of a network host, or its IP address

 

port

the port number to connect to; it omitted, defaults to 21

path

path specification of the form
cwd1
/cwd2//cwdN/name
(
where any occurrence of / or ; within a cwdi or the name must be encoded) optionally followed by
;type=typecode
where typecode is one of the characters
a, i

Effectively, ;type=a means “Ascii mode” (plain text mode) of transfer

whereas ;type=i means image (binary) mode.

If the ;type=typecode part of an FTP URL is omitted, the client program interpreting the URL must guess the appropriate mode to use. In general, the data content type of a file can only be guessed from the name, e.g., from the suffix of the name; the appropriate type code to be used for transfer of the file can then be deduced from the data content of the file.

User id and password

If an FTP URL contains user and password fields, they are used in the FTP USER and PASS commands after making the connection to the FTP server. Otherwise the conventions for “anonymous” FTP are used:

·            the user name anonymous is supplied

·            the Internet e-mail address of the end user is supplied as the password.

However, browsers often fail to conform to these requirements. Generally, they cannot have access to the user’s correct E-mail address. In practice, browsers may send addresses with invented user name parts like mozilla or IE30user. Such “addresses” are syntactically legal in the sense of passing some tests made by an FTP server (such as checking that there is an @ somewhere) but, being fancy nonexistent addresses, fail to serve the purpose for which FTP servers like to get E-mail addresses. (Such purposes may include statistics collection or informing users about errors detected in files which they have fetched.) In some cases, the address passed is a valid address but the address of a proxy or gateway, not the address of the user.

If the URL supplies user but no password and the FTP server requests a password, the program interpreting the FTP URL (usually, a Web browser) should request a password from the user. Typically this takes place in a dialog box in which the password will not be visible as you type it (i.e., no echoing). However, some browsers (e.g., old versions of IE) do not request password from the user; instead, the connection fails.

However, IE 7 (where processing of FTP URLs is rather peculiar in many ways), ignores the user and password parts if present. It initiates a dialogue where the user is prompted for them. Any user:password data seems to trigger this; the data is otherwise discarded but taken as a request to use non-anonymous FTP. This can be treated as added security, since passing passwords in URLs is risky, as URL specifications have always said.

Environment

  • BlackBerry® Enterprise Server software versions 2.2, 3.6, 4.0, and 4.1
  • BlackBerry® Mobile Data Service
  • BlackBerry® Mobile Data System (BlackBerry MDS)

Background

Enabling Hypertext Transfer Protocol (HTTP) logging for the BlackBerry Mobile Data Service or the BlackBerry MDS has the following benefits:

  • Defines HTTP content formatting and related HTTP status codes
  • Helps to troubleshoot the BlackBerry Mobile Data Service or the BlackBerry MDS

Procedure

To enable HTTP logging for the BlackBerry Mobile Data Service, complete the following steps:

For BlackBerry Enterprise Server software version 4.1

  1. In BlackBerry Manager, select the <Server Name>_MDS-CS service.
  2. On the Connection Service tab, click Edit Properties.
  3. On the Logs tab, verify that IPPP logging enabled is set to true, set both the HTTP Logging Enabled and the Verbose HTTP Logging Enabled drop-down lists to True.
  4. Click Apply, and then click OK.

Refer to RIM’s KB02393 for full details on eariler BES versions or for other mail server platforms.