Thursday, January 29, 2009

Remote Desktop Checklist

Check or inspect:
  1. Right-click My Computer, click Properties, and then click the Remote tab. Turn on Remote Desktop by selecting the check box Allow users to remotely connect to this computer. Designate users by clicking the Select Remote Users... button.
  2. Check Windows Firewall, "Remote desktop /connection" should be checked, and "do not allow exceptions" should be unchecked.
  3. If still cannot connect, ping the host name or ip address to verify typo and if host is alive.
  4. If you're outside the intranet: make sure to connect VPN first before remote desktop, use fqdn for host name.

Sunday, January 25, 2009

How to disable "autoplay" of removable devices.

Auto-play of medias such as CDs, USB flash drives, etc. is usually the common culprit of virus infection these days. This is enabled by default installation of Windows.

To disable it, execute these simple procedures below in chronological order:
  1. Type gpedit.msc on command prompt or start menu \ run
  2. You will see the "group policy" management console window, select Local Computer Policy \ Computer Configuration \ Administrative Templates \ System under the tree view.
  3. You will see an item in the right side pane called Turn off Autoplay.
  4. Double click the item, and set the radio button to Enabled, and change the "Turn off Autoplay on" to All Drives.

Friday, January 2, 2009

server-side send email scripts (simplest and working)

PHP
$to = "recipient@example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("Message successfully sent!");}
else {
echo("Message delivery failed...");}

ASP
Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "test"
objMessage.From = "emailaddr@domains.ext"
objMessage.To = request.Form("emailadd")
objMessage.TextBody = "Blah"
objMessage.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
objMessage.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
* mail server should be running and functioning
* mail server's mail service configuration should be considered