Adding an Application to the Startup menu using C#

While creating a windows application, one of the challenges is to make the application run during the Startup menu ie. the application should run as soon as the computer turns on.
In such cases you will have to give a CheckBox in the settings panel of the App that you have created and the CheckBox would say “Run MyApp when Computer Turns On” or something of similar fashion.

There are three methods to do this and they are as follows in the Order of Prefence by developer’s and programmer’s

Three options, in order of preferrence:
1. Add it to the current user’s Startup folder. This requires the least permissions for your app to run, and gives the user the most control and feedback of what’s going on. The down-side is that it’s a little more difficult determining whether to show the checkbox already checked next time they view that screen in your program.
2. Add it to the HKey_Current_User\Software\Microsoft\Windows\CurrentVersion\Run registry key. The only problem here is that it requires write access to the registry, which isn’t always available.
3. Set it up as a windows service. Only do this if you really mean it, and you know for sure you want to run this program for all users on the computer.

Here I will provide solution to the 2nd method
Namespaces Required:

The following is the chunk of code:

Based on the value of ‘blRealTimeScanOn’ your .exe file will be either added or removed from the Startup.

Hope this code was useful.

Getting the list of running Process and its associated Modules

Most of the times when an application which scans the PC will need to do a Quick Scan of your PC. Quick scan can be mostly what the application will process in a small duration of time. Some applications use Appdata to scan as the part of Quick Scan while some applications scan for Program files. However the best and the most efficient way to do a Quick Scan is to scan for the total number of process running in the PC and the list of their respective modules.

The following set of code will show how to get the running Process list as well as their respective module list.

Add the following namespaces

This set of code will show the list of all the process as well as their respective modules.

Note: Make sure you are running your application as administrator.

See the article to run an application as administrator.

Technology Guest Blogs – Quality links Increase your Page Rank

Technology Guest Blog

Link Building is multiple benefits that can boost your blogs or sites, yet often get ignored. Quality Link building is important for search engine optimization. Here are some benefits of link building and give you some tips for increase search engine rank page (SERP).

Create Content Wisely:

Create awesome content that solves people problems and adds value to their lives you will collect curiosity fans. They will link to your blog and they will share your content at the movement. Write, create and publish good content you can.

Inbound Links:

Inbound links to your sites or blogs are the important factor determining the position of your sites pages on SERPs.

Forum signature linking is a best technique used builds an inboundlinks to your websites or blogs. Using forum communities that allow inbound links in a member’s signature. This method can be a fastest build up your inbound link to your websites or blogs.

Quality links bring real people visit to your site. When your link placed on quality sites will also bring significant traffic to your site or blog.

Links are initially hard to get. You have to work hard to get early success and build back links. How to get quality back links? And how do I do? I have quality contents and how to promote them? Softwartipz give you lot of guest bloggers (blogs) to you. Click here and download technology related guest bloggers blogs and E-Mail ID’s. They are accepting your technology related content and promote your sites and you will get huge traffic through your website or blogs.

Note: keep in mind before downloading; Here I am sharing with you a list of best and popular technology guest blogs that will accept your guest posts and it will directly enhance your online presence. Only for technology (computer, software, mobile, internet,hacking, cloud computing..etc) related writers. Anyone travel, real estate, finance, health and food related writers please stop download the excel sheet.

Download Guest Blogs

 

Happy Blogging :)
 

Formatting Bytes to Higher order Bytes in C# – II

The last post was about formatting the Bytes into any desirable format. This post also shares the same but with much less complexity. The chunk of code was created by JLopez
The problem can be found out here
The following is the solution

Hope this set of code was helpful. Using the above set of code the formatting of bytes into any desirable format can be done easily.

Formatting Bytes to Higher order Bytes in C# – I

Ever encountered large number of bytes and the issue of converting them into respective Kilobytes, Megabytes and Gigabytes?

And what could add the frustration when you have to provide them dynamically with changing time?

Here I have a set of code which can be used to convert ‘Bytes’ into ‘KB’,’MB’ and ‘GB’ and the values can be shown upto 2 decimal points. Which in other terms can be said as Formatting bytes dynamically.

Using the above chuck of code one can easily convert ‘Bytes’ into ‘KB’ etc.

Back to Top