How to start Command Prompt at a designated directory

Problem:

There are several utility programs that I need to run on a regular basis, but none of them are registered in GAC.  To run those utilities, I have to open a CMD window, and navigate to the directory where they are located.  It starts getting annoying when I have to type cd “C:\Program Files\ProgramName\Version\bin” (which is the path to the directory where those utilities are stored) every time that I need to run these utilities.  It would be nice if there is a way to set the start-up directory of CMD so that when I start the CMD it navigates to the desired directory automatically.

Solution 1 (not recommended):

One option to do this is to change windows registry.  Actually, I was searching on Google, and found many on-line resources about this.  Here is one talking about  How to change the default startup directory for Command Prompt?

However, as the article has mentioned, there may be risks associated with this method, and it may cause problems when I need to run windows or other regular utility programs, so it is not my favorite solution.  I guess the option may be more suitable in other cases, but not in mine.

Solution 2 (my favorite):

After messing around with the CMD.exe and windows shortcut properties, I finally found a much easier way to do what I needed to do.  Windows shortcuts have an option for “Start in” location which sets the start-up directory of CMD when it is executed.  So, all I needed to do was to create a shortcut on my desktop to CMD.exe, and set its “Start in” location to “C:\Program Files\ProgramName\Version\bin”. (See the screen shot below)

CMD Shortcut Properties

Now, when I launch the shortcut, it starts a regular CMD window and sets the current directory to the right directory (which is “C:\Program Files\ProgramName\Version\bin” in my case).  Easy enough?

CMD

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Microsoft, Miscellaneous | Posted on March 1st, 2011 by Geer | No Comments »

Locating a Test Site – No Dates Found

Being Microsoft Gold Partners we have a strong push to keep ourselves abreast with the latest Microsoft technology offerings. One way we prove our expertise of a given knowledge domain is by taking Microsoft Certification exams. We use Prometric to schedule our Microsoft tests with our local testing center – ICC’s Professional Development Institute (PDI). However, we began noticing that some of the newer Microsoft tests were not available to be scheduled at PDI – forcing us to travel outside our local region.

Prometric would provide this error message when trying to schedule the certification exams – “No Dates Found – We’re sorry. We couldn’t find any Exam Dates based on the selections you’ve made. Please try another Test Center”.

After contacting PDI, we discovered that some testing centers may limit their hours of operation and cannot accommodate the longer testing time slots. In this case, PDI was limiting their tests to 3 hours, yet some of the newer Microsoft exams are 3.5+ hours. Thankfully the testing center was willing to change their testing hours to allow us to keep local – thus saving us travel costs, time, and convenience. Kudos to PDI for their help! Hopefully this will someone else who may have experienced this issue with the Prometric exam scheduling system.

So how long can Microsoft keep us captive in the testing center? According to Microsoft, the maximum test duration is 4 hours. Thank goodness for time limits! Now back to the studying…

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Microsoft, Miscellaneous | Posted on February 28th, 2011 by AaronH | No Comments »

Security Nutshell

I get asked quite often, “What do you do?” Not only am I asked this from my boss but also from family, friends and most importantly potential clients. This is a question that was very difficult for me to answer given the vast areas “security” covers. In fact, a very large security forum I follow just months ago was presented the same question and sparked over 1,300 responses to date. Surprisingly few responses were identical or really even very similar to each other. It is no wonder that security needs are hard to pin down unless a specific reason is presented. With this in mind I decided to answer “What do you do?” with what I believe security for an organization is.

I believe, like other professions, a career in security is a practice, a never ending relentless pursuit of preventing information loss or compromise. It could be occurrences such as fires, disk failure, and the accidental “Reply All:” or due to a person(s) malicious intent. For the most part at this point in my topic, it all will be considered the same term, a risk. Security in an organization has to follow a few unwritten rules to be successful. Clearly defined, Easy to replicate, Effective in cost and implementation as well as being simple during its promotion. Each time I have seen or read of difficult security projects at least one of these items, if not more, were missing.

“Clearly defined security projects”, means that the project or product has a qualitative impact providing quantitative results. The final implementation needs to have observable positive differences to the “techie” and provide measurable results for the “C” levels. This can be the most difficult area to complete. After all, what kind of measurable results does whole disk encryption software provide? If you can’t answer the “measurable” question then the technology either probably doesn’t fit in your environment or there is an issue matching the product to satisfy a need such as compliance.

Easily to replicate security practices are also essential to success. A security practice should be a set of tools that is fed a problem or potential risk and in all of its glory and might turns out a refined lean statute. One that provides quality protection along with the highest possible availability to its consumers. A proper Information Security Management System (ISMS) will provide an organization with a sweet suit set of tools.

Security that is effective in cost and implementation is the make or break deal. Like any other department in a company, a sound future plan with adequate funding will ensure turn by turn navigation to successful projects/products. Security can be like insurance, it is possible to have far too much of it. A solution may seem to be the best fit for an organization, except that cost capping 120% of the security/IT budget it is just not feasible. Speaking of budgets, what is yours? If you can’t answer that, I will follow up with information that will hopefully help you figure that out.

Simple to promote means that you won’t hear that unanimous sigh of discontent moments after clicking send on the email explaining what the solution is. That is not to say that haters aren’t going to hate, because they will. “Another login, no way, I don’t care what it does, I am not doing it.” If the solution is indeed the best fit, every reasonable user will comply and see the value add from the solution. Pre-Sale as much as possible to those that will be effected most and make sure their input is heard and considered. If everyone hates the solution, no matter how great it is, trust me, it will fail.

So “What do I do?” IT Security Solutions. To many of my friends this will still translate to “computer stuff, right?”

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Security | Posted on February 25th, 2011 by CoreyM | No Comments »

Are you afraid of PM?

Most people literally cringe at the thought or even the sound of the words project management.  The reason for this, in my experience, has been a sense of losing control, the fear of someone else taking over your job, and the thought of someone else holding you accountable.  Project managers are not intended to take over another person’s job on the team.  The main goal for the project manager is to get the entire team communicating, find out what is required to complete the project and then constantly monitoring to see if things are actually getting done.  The best project managers will want to understand what work will need to be performed to get the project done and achieve this by asking a lot of questions.  Sometimes this means sitting with a team member to understand what their job is and documenting processes to understand what the workflow is.  Most team members are also just as terrified to hear the words schedule and documentation.  Schedule means that the project manager will want to know what work needs to occur and when it’s going to get done.  Documentation means that processes and work flows will be written down to help determine tasks needed for the schedule, to see where hand-offs should occur, and to view a resource’s workload.  The documentation and schedule can all be updated as things change – none of this is written in stone!  So are there any PM’s that have had similar experiences with teams that don’t want to let you into their project world?  How did you make the team comfortable with letting you in?

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Miscellaneous | Posted on February 24th, 2011 by StaceyC | 2 Comments »

Mobile App for Feature Phones

When talking about mobile applications, most people would assume that they are only for Smartphones. I had the false impression too (or I have never questioned myself for that) until I encountered a practical case at work recently.

The requirement was to allow users to submit some information (mostly in a text format) from their mobile devices to a central data repository for analysis and processing. For data collection, of course, we can build a mobile web application for users who have phones with web browsing capability, or develop a mobile application for Smartphone users to submit the information. However, what about users who only have a regular cell phone which does not have a web browser or internet access at all? Actually, many people are still using “Dumbphones” despite the rapid growth in the Smartphone market. So, we cannot ignore them yet.

So, how can we collect the data from a regular cell phone? Well, since the information that needs to be submitted will be in a text format, can we use SMS (Short Message Services) which is supported by most modern cell phones? Yeah, it would work perfectly as long as users can manually type the data in a text message in INI, CSV or XML format. Well, how hard is that? You have comma, equal sign, angled brackets and all other characters on your cell phone keyboard… For this question, I would have to say that “human” would never do that! Even if they were forced to do it under the pressure from their boss, the data would always be problematic and tricky to handle. By the way, our primary users are kids from middle and high schools. Wait, can’t we start Computer Programming 101 from 5th grade? No, we cannot force students to do that.

So, what if we develop a mobile application which gives users a nice interface to construct the data and submit it through SMS on their regular cell phones? Think about your old phones that you have abandoned for years – didn’t they have apps for calendar, alert, calculator, games and etc. They are just apps that manufactures preloaded on your cell phones. If they can do it, why can’t we? Yeah…? But how?

So, I started googling and came across a company called Tricastmedia who developed TWUIK SDK for mobile app development on a wide range of regular cell phone platforms. The TWUIK SDK would allow you to develop applications targeting non-smartphones. If this works, I can have my cell phone users covered.  However, I had no previous experience with their products, so can’t provide more information here at this moment, but I am very interested in looking into this and will come back on this in my later posts. Ever done anything like this?

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Application Development | Posted on February 14th, 2011 by Geer | No Comments »

Project Management, Part 2

I am relieved to be able to report that I did successfully pass my PMP exam last Friday.  It was a fun and educational process to get back into study mode.  Of course, I never would have passed had it not been for the great support of the PM team here at Pearl Technology helping me study.  A big thank you to Stacey, Emily, and Stephanie for all of the help over the past couple of months.

With this first step complete, I will now focus my efforts on continuing to refine and grow our PMO, methodologies, and project management team.  We have a great team already, and I can see great things in the future for everyone on it.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Miscellaneous | Posted on February 10th, 2011 by JoeK | No Comments »

WPF and MDI

On a current Windows application we made the decision to use Windows Presentation Foundation (WPF) instead of the time-tested Windows Forms.  The main consideration was styling, because seriously, who wants an application that looks like Windows 95?

However, the project required a multiple document interface (MDI), which is not supported in WPF.

After some quick thinking, I decided to try using the Windows Forms MDI while creating the WPF forms as individual WPF User Controls, and embedding them into individual Windows Forms inside the ElementHost control.  Sounds easy, right?  Well actually, it was.  In this example, I’m using Visual Studio 2010.

For example, you have a lookup form containing a textbox for entering a User ID and a button which needs to launch a new form which does a database pull and displays the user’s details.  I know you’re asking: “Why don’t you put the lookup on the same form as the results?”  Well, yes, that sounds more reasonable.  But it doesn’t help me make my example about communicating between WPF forms in the Windows Forms MDI, ok?

In your Windows Forms project, after adding an MDI Parent Form, create two new forms: one called FrmLookup and the other called FrmDetails.

Then, add two new WPF User Controls to your project, called WpfLookup and WpfDetails.  My WpfLookup control (design view) looks something like this:

The WpfDetails control (design view) will look like this:

Add an ElementHost control to each of the forms and set the Hosted Content (or Child) of the control to the appropriate WPF control.  The WPF control will then render in your Windows Form.

So now, it’s time to wire up the events to pass the User ID value from the text box to the details form.  In the WpfLookup control’s code behind, we will add the following code, which instantiates an event which we can see from the FrmLookup and contains the User ID value:

We will need to add a handler for the event in the Load event of FrmLookup.  The handler will call a function to launch the Details form inside the MDI parent form when the OnButtonClicked event is triggered in the WPF control. The code in FrmLookup will look like this:

Now you can use the User ID value passed to the Details form to populate its controls.  I won’t go into how to do that.  I’ll save the WPF data binding for another topic, but at least now you have pretty WPF forms inside a multiple document interface!

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Application Development | Posted on January 28th, 2011 by RobB | No Comments »

Project Management

For years I have acted as everything from developer, architect, manager, project manager, program manager, and morning coffee maker. The last is probably the most appreciated and important job function forced out of necessity because I’m typically in the office by 6:30.

Over the years, though, I have become more and more of a believer in formal Project Management. I am amazed at how many years I spent floundering on projects without a project manager assigned, and it astounds me that many companies are still in that situation. A good project management group within an organization more than pays for itself in reduced costs, errors, rework, and frustration. A common theme with candidates that apply here is that they are tired of working in an environment where there is little to no direction, no real plan, and the chaos that is created when you try to make a group of stubborn programmers work together without someone showing them the path.

So, as a proponent of project management, I have decided to put my money where my mouth is and pursue my PMP, with the ultimate goal of getting my PgMP in a couple of years. The past month of studying the PMBOK guide and talking with the project managers at Pearl Technology have opened my eyes further to the impact that a good project manager can have in all aspects of an organization.

I’ll keep you all informed of my progress. In the mean time, know that Pearl Technology takes project management very seriously and has a staff of highly trained, qualified project managers that we bring into our projects to help ensure their total success.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Application Development | Posted on January 21st, 2011 by JoeK | No Comments »

IE Caching Ajax Requests

On a recent ASP.NET MVC project, we used to our advantage AJAX and latest jQuery.  There were a couple of times Internet Explorer required an extra step to deliver desired results because of the way IE caches web pages.  My fellow developers use Chrome as their preferred browser and up until working with them I had always used Internet Explorer; however, I now know why Chrome is their preferred browser.  One would think that using the most widely used browser for development would yield expected results on a consistent basis.  IE did provide consistent results; consistent in the fact that they were always inconsistent with what I expected.  Chrome (and Firefox) provided zero headaches.

The first scenario occurred after reloading a page via JavaScript using location.reload().  The page displayed messages for a particular user and for each message there was a field indicating if the message had been read or not.  It was an image of a closed envelope (if not read) and an open envelope (if it was read).  The location.reload() was called after a successful AJAX call to update the “IsRead” flag in the database, but the image was not being updated from the closed envelope to the open envelope.  The problem, IE was caching the User Control.  The solution was to use the OutputCacheAttribute class in the System.Web.Mvc namespace.

OutPutCache

The second scenario came about when loading a jQuery modal with a list of items that were sortable.  A Web User Control contained an unordered list of items that was populated from a database table.  When the modal is opened, the items are displayed in an order according to a field in the database table.  After a user sets the desired order the new order is saved and the database field is updated accordingly.  This was working fine, but opening the modal after an update displayed the incorrect order.  The items were still in the same order as before the update.  The solution was to concatenate a random number (via the JavaScript Math object) to what was being loaded so that IE would think it was loading a new page and thus not display the cached version of the list.

jQuery.load()

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Application Development | Posted on January 18th, 2011 by BJ | No Comments »

Microsoft Excel cultural formatting

I have worked extensively with Microsoft Office products for the past several years. Usually
working with MS Access, I’ve written hundreds of queries and countless lines of VBScript. I was
recently assigned the task of upgrading an Excel workbook from 2003 to 2007/2010. Simple, straight-forward
process, right? Well, for the most part, yes. After several days of cell – formula chasing I was
able to resolve all the listed issues and gave the product back to the client for testing. A few more changes
were needed but eventually the client was happy with the finished upgrades.
 A few days later I received an email stating that the workbook would not work for one of the offices.
After looking back through code and testing different data, I was unable to reproduce any errors. I requested
a screen shot of the error message to at least have a starting point to resolve the issue. As I looked at the error message I realized they had left out one vital piece of information. The office was in Venezuela and the error message was in Spanish! After adjusting my local settings, I was now able to reproduce the error message.
The following code was responsible:
With ActiveSheet.ChartObjects(2).Chart.Axes(xlCategory)
    .MinimumScale = 0
    .MaximumScale = Range(”bigx”)
    .MinorUnitIsAuto = False
    bigx = Sheets(”calculations”).Range(”AJ14″)
    If bigx < 14 And big >= 0 Then
    .MajorUnit = (”1″)
    .MinorUnit = (”.5″)             ‘
    ElseIf bigx < 30 And bigx >= 14 Then
    .MajorUnit = (”2″)
    .MinorUnit = (”.5″)             ‘
    ElseIf bigx < 100 And bigx >= 30 Then
    .MajorUnit = (”5″)
    .MinorUnit = (”1″)
    .ScaleType = x1linear
    .DisplayUnit = x1none
    End If
End With

Now Excel is supposed to adjust for cultural differences based on the local settings of the
user and it does for most instances. It successfully adjusts for differences in numeric data
formatting. So why was this code causing an error? Because the data filling the major & minor
units was not numeric data. MinorUnit = (”.5″) in English equal to .MinorUnit = (”,5″) in
Spanish. Trapping the error and adding code to accommodate this situation was simple.
Problem solved. Client happy.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Filed under: Miscellaneous | Posted on January 13th, 2011 by BrianW | No Comments »

Links

Topics

Tags

Authors

Syndication

Archives

Copyright © 2012 Pearl Technology. All rights reserved.
The Tech Blue theme was modified to help create this blog.