Blog Posts by KentD

Ask a question

Why I hate installations created in Visual Basic

Conflicts are not always as easy as two files with different versions, size or date. A less often encountered conflict involves two files installed in the same directory, but with different GUIDs. This problem is not usually discovered until on of the applications is uninstalled, breaking the remaining application.

I am working with a department that at one time called on a VB 6 developer to build a number of queries. He did a great job with a nice interface, a drop down pick list that covered all the options, and it returned formatted data. The problem was that each time he compiled an application, the GUIDs were regenerated for the same files. He did this 7 times, and when one of the applications was uninstalled, 30 people were sitting on their hands wondering what went wrong with their PC. Finding the source of the problem after the fact takes a considerable amount of detective work. If these applications were repackaged and run through a Conflict Manager Database this type of problem could have been addressed long before it cause a departmental outage. Even without a good Conflict Manager tool, there are some things to look for, if you know where to look. Below is a little background information that may help.

Within Visual Basic 6, there is a "Microsoft Packaging and Deployment Wizard". Like all Wizards it simplifies a complex task into a few Windows that all you need do is click 'Next' to create a standard installation and screw up as many desktops as you like. Take a look the "Setup.lst" file that is generated by the Wizard. The Setup.lst file describes all the files that must be installed on the machine for the application.

There are five sections to the Setup.lst file:

The BootStrap section — lists the core information about the application, such as the name of the main setup program for the application, the temporary directory to use during the installation process, and the text in the startup window that appears during installation.

The BootStrap Files section — lists all files required by the main installation file. Normally, this includes just the Visual Basic run-time files.

The Setup1 Files section — lists all other files required by your application, such as .exe files, data, and text.

The Setup section — contains information needed by other files in the application.

The Icon Groups section — contains information about the groups your installation process will create. Each member of this section has a correlating section containing the icons to be created in that group.

The Setup1 section lists all other dependencies and any other files that have been added to the Setup package. It's the Setup1 section that usually produces errors like this one because the files versions and dates are fixed as of the date the installation was built and the versions of files on the developers workstation.

If you are not sure about what the dll is for or what the correct version is, go to http://support.microsoft.com/dllhelp

(if this site isn't on your favorites list add it).

Translating a SETUP.LST file created with the P&D wizard

The Setup1 Files section contains all the other files required by your application, such as your .exe file, data, text, and dependencies. The setup program installs these files after it installs the core files listed in the Bootstrap Files section.

The following example shows entries in a typical Setup1 Files section:

[Setup1 Files]

File1=@LotsAControls.exe,$(AppPath),$(EXESelfRegister),,1/26/98 3:43:48 PM,7168,1.0.0.0

File2=@mscomctl.ocx,$(AppPath),$(DLLSelfRegister),,1/23/98 9:43:40 AM,1011472,6.0.80.23

Filex= file,install,path,register,shared,date,size[,version]

Filex - A keyword that must appear at the beginning of each line. X is a sequence number, starting at 1 in each section and moving in ascending order. You cannot skip values.

File - The name of the file as it will appear after installation on the user's computer. This is usually the same as the Install argument. If you want this file to be extracted from a cab, place an @ at the beginning of the name (for example, @my.exe).

Install - The name of the file as it appears on any distribution media.

Path - The directory to which the file should be installed. Either an actual directory path, a macro indicating a user-specified path, or a combination of the two. See "Path Argument Macros in Setup.lst Files" later in this chapter for more information on the available macros.

Register - A key that indicates how the file is to be included in the user's system registry.

Shared - Specifies that the file should be installed as shared.

Date - The last date on which the file was modified, as it would appear in Windows Explorer. This information helps you to verify that you have the correct versions of the files on the setup disks.

Size - The file size as it would appear in Windows Explorer. The setup program uses this information to calculate how much disk space your application requires on the user's machine.

Version - An optional internal version number of the file. Note that this is not necessarily the same number as the display version number you see by checking the file's properties.

Translating the VB constants/flags:

$(AppPath) - {app} constant

$(WinSysPathSysFile) - {sys} constant

$(WinSysPath) - {sys} constant

$(DLLSelfRegister) - regserver flag

$(Shared) - sharedfile flag

$(TLBRegister) - regtypelib flag

$(MSDAOPath) - {dao} constant

$(EXESelfRegister) -use the [Run] section

for "MyApp.exe /RegServer"

use the [UninstallRun] section

for "Myapp.exe /UnregServer"

For more information on this subject see

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconmanuallycreatingsetuplstfile.asp

Be the first to comment

Fun with Validation Errors

Create your own (and fix) a Validation Error.

Here is how - Go to Installation Expert \ Add/Remove Programs. Add an Icon to the application uninstall. Choose a '.exe' or 'dll' in the installation and a icon within the exe. This action will create a new Component in the installation. Save and compile your application.

Run a validation test and you will get the following error. This is how

the Validation Error reads;

“Mismatched component reference. Entry 'registry1' of the Registry table belongs to component 'registry1'. However, the formatted string in column 'Value' references file 'GmacRfcPro.exe' which belongs to component 'GmacRfcPro.exe'. Components belong to different features ice69.html Registry Value registry1”

In my example, the icon I choose to use is from and executable called GmacRfcPro.exe, and it created a new Component called “Registry1”.

Here is what the manual has to say about the error -

ICE69

ICE69 checks that all substrings of the form [$componentkey] within a formatted string do not cross-reference components. A cross-component reference occurs when the [$componentkey] property of a formatted string refers to a component other than the component stored in the Component_ column of your tables.

Problems with cross-component referencing arise from the way formatted strings are evaluated. If the component referenced with the [$componentkey] property is already installed and is not being changed during the current installation (for example, being reinstalled, moved to source, and so forth), the expression [$componentkey] evaluates to null, because the action state of the component in [$componentkey] is null. Similar problems can occur during upgrade and repair operations.

Result

ICE69 returns an error if a [$componentkey] substring within a formatted string cross-references a component in another feature. ICE69 returns a warning if a [$componentkey] substring within a formatted string cross-references a component in the same feature.

(The FeatureComponents

table is used to determine this mapping. It must map to the same feature for the warning. Referencing components in parent features or referencing components in child features is considered to be an error.) ICE69 reports an error if the [#FileKey] substring within a formatted string references a file that is not present in the File

table.

Step 1

Reread the error as -

Mismatched component reference.

Entry 'registry1' of the Registry table belongs to component

'registry1'.

However, the formatted string in column 'Value' references file

'GmacRfcPro.exe' which belongs to component 'GmacRfcPro.exe'.

Components belong to different features .

ice69.html Registry Value registry1

Evaluation: ICE69

Step 2

go to Setup Editor

go to the Tables Tab

go to the Registry Table.

Check out the Registry1 entry.

Step 3 - Check out the Value Column

the value in my case = [#GmacRfcPro.exe],0

The Registry Key in question was created when I added a Icon 0 to the

Add/Remove Program List. (Installation Expert \ Add/Remove Programs)

It created it's own Feature for the Registry Key called Registry1.

Solution

go to Setup Editor

go to Components

Move the contents of Registry Entries from the "Registry 1" Component

to the "GmacRFCPro.exe" component.

Delete the Registry1 component -

If you don't Delete the old "Registry1" component, you will get the error

below when you rerun the Validation test. That is why you need to run the

test a second time to see that your fix did not create more problems than

you fixed.

Registry: 'registry1' cannot be the key registry key for Component:

'registry1'.

The RegKey belongs to Component: 'GmacRfcPro.exe' ice02.html Component

KeyPath registry1

Evaluation: ICE02

Save Recompile and rerun, the Validation test

Read the error as phrases. The error is complied from a log which doesnÂ’t extract full sentences. Check the manual for clues. Backup your project, and change one thing at a time, save, and test again.

Be the first to comment

TWO packages a day

I know I'm walking into a mine field, but just want to hear what you guys think? I'm talking to a firm that wants to bring in two packagers to pump out 250 applications to "no established standards" Utilizing Wise 7.x. They expect us to "Hit the ground running" and push out TWO packages a day. It's very obvious they have never done this before and somebody thinks packaging is a piece of cake.

Not sure if they are using scripted wrappers, active directory, or SMS to deploy the applications. Roughly 5,000 PC's

Without the four letter words, what would you tell the project manager at this hospital?

Be the first to comment

From a contractors perspective

I just went through a phone screen with a TEK systems recruiter who treated me like this was my first job. I'm pretty sure it was his. Thought I would share this email I sent him to see how many agree.

As the contract I am currently working on comes to an end, I spend at a minimum 30 minutes everyday searching Dice.com and other sites for my next assignment.

I read the job descriptions posted carefully to see how many agencies are posting for the same position. The job descriptions may very considerably. Only by reading multiple descriptions I can get an idea on whether this will be a good fit or not. That’s the most important objective at this stage. I don’t want to 1) get into an assignment that’s over my head, 2) get involved with a company that doesn’t know what they are doing, or 3) get involved with a small time contracting company that may be a sub-contractor’s sub-contractor.

If the add is full of technical garbage I move on. I don’t understand why contracting companies insist on rewriting a technical job description that they know nothing about.

Once I think this opportunity may be a go I pick up the phone and talk to the contracting company. A couple of rules here:

If I don’t get a live body responding to my voice messages in two days I move on to the next contracting company.

If I’m speaking to someone overseas through a poor internet phone service, I hang up.

If the recruiter talks down to me during the first call it’s a very good indication what that company thinks of their contractors. I move onto the next company.

I don’t expect the recruiter to know more about the technology than me. When a recruiter attempts to screen me with a few technical buzz words, it’s generally an insult to my intelligence. I work very hard and spend a great deal of money trying to keep up with the technology I specialize in. My resume and the technical screen by the client should speak for itself. If the recruiter talks down to me or treats me like this is my first job out of college I’m going to push back hard.

I expect to provide a current resume, and references. Normally the references are to verify that I can work well with others and know the technology.

I expect that a background test of some type will be done, and I expect that drug tests may be required. I’ve worked on assignments with contractors who didn’t show up for work, or quickly showed that the technology was way over their head. It’s embarrassing to all concerned, and they are usually walked out of the building very quickly.

I expect to discuss rates at this point although not specific, but ballpark numbers. I know that it is the recruiter’s job to bill the client as much as they can and pay me as little as they think they can get away with.

I expect a low ball offer. If it’s too low I will hang up. I was offered $35 an hour from a bank in downtown Chicago a few months ago. End of story.

Rates are a touchy subject amongst contractors. I know Tek System’s contract specifically states that I am not to discuss rates with other contractors, but somehow it always comes up. Not specifics but enough information is shared so that you know if you are the fool who accepted the low ball offer. If it’s me, I start posting my resume that day and leave as soon as an offer is in hand. In eight years as a contractor I’ve only left two contracts before they were scheduled to end and both were because I felt I was being paid less than what I was worth.

After this initial screen, I expect a phone screen or face to face interview with the client. This is my opportunity to talk with the technical staff to see if they have an idea how they are going to deploy my talents. I’ve walked away from a number of offers because I didn’t want to get into the middle of a technical pissing contest on how to implement the technology.

If things don’t work out I expect to be told that as soon as the contracting company becomes aware of it. If I hear nothing in a couple of days I’m looking for another assignment. I also make note of that recruiters name. I know things move very fast, but it’s just common courtesy and an indication of how the firm treats their contractors.

If an offer is forth coming and if the recruiter starts changing the rates dramatically I will push back. After all this effort this is not the point to low ball a candidate, but I’m surprised at how often it happens.

After the paperwork is done I expect to hear little from the contracting firm until they notify me of my end date. I will do my best to get the job done. Other than a reminder to get a time sheet in, all I expect of the contracting company is to insure that I get paid on time. Nothing will sour a relationship faster than me having to call and ask where my pay check is. It turns from a working relationship to one of debtor and creditor. On the assignment I’m currently on I was hours away from walking out the door because they hadn’t paid be after 6 weeks of work.

With a minimal amount of instructions I get to work at the client’s site. I provide my own office supplies. I’m invited to very few meetings. I don’t get invited to lunches and there won’t be much interaction with the staff. Other than the people I will have direct contact with I’m not introduced to many people who work there. I am not aware of the organizational chart nor do I have a place on it. I have no supervisor or manger nor am I aware of the individual’s titles in my environment.

Most often I work isolated, in a lab with multiple PC’s off the company’s network. I’m usually provided an email account and share a phone. I’m expected to arrive and leave on time, sit down and get to work. I’m a disposal employee that can be walked out the door if I don’t complete the work assigned to me, if the budget evaporates, if the project gets done sooner than expected, or if somebody doesn’t like the color of shirt I’m wearing.

Only on rare occasions is my opinion asked in the first couple of weeks. I only give my opinion with forethought of how it will be received. Even though I may be 100% technically correct, if I upset the wrong person and I run the very real risk of getting walked out the door. I’m surprised at how often someone attempts to draw me into departmental political in fighting.

This is a short term relationship treat all with respect and hopefully some good will come of it.

Be the first to comment

Who are you working for?

There are three types of contracting companies. The first knows the skills you bring to the job are their source of their revenue. They appreciate your efforts to make them and yourself look good. They work with you, knowing that after this assignment they may be able to place you at another. These are the larger firms. Their training in getting the most out of the client and giving you the least may appear adversarial but “it’s only business”.

The seconds’ primary concern is with their relationship with the client. This project is one of many they hope to land with this client. You’re nothing more than a “Resource” in this project plan. Don’t bother asking for intervention with concerns you have with the client. You won’t get any help. Don’t bother trying to contact anybody at this firm on a nice summer day. They’re playing golf with a client.

The third is becoming more popular as ‘Start-Up’ contracting companies offer clients lower rates. Their primary concern is their margin. Either through a relationship with the client or primary contractor they have an opportunity to fill an open position. If you’re the resource they are looking for, watch your back because you’re on your own. They will try transfer all business risks to you. If they are getting paid by the client every 30 days, it could be 60 days before you see your first pay check. If the client won’t pay for your travel expenses for a face to face interview, it’s going to come out of your pocket. They are not governed by any corporate standards or best practices. This means that what ever they want goes in their mind. They don’t have the resources to afford a lawyer so make sure you have one when they ask you to sign a contract.

My last two assignments have been with ‘Start-up’ firms. I have had to pay for travel expenses, beg for pay checks, been given contracts assembled from a web site and even have had a pay check bounce! My advice is to know who you’re dealing with. Read and understand the employment contract. If you have a gut feeling that you could come out of the deal on the short end, walk away.

Kent

Be the first to comment
Showing 1 - 5 of 5 results

Top Contributors

Talk About Server Management