Archive

Author Archive

Non-blocking notifications/ Toaster Popups for Microsoft Access (VBA)

August 26, 2016 3 comments

Hello there!! Yes! Been another long time from my last post. Absolutely wonderful how much support, contacts, messages, critics & love I get. Thank you all and you guys are amazing. Smile SmileDue to the nature of my profession, I don’t quite get time to keep up with my blogs now. But I try to get some time for new posts. Like right now I’m writing this blog while crossing the English Channel. Yes off to Paris for a weekend.. Smile Smile

I thought this is worth sharing as there are plenty of developers still working on MS Access who wants some nice UI functions. So here it is!.

Billy, –my new online friend- who works on a Microsoft Access project, asked (wished himself) if there is a way to replicate “Toastr” pop-ups for Microsoft Access (VBA).

Similar to Toastr, popups should allow customisation. Such as the position, animation, background color, dragable, transparency etc.

Mainly to show non-blocking messages. Something that user should know but not necessarily need to interact with it.

To achieve this in VBA, a borderless form and few windows APIs can be used.

1. An API to place the form where we want (ideally somewhere near to where the user is focusing. In case of multiple screens)

2. To make the form transparent

3. Fade in/out (some animation) to mimic toasting effect.

4. Dragable. In case if the toast is blocking users view and user wants to move it somewhere.

 

The end result will look somewhat like this. (Written in pure VBA using some APIs)

nomal_toast[3]

Billy was happy but NOT “happy happy” with this result. Since MS office is single threaded, fading-in, fading-out or any loop operation will eat the entire applications processing cycle. Billy didn’t like the fact that his application was waiting when showing multiple toasts.(VBA really struggled when 10 or more toasts were cooked simultaneously. (Don’t ask me why on earth he wanted to show 10 toasts at a time)

In essence, this was not a “non-blocking” notifications.

He said,

No wonder, why I couldn’t find anything similar online. It’s not worth doing in VBA because of the single thread limitation”

Oh well! no one done it yet? sounds like a challenge to me! Smile

I thought, what if you could

Write your own .NET DLL?

Surely this should save (single threaded) host application’s processing cycle?

A quick search on the internet gave me various results how to access .NET DLLs from VBA. one in particular(1,2) was very interesting. Which wraps C# DLLs in a way that VBA could read it. I quickly followed Robert Giesecke template and re-wrote the VBA toasting script within C# class.

Here comes the technical part:

You can consume .dlls in VBA in two different way. Either the .dll is already available in GAC (com visible / registered .Dlls) or load the .dll dynamically.

I didn’t like the fact that your .dll have to be registered. Clients might or might not want to install/register a .dll. So, I went with loading dynamically option.

To load a .dll dynamically in VBA, you need to prepare something.

1.Register/Declare the Windows API calls to load & unload DLLs

2.Wrap all your dll functions within a class and pass it to the caller as object.

 

Loading and unloading would be: (add ptrSafe accordingly)

Private Declare Function FreeLibrary Lib “kernel32” (ByVal hLibModule As Long) As Long
Private Declare Function LoadLibrary Lib “kernel32” Alias “LoadLibraryA” (ByVal lpLibFileName As String) As Long

 

I have wrapped all our functions within a class (KRISH_VBA_TOOLS). We also need to register this class within VBA so we could consume it like any other classes.

I put the .dll in my app folder hence I don’t need the absolute path name.

#IF VBA7

Public Declare PtrSafe Function KRISH_VBA_TOOLS Lib “VBA_TOOLS.dll” () As Object

#ELSE

Public Declare Function KRISH_VBA_TOOLS Lib “VBA_TOOLS.dll” () As Object

#END if

NOTE: MS ACCESS VBA will expect you to provide absolute path for any .dlls that you load. In our case, we are going to load the .dll manually and leave the abstract declaration pretending that we provided the dll path. (I needed this way because I use option Explicit in module level)

Loading the vba_tools.dll and toasting some notifications would be.

Public Function FN_TOAST_DLL(iMessage As String, Optional iCLOSE_DURATION As Long = 3000, Optional iType As String = “success”, Optional iANIME_DURATION As Long = 1000, Optional iFONT_COLOR As String = “#FFFFFF”, Optional iX As Long = 0, Optional iY As Long = 0, Optional iANIME_DIRECTION As Integer = 1, Optional iPARENT_HWND As Long = 0)

On Error GoTo LABEL_EXIT_ROUTINE:

If gTOASTER Is Nothing Then
LoadLibrary (FN_APP_GET_BASE_PATH & “CCMSDLL.dll”)
Set gTOASTER = KRISH_VBA_TOOLS()
GoTo LABEL_TOAST
Else
GoTo LABEL_TOAST
End If

LABEL_EXIT_ROUTINE:
On Error GoTo 0
Exit Function

LABEL_TOAST:

Select Case iType
Case “error”
iType = “#F76160”
Case “success”
iType = “#26ad82”
Case Else
iType = “#26ad82”
End Select

Dim mRect As RECT
If iPARENT_HWND <= 0 Then
If iX = 0 And iY = 0 Then
GetWindowRect Application.hWndAccessApp, mRect

iANIME_DIRECTION = 0
End If
Else
GetWindowRect iPARENT_HWND, mRect
End If

‘set up the position
iX = mRect.Left + 360
iY = mRect.Top + 1

On Error Resume Next
gTOASTER.FN_SHOW_TOAST iMessage, iCLOSE_DURATION, iType, iANIME_DURATION, iFONT_COLOR, iX, iY, iANIME_DIRECTION

End Function

Read more…

Advertisements

Tamil Unicode Font for Android – Working

July 30, 2011 162 comments

Again couple of months are gone since I wrote my last article. I think it’s time to write another article about the hot topic “Tamil fonts in Android OS”. I’m Android user since two years and I never thought to access Tamil websites or any Tamil content through my smartphone. Since Tamil Unicode is not implemented in Android I also wasn’t that much interested in digging OS for Tamil fonts.

One of my friends has IPhone and we had an argument which of the OS is best for current user. My argument was “it depends of the needs”. Android is open source and allows exploring more in your own way where IPhone OS (IOS) is exclusive to the users. Users are limited to certain functions.

Anyway we leave the topic which of the Operating system is best; ) my friend said IPhone can read Unicode fonts where Android does not include all Unicode letters. I didn’t want to let my Samsung Galaxy s2 go down in comparison with his IPhone and I challenged him to make my phone able to read Tamil Unicode fonts. So it started with my research about Tamil Unicode Fonts.

Tamil is a south Indian language, more than 2000 years old and derived from Sanskrit Language. It contains (12 * 18) + (12 + 16) = 246 letters

Tamil is a “classic“ south Indian language, more than 2000 years old  (I’m not very sure). It contains (12*18) + (12+18) + 1 = 247 letters.

 (PS: sorry for the lack of Tamil history knowledge )

(Some of Indian Language has more than 1000 chars :S:S:S:S:SJ)

I have searched in Google about Tamil fonts in Android and found millions of people are waiting for the Tamil Unicode implementation in Android. I definitely want to do something to be able to read Tamil on my phone. Not only because of my friends argument against Android also because of so many people who are interested in having Tamil Unicode fonts in their Android devices.

After couple of research it was clear to me the Android phone has to be rooted to alter system wide files such as fonts and layouts. There are some methods in Opera Browser to activate bitmap fonts which is claimed to be able to read Unicode Tamil fonts.

I didn’t want to go for that option because the solution is just to read a website and Tamil fonts cannot be accessed system wide. So I came to a conclusion to write a font which includes Tamil Unicode.

Here are some advantages of system font:

  • This method would be perfect for any of the users who want to develop Application in Tamil without using graphic letters.
  • No need to install specific browsers Tamil Unicode is visible in any browser
  • Tamil Unicode is visible system wide (write message, email, applications, website)

Disadvantage:

  • Phone has to be rooted in order to alter system font
  • Everyone should have it in order to render.

Everything in my plan seemed fine and I initiated the project writing Unicode Tamil Font for Android. Half a way through I have checked the Android market for any Tamil related application and found some Tamil keyboards which claimed to make it easy to write in Tamil.

I was wondering how to implement 246 letters into Android Keyboard where we already struggling for space for 26 English letters; )))

Obviously we don’t need to have 246 letters because some of the letters could be created by combining two alphabets. But still the letters are too much to place in the Keyboard. Furthermore we all are accustomed to write in English Keyboards.

The Taminglish, art of writing Tamil using English letters has overtaken almost a full generation and nowadays it is common that young generation using Taminglish for their Tamil needs.

Another idea has joined, developing a Taminglish Keyboard for Android which makes writing Tamil much easier than other options.

In year 2007 (can’t remember) I have created a Script for MSN Messenger users who want to write Tamil Unicode in MSN Messenger. It was just a try and I didn’t have time to give further updates. Soon after launching the Script nearly 10 000 users have downloaded the script and I was happy to have such amount of fans.

Reference: www.msgplus.net and search for Tamil converter Script. or

http://www.msgplus.net/Downloads/Download-Details/DocumentID/8175/

I though why don’t you give a system font along with Taminglish Keyboard which will instantly make it easier to learn and write Tamil.

It’s been a week now since I have started the project. Today morning at 04:00 AM I finished the basic functions and tested the result. Now I’m able to read any Tamil Unicode website through any browser and I’m also able to send SMS/Text in Tamil.

Here are the solutions:

clip_image001

clip_image002

The Keyboard has not been correctly aligned, it is still under development. Keyboard functions are as usual with additional key [Cnv] which converts Taminglish into Tamil Unicode letters.

For example: “ammaa” will be converted into அம்மா.

I will be happy to have beta users to test the keyboard and font before I launch to the Android market.

I also would like to get support/comments/suggestions/Donations to establish my project. Smile

Krish KM

———————————————UPDATES—————————-

02-08-2011 18:36:45

Thank you all for your support and encourage I feel so much encouraged now. And BTW I’m sorry for lack of Tamil history knowledge ; ) I have learned much new things through this project.

 

Currently I’m working on Bold fonts. As you can see the screenshot “Tamilwin” website does not shows any bold fonts on my mobile (maybe some of you already started to moaning “we don’t even have regular font, why you complain about bold” ; ))

Here the current progress:

Font

  1. Font alteration : Done,
  2. Full Unicode rendering : Done,
  3. Implementing full Tamil letters: Done
  4. Implementing Bold letters : Partly –done

Taminglish Keyboard

  1. Taminglish Keyboard –Layout : Done,
  2. Taminglish Keyboard –Conversion : Partly done (has some minor bugs)

APK

  1. Keyboard installer : Done
  2. Tamil Font installer : Partly done {Still having issues to mount the system in RW mode}

 

Overall I’m thinking to merge those two applications into one and hope will finish soon..

I’ll let you know guys.

 

krish km

 

03-08-2011 01:36:04

Bold font implementation complete…

 

result

 

ScreenShot03-08-2011

 

 

—————————————-DOWNLOAD:——————–

..

Tamil Unicode font:
https://market.android.com/details?id=com.KM.TF

Taminglish keyboard converter:
https://market.android.com/details?id=com.KM.TK

 

04-08-2011

Donated version available

https://market.android.com/details?id=com.KM.TK.DN

https://market.android.com/details?id=com.KM.TF.DN

Official page

https://www.facebook.com/pages/Tamil-Unicode-Font-for-Android/175977979139443

donation:

http://www.knmglobal.com/donate.htm

if you can’t see on the market
search as
pub:”krish km” will show all Tamil Unicode apps

PS: the application might not response well please hit the button more than once, it will work, it is due to my bad coding to get superuser permission for the whole session.

Donated Version Note:
The partly rendering issue was already known  to me. The intention of beta version was to make sure that implementing Unicode chars is working in first place. I purposely didn’t let the script to decode all chars as I thought it might overweight the standard chars. And I didn’t want any one break their devices.

The donated version will alter the standard font and and implement all Tamil Unicode chars.

from your reply for the beta version. I’m sure your device is fully compatible for the donated version. let your self surprise.

krish km

 

———————————-Release comment

. .

 

Hii thank for the all comments, I’m sorry for the rendering issue,
as I said I was more concentrating not to break the phone it means the “NOT FULLY RENDERING” was already known to me while working with the font.

the intention of beta release is to test on all your phones, that Tamil Unicode is working partly or fully as I wanted letters are there as I wanted, letters are broken as I wanted,
and I have the answer that my script is working as I wanted.

today or by tomorrow you all will receive update with fully compatible Tamil Unicode to the system.

I feel so much encouraged now. Thanks for your support.
I will take sick leave and try to finish it by today.

Krish KM

 

 

soo much appreciation from my lovely sisters ; ))) PLS: forgive our tamil we tried as much as we could ; )

 

 

SMS

ScreenShot04-08-2011

 

Email and whats app..

screenshot_28screenshot_30

 

Technorati Tags: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Windows Live Tags: Tamil,Unicode,Font,Android,Again,Users,Anyway,Samsung,Galaxy,Fonts,Indian,Sanskrit,Language,Some,Google,Opera,Browser,Here,Application,Disadvantage,Half,Keyboard,English,Keyboards,Taminglish,Another,Script,Messenger,Soon,Reference,Downloads,Download,Details,DocumentID,Text,Donations,couple,article,write,about,topic,user,through,friends,best,needs,where,functions,system,read,letters,didn,want,make,able,research,found,people,wide,website,visible,order,project,market,into,generation,easier,give,msgplus
WordPress Tags: Tamil,Unicode,Font,Android,Again,Users,Anyway,Samsung,Galaxy,Fonts,Indian,Sanskrit,Language,Some,Google,Opera,Browser,Here,Application,Disadvantage,Half,Keyboard,English,Keyboards,Taminglish,Another,Script,Messenger,Soon,Reference,Downloads,Download,Details,DocumentID,Text,Donations,couple,article,write,about,topic,user,through,friends,best,needs,where,functions,system,read,letters,didn,want,make,able,research,found,people,wide,website,visible,order,project,market,into,generation,easier,give,msgplus

Windows does not start, Cannot install new windows, windows setup failure…

May 19, 2011 3 comments

Its been a while I have written new blogs. Have been busy with my final year project in Software Engineering. My project has been awarded with a Distinction but felt sad leaving my University and colleagues.

 

Lets move to the new story.

My uncle (oh yes we do have tones of uncles and aunties and their millions of kids as cousins) called me and said his laptop is broken and if I could have a look.

I asked him what happened?

uncle: Don’t know suddenly not working. The laptop had vista, we tried to install Win7 but we couldn’t, tried to install vista again and vista also wont install.

Me: Mhh strange! Any error messages?

uncle: You know? the set-up screen? even it doesn’t come up, I cant install any operating system.

Me: Any recent hardware changes?

Uncle: yes, we thought its the HDD so we  tried to change the HDD but it still remains the same!, Even we tried to change the RAM still same..

Me : Mhh ok bring the lap and leave it on my desk I will have a look. I went to work.

 

23:00 clock I came from work tired and saw a Toshiba Satellite Laptop on my desk with a note on the top : “Not working”

I wanted to check the pc before taking dinner (yes late dinner but I’m slim though Smile with tongue out). Switched the lap on and inserted Win7 Disk and wanted to install windows.

Checksum Error : The file checksum ……….. is not matching……. … error!!! bangggg

 

Never seen such an Error while trying to install an operating system. I was curious and forgot to take my delicious dinner which mom have left on my desk.

 

Quickly restarted the pc inserted a Windows live cd  and wanted to give a start. It was CD was loading bud frozen after couple of seconds. Mhhh strange!!! some serious problem!!

I was more curious….

Inserted a Linux cd and wanted to see.. CD loading.. boot strap… ERROR NO SPACE

Woaa!! no space?? some thing wrong with HDD?

 

My brain quickly analysed next steps I shall take instead of wasting time it was almost 23:45

wanted to give a last try with an old operating system “WINDOWS 98”

Inserted win98 cd…

start from cd..

drivers are loaded… ( i was happy, little hope it’s working)

setup started..

scanning progress..

Scandisk … stopped with error “unable… to bla bla bla”

setup aborted as it cannot continue without scandisk.

 

one more last chance???

inserted my USB live windows.. and wanted to give a try..

that DAMN Laptop did not want to start any of my source….

 

At least it accepted win98 and booted until the dos mode.. so one more last hope to do something..

windows 98 cd

start from cd

dos mode..

changed to A:\

fdisk…

wanted to reformat the HDD ( it had 40gb hdd)

old FDISK command is bad at formatting large HDD’s (above 2gb)

I wiped the full disk.. 

Tried again with usb windows to install..

 

DAMN…… what the hell??? I cant install anything…

 

lied on the bed for couple of minutes! and refigured what could be the issue…

 

I totally forgot I had another USB with Hiren boot cd which I use for most of my repair actions!

 

Jumped from the bed inserted HIREN BOOT USB and loaded the main menu..

HDD scan… no fault!

Memory scan : right side 8 bits of 16 are marked red!

wow.. some new progress…

 

Restarted the Memory diagnose, right side 8 bits were marked bad and left side was ok!!

 

I was wondering why BIOS didn’t throw any beeps if memory was faulty.

 

Quickly I’ve checked the memory is not faulty physically its logically corrupted… (assume so)

 

Just triggered that my sister also has Toshiba laptop.

YES!!! I sniffed to her room (It was 1:30 am) and stole her Toshiba laptop..

Quickly changed the RAM to the uncles laptop…

 

started the laptop, inserted win7 cd… and setup was running voila!!! What a mess!!

 

I remembered my uncle said he also replaced the RAM. Did he really replaced? or just changed the RAM from Socket A to Socket B?

 

Anyhow, replacing the RAM fixed the bug and I was able to install Vista on the laptop..

 

Usually people (even me) think If BIOS does not give any unusual beep’s that everything is fine also the RAM.

Never it comes to the mind to diagnose the RAM in such situation where the actual problem is the RAM it self.

Reason the ram is corrupted but not physically, otherwise BIOS would have notified!!

Solution: RAM changed.

 

PS: Operation finished at 5:00 AM… 6:00 I have to prepare, 7:00 AM have to leave home for work.. my dinner shall be my breakfast Smile)))))

 

Technorati Tags: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Windows Live Tags: Windows checksum error,Memory diagnose,Cannot install windows,Cannot start,Windows,Software,Distinction,Lets,Uncle,Toshiba,Satellite,Laptop,Disk,Checksum,Error,Mhhh,Linux,SPACE,Woaa,Scandisk,DAMN,FDISK,Hiren,BOOT,Memory,BIOS,Just,Socket,Vista,Reason,Solution,does,start,install,setup,project,uncles,said,could,look,again,strange,cant,system,change,same,desk,work,from,dinner,curious,forgot,take,left,live,give,couple,some,problem,hope,mode,scan,side,bits
WordPress Tags: Windows checksum error,Memory diagnose,Cannot install windows,Cannot start,Windows,Software,Distinction,Lets,Uncle,Toshiba,Satellite,Laptop,Disk,Checksum,Error,Mhhh,Linux,SPACE,Woaa,Scandisk,DAMN,FDISK,Hiren,BOOT,Memory,BIOS,Just,Socket,Vista,Reason,Solution,does,start,install,setup,project,uncles,said,could,look,again,strange,cant,system,change,same,desk,work,from,dinner,curious,forgot,take,left,live,give,couple,some,problem,hope,mode,scan,side,bits
Blogger Labels: Windows checksum error,Memory diagnose,Cannot install windows,Cannot start,Windows,Software,Distinction,Lets,Uncle,Toshiba,Satellite,Laptop,Disk,Checksum,Error,Mhhh,Linux,SPACE,Woaa,Scandisk,DAMN,FDISK,Hiren,BOOT,Memory,BIOS,Just,Socket,Vista,Reason,Solution,does,start,install,setup,project,uncles,said,could,look,again,strange,cant,system,change,same,desk,work,from,dinner,curious,forgot,take,left,live,give,couple,some,problem,hope,mode,scan,side,bits

Real VNC 4 is not accessible by other v 3.3 Clients.

January 22, 2011 Leave a comment

I use my desktop much from outside than console. From UNI, workplace and mobile. Most of the time I’m not at home but using my home desktop through remote applications such as remote desktop, real vnc but NOT Teamviewer Winking smile

As most of my fans know, I don’t use Teamviewer as TV has its own master server {they call it “Keep alive server”} and everything is passing their server and I don’t like my details are passing their servers for nothing…

In my opinion VNC is best solution is for remote accessing application as the software is thin and able to do same stuffs as most other remote applications.

I used to use “real vnc viewer” to access my pc. Once I was at my cousins collage and want to connect my desktop to download some question papers for him.

The collage has restricted“vnc viewer” as well as Teamviewer and remote desktop from using. Mhh what to do now?? I wanted to connect to the pc. I was searching for an alternative way to bypass the collage file accessing security policy!!

The collage it self had real vnc installed on the teachers computer. So something in my mind said there should be an alternative way to connect through VNC. I went to google using my phone and searched for custom made VNC viewers{with a small hope that the collage admin didn’t block other vnc viewer; )}. I found ultra VNC and tight VNC for download.

I opened the tight vnc viewer it was opening.. VOILA!!

now i was hoping they didn’t block port 5000 {I was pretty sure they didn’t cos they also had VNC}

I typed my server domain and clicked “connect”………………………. 😦 ErrMsg: server refused connection with code 10060 / 61

 

MY bad luck both viewers refused to connect to my Desktop as I had Real VNC version 4.x and the viewers using 3.3 protocol.

It was clear to me that VNC with different clients will work when I configure my server properly and I cant connect to my desktop through VNC before I configure my server to accept 3.3 protocol based clients.

 

I have rooted SE XPERIA X10 with an application to share mobile internet to the computer. secretly I connected the mobile to the computer and opened portable Teamviewer soO sad “Teamviewer is not accessible by windows” the file accessing policy didn’t allow me to use Teamviewer.

For a second I had enough of the local policies and the administrative blocks. I thought  boot the computer with my own USB windows to by pass everything. 

didn’t want to mess around with the admin just left the collage with furiousness. I came home and tried to setup the VNC console to accept v 3.3 viewers request. I was struggling as there are no straight way to setup the process. I wanted to know why its not allowing to connect 3.3 viewers even though I have imported 3.3 settings in my Real VNC console.

It was almost 4:00 AM I did not want to gave up. My laptop CPU fan increased the cooling sound continuously. probably it also had enough with my madness Winking smile.

after couple of hours I figured out how it works and how to set up and..

Here is the way how to configure your real vnc to accept request from 3.3 protocol.

Before we continue please note that:

REAL VNC v4 has its own encryption and protocol which is only functional with real vnc viewer.

 

Real VNC allows importing the 3.3 version protocol but some steps has to be done before it works with 3.3 viewers.

If you already have installed real vnc viewer and used once using real vnc viewer. You probably generated the encryption key for the server

 

To enable the 3.3 clients:

1.       Go to server console Options

2.       Change the tag to “Legacy”

3.       Import the “VNC 3.3 settings ”

4.       Change the tab to “Security”

5.       Check the option “VNC Password Authentication”

6.       Click the button “Configure”

7.       Don’t type any password but click the button “Extend the configuration”"

a.       You will see another password window

8.       Check the option “Enable Admin”

9.       Click the button “Set password”

10.   Type your password, close the password with “OK button”

11.   Now close the password box.

a.       Don’t type any password in this box

VNC server might raise an error no password is configured and it will show the window to enter the password. Type the same password as your admin one.

Finally you need to GENERATE NEW KEY and press “Generate Key”

Now you are good to go..

Open you laptop and try to connect via 3.3 clients you should be able to connect..

NOTE: IF you are changing the server via remote and you have an active v 4.0 vnc connection. You wont be able to connect to via 3.3 until you close the v 4.0 connection.

best way you do it locally or use Teamviewer to connect to the server and generate the key.

Some time the clients might raise error “Not configured 3.3 security system bla bla..”

In this case you need to

disable the authentication, generate key, again vnc password authentication, again extended configuration, again admin password, than close, close.. {if its asks for password jst type the same admin pw}

and

Generate the new key with new password

3.3 clients will not ask for username, if any asks for username enter admin.

real vnc viewer will ask for the username. type Admin.

You should be able to connect now….

now I’m able to connect to my desktop using 3.3 clients as well as v4 clients Winking smile

and thank you for reading my blog.

Questions and comments are welcome Winking smile

krish

PS: there might be spelling mistakes, grammar mistakes just ignore them while reading Winking smile

 

How to set-up simple VPN connection between two remote computers. Step by Step using with pictures.

January 18, 2011 10 comments

Story:

My cousin lives in Germany and I want to access her PC via local IP address. My intention was to access her shared folders {read and write option which usually requires FTP server for remote pcs}. Another strong reason is to deploy local commands and no need of port forwarding in routers.

VPN {virtual private network} is secure tunnelling system that allows two computers to be connected locally over network. It is ideal to have higher upload rate which gives the real LAN feel. VPN also allows to setup manual IP as the local router would do, which is very handy to access remote computers.

clip_image001[14]clip_image001[15]Structure before VPN:

 

clip_image002[8]

 

To access her PC I need her WAN {public IP or router IP}. I could use Teamviewer to access her computer but I’m not Team-viewer fan. Personally I would prefer VNC as they are very thin applications and easy to handle. Team-viewer has master server in which all connections are passing those server and obviously every data you transfer and view is passing their master server.

VNC Preparation:

Before setting up VPN, some certain ports has to be freed in both server and client routers {if they are behind NAT or windows firewall}

Another important thing is to set-up static IP/ dynamic DNS. Most of our ISP provides us dynamic IP which changes every 24 hrs. This means our public IP or domain is changing every 24 hours. We can create an own static DNS using some application or even using our router application.

There are several providers who provide free dynamic DNS DYNDNS.org is well known provider and most of the router also includes this option to setup. In this tut we work with NO-IP.com

Setting up Dynamic DNS:

Idea is to get always the newest IP address of a machine through a domain name. It means every time when our router gets new IP we will forward this IP to a domain name. Which means whenever we ping the domain name we will get the latest public IP address of selected machine.

1. Go to http://www.no-ip.com

2. Create an account

3. Create host {it’s free} eg. Myrouter.no-ip.com

a. You don’t need any further settings when you create host. Just create one and leave all settings default.

4. On the same website download their application “DUC.Exe” Dynamic Update Client.

5. Install the software at SERVER PC {in this case my pc}

6. open the DUC application and login using your email address and no-ip.com password

a. {same login as you used with no-ip.com}

7. Select the hosts you want to update and check them

a. clip_image003[6]

Figure 1

8. Go to settings and make the application as system service

a. This allows running this application as a service which means when you start the pc it will start to run. Kind of auto run

Okay we have our Dynamic DNS now for the server and we will do some router settings for the server pc so clients can connect to our pc.

Router setting for Server PC:

Server computer {in this case my computer} should be able to access the port

1723 TCP

My computer has the IP: 192.168.1.20

My Default gateway: 192.168.1.1

My wireless router IP: 192.168.1.2

I have setup in my default gateway router {which has the NAT} that all connections from port 1723 should be forwarded to the IP: 192.168.1.20

Settings in Server computer {My PC}:

We want to allow the server pc to access incoming connections from the network. This let the client pc {my cousin’s PC} to connect to my pc and create local access network.

1. Go to “Control Panel\Network and Internet\Network Connections”

2. Press key combination [ALT]+F {You will see the file menu popup}

3. Select “New incoming connection”

clip_image005[6]

Figure 2

clip_image006[6]

Figure 3

4. Select the user you want to allow to connect remotely.

clip_image008[6]

Figure 4

5. Yes we want to allow the PC to be connected over the internet.

clip_image009[6]

Figure 5

6. Select the protocol you want to use. Mostly IPV4

clip_image010[6]

Figure 6

7. This is the server pc name {we don’t need this at this moment so you don’t have to print this out.}

clip_image012[6]

Figure 7

8. OPTIONAL: If you wish to specify clients IP range you can do it here. Otherwise server will automatically provide IP via DCHP server.

9. Check the box “allow calling computer to specify its own IP address”

a. {We can manually enter our wished IP in client pc’s}

10. Save everything and close it.

We have now a Dynamic DNS where our current public IP is updated. We have setup server now we go to client pc {in this case my cousin’s pc} and create the VPN connection.

Client settings:

clip_image014[6]

Figure 8

1. Go to control panel \network and internet\Network sharing centre

2. Click “Set up a new connection or network”

clip_image015[6]

Figure 9

3. Click “Connect to a workplace “VPN”

clip_image016[6]

Figure 10

4. Select “use my internet connection(VPN)

clip_image017[6]

Figure 11

5. Fill the settings

a. Internet address: It asks for the remote server address, you can type the IP address but we have setup an own dynamic DNS and we will use our DDNS. Enter the DDNS you have created previously for the server.

b. Destination Name : The VPN connection name {leave as it is}

c. Use smart card: smart cards for the connection {leave empty if u don’t have one}

d. Allow other people to use this connection….. : {This is internet sharing, we don’t want to share internet so we leave this empty }

e. Don’t connect now just set it up so I can connect later: {Check this as we don’t want to connect and we want to do some configuration}

6. Check the option “Don’t connect now……”

clip_image018[6]

Figure 12

7. Give user name and password {not your computer username and password. It asks for the server pc username and its password to connect to the server pc. We have done it previously see figure 3} domain is optional

clip_image019[6]

Figure 13

8. Just clos it we don’t want to connect now.

Now we want to setup the specified IP in client machine.{See picture below}

clip_image021[6]

Figure 14

1. Go to network connections

2. Change adapter settings

3. Click newly created VPN connection

4. Go to its property

5. Select tab “NETWORKING”

6. Select IPV4 protocol and press “properties”

7. Specify your own IP

8. Click “advanced”

9. Uncheck the option “use default gateway on remote network”

a. If you don’t uncheck this option your standard gateway will change into the servers IP Which means “After VPN YOU WILL NOT BE ABLE TO USE YOUR INTERNET”

b. Unchecking this option will keep your default gateway and your internet will work continuously

10. Save everything and close

Now we have setup almost everything if you connect the newly created VPN it should connect and you should be able to use your standard internet as well. In next chapter I will explain how to make use of VPN SmileSmileSmile

Questions and comments are welcome..

Technorati Tags: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Windows Live Tags: connection,computers,Step,Story,cousin,Germany,intention,folders,option,server,Another,port,system,setup,Structure,Teamviewer,computer,Team,viewer,data,Preparation,ports,client,Most,domain,hours,providers,DYNDNS,provider,Dynamic,Idea,machine,Create,account,Myrouter,settings,Just,Update,Install,password,Select,Figure,auto,Okay,clients,Router,Default,gateway,Control,Panel,Network,Internet,Connections,combination,menu,user,protocol,moment,OPTIONAL,Otherwise,DCHP,Check,Save,Click,Connect,workplace,Fill,DDNS,Enter,Destination,Name,card,cards,configuration,Give,Change,adapter,properties,Specify,Uncheck,servers,ABLE,chapter,Questions,routers,login,username
WordPress Tags: connection,computers,Step,Story,cousin,Germany,intention,folders,option,server,Another,port,system,setup,Structure,Teamviewer,computer,Team,viewer,data,Preparation,ports,client,Most,domain,hours,providers,DYNDNS,provider,Dynamic,Idea,machine,Create,account,Myrouter,settings,Just,Update,Install,password,Select,Figure,auto,Okay,clients,Router,Default,gateway,Control,Panel,Network,Internet,Connections,combination,menu,user,protocol,moment,OPTIONAL,Otherwise,DCHP,Check,Save,Click,Connect,workplace,Fill,DDNS,Enter,Destination,Name,card,cards,configuration,Give,Change,adapter,properties,Specify,Uncheck,servers,ABLE,chapter,Questions,routers,login,username

How do I make backup of my windows partition?

December 30, 2010 1 comment

How do I make backup of my windows partition?

Okay first of all you need to identify your requirements. What kind of backup you want to have. In my case I had to backup the whole windows partition in order to get ride of reinstall the windows and all the applications.

My sister went to London to study while I was studying in Germany. I bought a Toshiba Satellite A200(400 can’t remember) as a gift as she might need it for her study.

I knew she will call me back in 2 days and say laptop is not working, virus is there bla bla all those typical girls technical words ;)) so I decided to backup her windows that she can recover it at any point of system crash.

The laptop has 500Gb HDD and I partitioned the drive into 3 drive using

"Paragon Hard Disk Manager" The software is very simple and handy and you can make copy of partitions.

First partition with original windows = 100GB (named :  WinXp)

Second partition with an additional windows = 20GB (Backup Xp)

Third partition for backup and other stuffs = 380 GB (Data)

 

As I previously  mentioned the first primary partition with original windows has 100GB space as I believed she wont use more than this.

Followed by a 20GB HDD  and I installed the same windows XP again on this HDD (from the original CD i got with the laptop)

After I installed the new windows I had new entry when I start the laptop where I can choose which windows I want to boot to.

I have customized the boot entry as following:

My computer –> properties –> Advance settings – > Start up and recovery –> edit boot.ini

I have changed the name between “ “ into

1: backup windows

2:Windows xp – use this

just to tell my blond sister which one to select Winking smile

 

I went a step further and reduced the selection time from 30 seconds to 10 seconds and windows xp – use this as default operating system. just to make sure my sister is not thinking too much which one to start.

 

I logged into the 100GB windows and installed MS office, Antivirus, real VNC, Photoshop, PDF, flash player and all those craps she liked to have.

Checked if all the drivers are installed (mostly everything was ok as its brand new..)

 

Now I restarted the computer and logged back into backup windows 20GB.

Installed the “paragon hard disk manager” and

Created a copy of my 100 GB hard drive and saved it into the third hard drive (Data)

PS: while backing up the whole Drive will be backed up but compressed, in this way the free space will not be taken in account but the HDD sector details are saved.

It means If you backup 100GB hard drive and compress it and the Drive has 6GB of data.  Your backup file will only be 6GB or max 7GB:

NOTE: IF you create backup of 100GB HDD you also required 100GB to decompress the backup. the backup files are 6GB does not means you can decompress it into a 10GB Hard drive

Its because the backup data also contains details of the HDD size and the sector details.

 

finally opened notepad and wrote how to restore the backup files to the 100GB drive which is very simple in paragon partition manager.

Restore backup files, select drive 100GB, press ok and process

Saved this as README.txt on desktop so my sis can read this and restore her windows by herself.

 

Ohh yea.. I forgot to mention something!!

In her original windows 100GB: i have changed the user profile folder to the third drive (DATA) and the third drive has following structure

E:\

Backup: folder contains the backup files

Profiles: folder contains the userprofile folder inlcuding, document, desktop, and all those folders"

 

This is good cause all you files are saved in the third partition and in case of any crash she does not have to care about my documents and desktop folders..

(usually girls fills their desktop with tones of files they use.. they only know one location” DESKTOP Winking smile) its better if you change the userprofile folder to an safe place.

 

As I waited she called me from England after two months. “ my pc is not working, its soo slow i think I have virus can you please fix it?”

 

just told her to select the “backup xp”  and boot the backup windows and read the readme.txt

I expected she will love me for the hard work and say something.. all I received

why don’t you come over and fix it? I don’t know how to open your paragon hard disk manager.

 

I was like o.O

you can’t expect more than this from blond sisters Winking smile Winking smile this is usual. I had to install team viewer and do the restore by my self.

 

Still its a very good method to backup your full windows environment. I didn’t had to work much just opened the Paragon and restored the 100GB hdd and she was able to use her windows as before..

this time I installed teamviewer in backup-xp and saved the teamviewer ID in my buddy list

for next time……

 

I love my sisters except they are blond and non IT skilled Winking smileSmile

 

Windows Live Tags: backup,Okay,requirements,London,Germany,Toshiba,Satellite,gift,laptop,virus,words,system,Paragon,Hard,Disk,Manager,WinXp,Second,Third,Data,boot,computer,Advance,Start,recovery,selection,office,Antivirus,Photoshop,player,Drive,account,sector,NOTE,files,size,notepad,README,user,folder,documents,location,DESKTOP,England,team,viewer,self,Still,method,environment,buddy,sister,girls,userprofile,folders,sisters,teamviewer
WordPress Tags: backup,Okay,requirements,London,Germany,Toshiba,Satellite,gift,laptop,virus,words,system,Paragon,Hard,Disk,Manager,WinXp,Second,Third,Data,boot,computer,Advance,Start,recovery,selection,office,Antivirus,Photoshop,player,Drive,account,sector,NOTE,files,size,notepad,README,user,folder,documents,location,DESKTOP,England,team,viewer,self,Still,method,environment,buddy,sister,girls,userprofile,folders,sisters,teamviewer

Categories: IT

PC freezes after couple of minutes / hours. Have to restart

December 30, 2010 Leave a comment

I have many cousins age rage from 5 to 12 who really interested in breaking my computer when they visit me Winking smile). My computer is always switched on as I use my pc also from my office.

I wanted to get ride of these kids and bough another normal computer and told them to use it rather than my main desktop. Suddenly the new computer (I assembled from my old hardware) started to freeze.
Mouse cannot be moved, nothing can be done except power off or hard reset.

I thought it could be on the HDD which I had for 3 years. Replaced the HDD but nothing changed. Computer works for couple of hours than suddenly freezes. This time I though maybe faulty RAM causes this. Changed the RAM and It was working for couple of days than after same thing. Freezes again..

Could it be my main board?

Now even changed my Mainboard and same xxxx again.. I was really pissed of I as almost changed everything and still I could not figure out what causing the freeze.

I almost gave up as I didn’t have much time to work on it. I work from 9 to 6 than University than other projects so I gave up with it. One Saturday I wanted to fix it and switched the computer on but I had a call so I left the pc and attended the call.

Suddenly I smelled something is burning.

zZZ ZZZ ZzzzzZZZZZZZ surely it came from the assembled computer. I quickly removed the power cable and opened the tower case and seen inside if anything was burning. I couldn’t see anything clearly but I could smell the burn it came from my "power supply". I thought for one second "I have changed almost everything but the power supply" now time to change it.

I had 300W power supply this time I bought a 450W and fixed it.

Now the computer is working perfectly without freezing.

What was the problem?
The computer had low power supply 2 DVD-RW, 2HDD, CPU fan, CASE FAN, NEON Lights. All those stuffs needed more than 300W power. By the time the pc didn’t have further power the PC froze. Probably CPU fan didn’t get power to cool the processor which caused high CPU temperature and standard CPU safety instruction let the processor to freeze rather than exploding.

Only power supply causing this problem?
Nope in my case the Power-supply triggered the freeze. In most cases Power-supply causing this kind of problem. There are also other things that causes same freezing.

Faulty RAM or Mainboard also causes this problem. Most likely power supply and mainboards are invisible in this subject as they don’t give any warning.

If ram is faulty usually BIOS gives you different patterns of beep tone where you can identify if any of your PC components is faulty.
 

After changing my power supply fixed the problem..
 

Windows Live Tags: computer,office,kids,bough,Mouse,Could,Mainboard,ZzzzzZZZZZZZ,cable,CASE,NEON,Lights,processor,temperature,instruction,Nope,Power,cases,Most,subject,BIOS,components,hours,didn
WordPress Tags: computer,office,kids,bough,Mouse,Could,Mainboard,ZzzzzZZZZZZZ,cable,CASE,NEON,Lights,processor,temperature,instruction,Nope,Power,cases,Most,subject,BIOS,components,hours,didn

%d bloggers like this: