Friday, April 1, 2011

Mount FTP server as drive in windows 7


1. First open the map network wizard as shown below. If you can’t see the menu in windows explorer, press “alt” key and the menu will popup.

clip_image002

2. In the map network drive wizard click on the link “Connect to a Web site that you can use to store your documents and pictures” as shown below.

clip_image004

3. The “Add Network Location” wizard is shown. Click “Next” on the welcome screen.

4. Then select “Choose a custom network location” link & click next as shown below.

clip_image006

5. In “Specify the location of your website” window, type the ftp server address or the IP address of your server under “Internet or network address”. Then click “Next”

OBS: You have to type the protocol first “ftp://” or the wizard won’t accept it.

clip_image008

6. In “Specify a User Name and Password if Required” window, uncheck the “log on anonymously” checkbox if your ftp server require a user name and password otherwise leave it checked. If your ftp server requires user name and password, then write the user name in the user name textbox. Then click “Next”.

clip_image010

7. In “What do you want to name this location” window, type the friendly name for your ftp site under “Type a name for this network location”. This name will be shown as a “Folder” in your mapped drive. Then click “Next”

clip_image012

8. In “Completing the Add Network Location Wizard” window, click “Finish” to open the ftp site.

clip_image014

9. Then the “Log On As” windows pops up to login to the ftp site. Type your password and check the “Save password” checkbox so you don’t have to type it every time you want to access the ftp site. Then click on “Log On”

clip_image016

10. The Ftp site will open and you will see that you have a network link to it under your drivers as shown below.

clip_image018

11. Now click on the ftp link under the drives, in my example “ftp1” and you will see that the address in windows explorer be “Computer –> ftp1”. Click on the address bar and the physical address on the hard disk will be shown.

clip_image020

12. Now in the address bar, delete “ftp1” and press enter to navigate to the “Network Shortcuts” folder.

OBS: If automatic navigation & hidden files & folder are not shown then you have to activate them as follows:

In Windows Explorer menu, click “Tools”-> “Folder Options”, click both checkboxes under “Navigation pane”. Then click “View” tab and select “show hidden files, folders & drivers”. Then click “Ok”.

clip_image022

13. Under “Network Shortcuts” you will see the “Ftp1” folder. Right click “Network Shortcuts” folder and click “Properties”. Click on “Sharing” tab and click on “Advanced Sharing”

clip_image024

14. In “Advanced Sharing” window, select “Share this folder”, then write a share name, in my example “MyFtps”, then click on “Permission” to set who can access this shared folder. In “Permissions for MyFtps” window select “Full Control” and click “Ok”. Then click “Ok” two times to close the sharing window.

clip_image026

15. Now in Windows Explorer address bar type “\\[YourComputerName]\MyFtps” and press “Enter”, then “MyFtps” share is shown.

clip_image028

16. Now right click on “MyFtps” folder and click on “Map network drive…” and the “Map Network Drive” window pops up. Then choose the drive letter you want and click “Finish” and you will have the folder mapped as a drive and be able to access the ftp site “Ftp1” as a folder in your mapped drive.

clip_image030

Thursday, February 3, 2011

document.getElementById return NULL when the control only have name attribute

A webpage was working well on the development machine but when I moved it to the server the document.getElementById returned null. Here an example:

<script>
alert(document.getElementById(“test”));
</script>

<body>
<input name=”test” type=”text” value=”testing..”>
</body>

The above alert should show the message “[object]” but it returns null. After few hours of troubleshooting it turned out that the webpage contained a wrong doctype tag which is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Then by changing the doctype tag to ver 4.0 (as below) everything worked well:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Sunday, January 16, 2011

Signing in to Windows Live Messenger failed because the service is temporarily unavailable. Please try again later. Error 80040154

After I installed windows live essentials 2011 on Windows Vista I got this error. I tried the instructions in the link provided by the error message (http://windowslivehelp.com/solution.aspx?solutionid=f427b98c-8fc9-4e0c-9931-859ddf8caa69) but didn’t help. So I just run the installation again & run repair as follows:

1. Start –> Control Panel –> Programs.
2. Then locate "Windows Live Essentials 2011" in the list and click on “uninstall/change”.
3. Windows Live Essentials 2011 setup will run and ask you to reinstall or repair. Click on repair.
4. When it finish. Start Windows Live Messenger & sign in.

Thursday, December 16, 2010

Error: Cannot have multiple items selected in a DropDownList

Receiving this error when trying to select an item in an ASP.NET dropdownlist as below:

Dropdownlist1.items.FindByValue(“1”).Selected = True

To Solve this, just call the ClearSelected method before selecting the item:

Dropdownlist1.ClearSelection()
Dropdownlist1.items.FindByValue(“1”).Selected = True

Saturday, September 26, 2009

How To: Auto-Logon to user account at startup with Windows Vista

1.Click on the Start button and type in ‘netplwiz‘. This will open the Advanced User Accounts menu.
2.In the Users tab, highlight the account you want to login to Vista automatically with, and then untick ‘must enter a username and password to use this computer’
3.Click on ‘Apply’. A new window will now popup asking you to enter the password of the account you’ve just highlighted. Do this, and then click ‘Ok’
4.Click ‘Ok’ on the Advanced User Accounts menu to finish

Thursday, September 3, 2009

SQL Server 2008 setup support rules restart computer


1. Run “regedit” under program->run.
2. Navigate to:

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager"

3. Double-click on the key “PendingFileRenameOperations” and clear its content or if there are command that should be run copy it to a file then replace it after you finish sql setup. Press “Ok”.
4. Now click on “Re-run” in “Setup Support Files” window & it should pass.

Wednesday, August 26, 2009

CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Load crpe32.dll failed

 

My application worked locally but after i installed the application on the server it stopped working & received the error “load crpe32.dll failed”. I found out that the application on the server is running framework 2.0, i changed it to 1.1 and it worked perfectly.

1. Make setup program to install your application on the server.
2. If you will copy the application to another map, leave the original copy and don’t delete it.
3. Change .Net framework for the application to 1.1.

Friday, July 10, 2009

Windows Photo Gallery can't open/preview images in some folders/desktop in Vista

If you are having problems opening an image (double-click or enter) in some folders while it works in other folders, then try the following:

  • First copy a picture to an empty folder & then double-click on it, if it works then check the folder where its not work & see if there are any html, htm, urls in the same folder. If so, move them to another folder and then try again & it now it should work.

Hauppauge WinTV7 change channel name

To change channels name for Hauppage WinTV7 in Windows Vista, do the following:

1. Find the channels database (hcwChanDB_5.mdb) which usually be found under [SystemDrive]:\Users\Public\WinTV\Channel Database.
2. If you have MS Access, open the database with it.
3. Right-click on “hcwChannels” and click “Open”.
4. Find the “Preferred_name” column & you can change each channel name as required.
5. Save and close.

Saturday, June 27, 2009

Hauppauge WinTV7 hangs and have to restart windows

Sometimes while changing channels on WinTV7 on Hauppauge Win TV-HVR 4000 it hangs and you have to restart windows to be able to run it again.

To close WinTV7 when its hangs and start it again do the following:

1. Right-click on “Taskbar” and choose “Task Manager”. Under “Applications” Tab, select “WinTV7” and right-click on it and choose “Go To Process”. “Processes” tab will open and then “WinTV7.exe” is selected. Right-click on it then choose “End Process Tree”.
2. Then scroll in “Processes” tab and select “HauppaugeTVServer.exe”, right-click on it and choose “End Process Tree”, then search for “CaptureGenPCI.exe” and right-click on it and choose “End Process Tree”. Then close “Task Manager”
3. Now go to “Start”, then “Control Panel”, then click on “Administrative Tools”, then click on “Services”. “Services” program will open.
4. Scroll to “HauppaugeTVServer”, right-click on it and choose “Start”.
5. Now start WinTV7.

Problem installing Hauppauge Win TV-HVR 4000

Windows Vista

I’ve installed Win TV-HVR 4000 on all vista versions and found one that it only worked with vista that supports media center. Here is a link that shows the features for different vista versions http://www.microsoft.com/windows/windows-vista/compare-editions/default.aspx.

So Win TV-HVR 4000 works on two vista versions:

1. Home Premium.
2. Ultimate.

Windows XP

After installing WinTV7 and the program hangs when searching for channels. To solve this problem do the following:

1. After you start WinTV7 and before you search for channels, right-click on “Taskbar” and choose “Task Manager”, under “Applications” tab select “WinTV7” and right click on it & choose “Go To Process”, it will open “Processes” tab and the “WinTV7.exe” is selected. 
2. Now, right click on it & choose  “Set Priority” then choose “High”, a message box will shows to ask you if you really want to change the priority, choose “Yes”/”ChangePriority”. Then Close “Task Manager”
3. Return to WinTV7 and start searching for channels & it should work.

Vista Photo Gallery background colors are off, dark, light green, or strange color.

To change the background color to normal, do the following:

1. Surf to http://www.adobe.com/digitalimag/adobergb.html & download the Adobe RGB (1998) ICC profile, then unzip the file. You can also download it by clicking on AdobeRGB1998.icc.
2. Goto “Control Panel”, then “Color Management”
3. Click on the “All Profiles” Tab, then click “Add”.
4. Browse to the file AdobeRGB1998.icc & choose it, you will see it in the profiles list with the name “Adobe RGB (1998).
5. Click on “Devices” Tab & then from the “Device” dropdown choose your monitor and you will see the list of ICC profiles listed with this device. If “Adobe RGB (1998)” is not available click on Add and add it, then choose it & click on “Set as Default Profile” button. If you have more than one monitor connected, do the same for all monitors.
6. Now try Windows Photo Gallery, it should work fine.

Sunday, November 23, 2008

Command in right-click

To enable Command when right-clicking on a file:

1. Create a new file with the extension (.reg).
2. Copy and paste the code below in it and save the file.

REGEDIT4
[HKEY_CLASSES_ROOT\Directory\shell\Command] @="" [HKEY_CLASSES_ROOT\Directory\shell\Command\command] @="cmd.exe \\\"%1\\\""

3. Double-click the file, the message "Are you sure you want to add the information [path and name of the file] to registry?" will appear. Choose "Yes".

4. Complete!.

Wordpad in right-click

To enable wordpad when right-clicking on a file:

1. Create a new file with the extension (.reg).
2. Copy and paste the code below in it and save the file.

REGEDIT4
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\Wordpad]
[HKEY_CLASSES_ROOT\*\shell\Wordpad\command]@="Write %1"

3. Double-click the file, the message "Are you sure you want to add the information [path and name of the file] to registry?" will appear. Choose "Yes".

4. Complete!.

Notepad in right-click

To enable Notepad when right-clicking on a file:

1. Create a new file with the extension (.reg).
2. Copy and paste the code below in it and save the file.

REGEDIT4
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\Notepad]
[HKEY_CLASSES_ROOT\*\shell\Notepad\command]@="Notepad %1"

3. Double-click the file, the message "Are you sure you want to add the information [path and name of the file] to registry?" will appear. Choose "Yes".

4. Compelete!.

In/Uninstall dll/activex using right-click

To in/uninstall dlls/activex by right-clicking on the file, do the following:

1. Create a new file with the extension (.reg).
2. Copy and paste the code below in the file and save it.

REGEDIT4
; ActiveX DLLs
[HKEY_CLASSES_ROOT\.dll]@="dllfile"
[HKEY_CLASSES_ROOT\dllfile\shell\regdll]@="Register ActiveX DLL"
[HKEY_CLASSES_ROOT\dllfile\shell\regdll\command]@="regsvr32.exe \"%L\""
[HKEY_CLASSES_ROOT\dllfile\shell\unregdll]@="Unregister ActiveX DLL"
[HKEY_CLASSES_ROOT\dllfile\shell\unregdll\command]@="regsvr32.exe /u \"%L\""
; ActiveX Controls
[HKEY_CLASSES_ROOT\.ocx]@="ocxfile"
[HKEY_CLASSES_ROOT\ocxfile\shell\regocx]@="Register OCX Control"
[HKEY_CLASSES_ROOT\ocxfile\shell\regocx\command]@="regsvr32.exe \"%L\""
[HKEY_CLASSES_ROOT\ocxfile\shell\unregocx]@="Unregister OCX Control"
[HKEY_CLASSES_ROOT\ocxfile\shell\unregocx\command]@="regsvr32.exe /u \"%L\""
; ActiveX EXEs
[HKEY_CLASSES_ROOT\.exe]@="exefile"
[HKEY_CLASSES_ROOT\exefile\shell\regexe]@="Register ActiveX EXE"
[HKEY_CLASSES_ROOT\exefile\shell\regexe\command]@="\"%L\" /regserver"
[HKEY_CLASSES_ROOT\exefile\shell\unregexe]@="Unregister Active EXE"
[HKEY_CLASSES_ROOT\exefile\shell\unregexe\command]@="\"%L\" /unregserver"

3. Double-click on the file and the message "Are you sure you want to add the information in [path and name of the file you created] to the registry?". Choose "Yes".

4. Complete!.

Tuesday, November 18, 2008

[How To] Backup Exchange 2007 on Windows 2008 Server locally with ntbackup

Windows Server Backup in Windows Server 2008 does not support Exchange backup unless you are using smal business server which supoort exchange backup. So to backup exchange on windows 2008 server we need to copy ntbackup files from Windows 2003 server x64.

1. Create a new folder on the 2008 server machine root. Then copy the three files (ntbackup.exe, ntmsapi.dll and vssapi.dll) from 2003 server to the folder created on the 2008 server.

2. Make sure you have "Removable Storage Manager" feature is installed on 2008 server as shown belo:


3. Start ntbackup.exe.

[How To] Install Microsoft Java VM

The following steps to install Microsoft Java VM:

1. Download and install on Java VM based on your Windows:

More links:

www.java-virtual-machine.net
www.alibre.com/support/downloads

To manually uninstall Microsoft Java VM click here

[How To] Manually Uninstall Microsoft Java VM

The following Steps for Manual removal of Microsoft Java Virtual Machine.

1. Go to Start -> Run and paste the following command into the run box:

RunDll32 advpack.dll,LaunchINFSection java.inf,UnInstall

If you are running an older version of the JVM you may need to upgrade to version 3809 or 3810 (windows update) before the above command will work.

You will then be asked if you really want to remove the virtual machine and then reboot. At this point if a message is displayed to the effect of 'removing the jvm will prevent you being able to download files' this refers to files downloaded through java applets rather than regular file downloads.

2. Remove the following registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Java VM HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\JAVA_VM (Key used for VM entry in IE Advanced Options)

3. Remove the following System Folder and files:

C:\WINDOWS\System32\jview.exe
C:\WINDOWS\System32\wjview.exe
C:\WINDOWS\inf\java.pnf
C:\WINDOWS\java
(C:\Windows represents the drive and path of your windows install, %windir%)

To reinstall Micrsoft Java VM click here

Thursday, October 9, 2008

Read/write file text

The following functions is for reading/writing the entire file content.

Imports system.io

Public Shared Function ReadTextFromFile(ByVal FullPath As String, _
Optional ByRef ErrInfo As String = "") As String

Dim strContents As String
Dim objReader As StreamReader
Try
objReader = New StreamReader(FullPath)
strContents = objReader.ReadToEnd()
objReader.Close()
Return strContents
Catch Ex As Exception
ErrInfo = Ex.Message
End Try
End Function

Public Shared Function SaveTextToFile(ByVal strData As String, _
ByVal FullPath As String, Optional ByVal ErrInfo As String = "") As Boolean

Dim Contents As String
Dim bAns As Boolean = False
Dim objReader As StreamWriter
Try
objReader = New StreamWriter(FullPath)
objReader.Write(strData)
objReader.Close()
bAns = True
Catch Ex As Exception
ErrInfo = Ex.Message
End Try
Return bAns
End Function