Enterprise Software

Build Your Skills: Customize the startup experience with the Startup Folder Manager

Choose which of the applications in the Startup folder you want Windows to launch at startup.

As useful as the Startup folder is, there may be times when you need only some or even none of the applications in the Startup folder, and you'd prefer not to run the rest when Windows launches. Unfortunately, launching applications from the Startup folder is an all-or-nothing deal. By default, Windows runs everything in the Startup folder. You can force Windows to not load anything by holding down the [Shift] key while it’s launching. But wouldn’t it be nice if you could choose which of the applications in the Startup folder you want Windows to launch at startup?

Well, now you can! I’ve combined techniques from VBScript, Windows Script Host, and HTML Applications (HTA) to develop a fully customizable tool that I call the Startup Folder Manager. Once you’ve configured the Startup Folder Manager on a machine, this tool will pop up a dialog box at startup and allow you to select the applications you want to run. You can choose to run all the applications, only certain applications, or none of them. If you don't make a selection within five minutes, the Startup Folder Manager will launch all the applications, just as the Startup folder normally would.

Installing the Startup Folder Manager
The first step is to download the Startup Folder Manager installation package. Once you've downloaded the package, simply double-click the SFM Setup.exe file. When you do, the installation program will prompt you to choose a folder in which to install the application. If the folder doesn’t exist, the installation program will create it for you.

After you install the Startup Folder Manager, you’ll see the following seven files in your folder:
  • 1.cnt
  • 3.cnt
  • 5.cnt
  • Sleeper.vbs
  • StartupConfiguration.hta
  • StartupManager.hta
  • StartupManager.ico

As you'd imagine, the file titled StartupManager.hta is the main application, while the file titled StartupConfiguration.hta is the application that you’ll use to customize the Startup Folder Manager. The StartupManager.ico file provides the Startup Folder Manager with the icon for the control menu and the taskbar. The 1.cnt, 3.cnt, 5.cnt, and Sleeper.vbs files are support files, which I’ll discuss in more detail in a moment.

Preparation
Since the Startup Folder Manager will effectively control the Startup folder and take care of launching all applications, you’ll need to remove the individual shortcuts to all your applications from the Startup folder. The only shortcuts that should remain in the Startup folder are those that launch support applications, such as antivirus software.

At this point, access the folder in which you’ve installed the Startup Folder Manager and right-click the StartupManager.hta file. Then, select the Send To | Desktop (Create Shortcut) command. You can then rename the shortcut, if you want, and move it to the Startup folder on the Start menu.

Configuring the Startup Folder Manager
Once you’ve installed the Startup Folder Manager, the first thing that you’ll want to do is configure it to launch the applications that you normally run from the Startup Folder. To do so, access the folder to which you've installed the Startup Folder Manager and double-click the StartupConfiguration.hta file. When you do, you’ll see the Startup Folder Manager - Configuration Tool window, as shown in Figure A.

Figure A
You’ll use the Startup Folder Manager - Configuration Tool window to select the applications that you want to launch when you start Windows.


Watch your folders
While you can run the StartupManager.hta file from any location, you must run the StartupConfiguration.hta file from the folder in which you installed the Startup Folder Manager’s files. If you don’t, the configuration procedure will fail.

Using the Startup Folder Manager - Configuration Tool is a pretty straightforward procedure. To begin, select a check box, and then type the name of the application in the Application Name text box. You’ll then fill in the Path To Executable File text box. As you can see, the Startup Folder Manager - Configuration Tool contains a Browse button that allows you to locate and select an application’s executable file. When you click this Browse button, the Startup Folder Manager - Configuration Tool accesses an Open dialog box that it borrows from Microsoft Excel. Therefore, in order to use the Browse button, you must have Excel installed on your computer. If you don’t have Excel, you can still use the Startup Folder Manager - Configuration Tool, but you’ll have to manually enter the path to an application’s executable file into the Path To Executable File text box.

Using Excel’s Open dialog box
Unfortunately, Windows Script Host doesn’t provide you with a method for accessing a native Windows Open dialog box. However, Windows Script Host does allow you to automate Microsoft Office applications so you can easily access Excel’s Open dialog box. If you don’t have Microsoft Excel installed on your computer and you click the Browse button, you’ll see an error message. Once you close the error dialog box, you can then manually fill in the Path To Executable File text box.

For example, suppose that you want to add Microsoft Outlook to the Startup Folder Manager. To do so, you’d select a check box, fill in the Application Name text box, and click the Browse button. You’d then see an Open dialog box, like the one shown in Figure B.

Figure B
The Startup Folder Manager - Configuration Tool borrows this dialog box from Microsoft Excel.


You’ll next use the features in the Open dialog box to locate and select Outlook’s executable file. Once you do, just click OK. You’ll then see the Copy/Paste Assistant window shown in Figure C. As instructed, simply press [Ctrl]C and click OK. When you do, the path will be copied from the text box in the Copy/Paste Assistant window to the clipboard and then pasted into the appropriate text box. This little manual intervention is necessary due to the fact that the path must appear in the Path To Executable File text box in order for the HTA to process it correctly, but the scripting features provided by VBScript, Windows Script Host, and HTA offer no way to program the operation.

Figure C
The Copy/Paste Assistant acts as an intermediary between Excel’s Open dialog box and the Startup Folder Manager - Configuration Tool.


You’ll repeat these steps to add your other applications to the Startup Folder Manager - Configuration Tool. For example, the Startup Folder Manager - Configuration Tool might look like the one shown in Figure D after you've added all your applications. Once you’ve finished, click OK.

Figure D
Once you add the first application to the Startup Folder Manager - Configuration Tool, adding others is a snap.


As soon as you click OK in the Startup Folder Manager - Configuration Tool window, a series of events occur in the background, setting the stage for the Startup Folder Manager’s main task. To begin with, the Startup Folder Manager - Configuration Tool creates a master file, All.cfg, which contains a list of names of each application and the corresponding path to that application’s executable file. This file is used to launch all of the applications.

It then creates two files called 2.cnt and 4.cnt that also contain a list of names of each application and the corresponding path to that application’s executable file. These two files are then concatenated with the three files called 1.cnt, 3.cnt, and 5.cnt to create a file called StartupCertain.hta. This file is then used to present you with a list that lets you choose the applications you want to run.

The Startup Folder Manager in action
After you’ve used the Startup Folder Manager - Configuration Tool to add applications to the Startup Folder Manager and then rebooted the system, you’ll see the Startup Folder Manager window, as shown in Figure E.

Figure E
When you boot up Windows, you’ll see the Startup Folder Manager window appear.


Notice that the Startup Folder Manager provides three choices: All, Certain, and None:
  • All—If you want to run all of the applications, just leave the All option selected and click OK. When you do, all the applications that you've selected with the Startup Folder Manager - Configuration Tool will run.
  • Certain—If you want to choose which applications to run, select the Certain option and click OK. When you do, you'll see a secondary Startup Folder Manager window like the one shown in Figure F. Select the check box next to each application that you want to run and click OK.
  • None—If you don't want to run any of the applications, you can just select the None option and click OK.

Figure F
This Startup Folder Manager window lets you choose which applications to run at boot time.


Now, if you turn on your system in the morning and then immediately head to the break room for a cup of coffee, the Startup Folder Manager window will appear on your screen for five minutes. If you aren't back within five minutes, the Startup Folder Manager will automatically launch all the applications.

Behind the scenes
Now that you have a pretty good idea of how the Startup Folder Manager works, let's take a peek behind the scenes. When you select the All option, the Startup Folder Manager opens the All.cfg file and uses the path and executable filename information in that file to launch each application. When you select the Certain option, the Startup Folder Manager launches the StartupCertain.hta, which was created by the Startup Folder Manager - Configuration Tool to let you choose which applications to run. When you select the None option, the Startup Folder Manager simply closes down without performing any operation.

If you don't select any options, the Startup Folder Manager will wait for five minutes before it launches all the applications. The Startup Folder Manager performs this wait operation by creating a dummy file called 0.cfg. This file doesn’t contain any data—it's a flag that indicates whether the user has selected an option and clicked OK. If the user does so, the 0.cfg file is deleted. If the user doesn’t select an option, the 0.cfg file is left alone.

At the same time that Startup Folder Manager creates the 0.cfg file, it also launches Sleeper.vbs script, which (as its name implies) immediately executes the Windows Script Host Sleep command and sleeps for five minutes. After five minutes elapses, the script checks for the existence of the 0.cfg file. If it finds the file, it uses the Windows Script Host SendKeys command to click the OK button, which causes the Startup Folder Manager to launch all the applications.

Other uses
While I designed the Startup Folder Manager to run automatically from the Windows Startup folder when Windows starts, you can use it to simply launch sets of applications that are all related to various tasks or operations. Just use the Startup Folder Manager - Configuration Tool to select a set of applications. Then create a shortcut to the StartupManager.hta, give it an appropriate name, and place it in a convenient location. Or you could create a shortcut to the StartupCertain.hta file and just use that.

If you have other ideas for the Startup Folder Manager, please take a moment to post your comments in this article’s discussion area. You might just give your fellow IT folks an idea or two, and you could prompt further development of the Startup Folder Manager.

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

0 comments

Editor's Picks