AutoDutyPRO

  home | help | dashboard | my tickets | contact us | login
Help Center


Q&A Directory
    Error Messages
 
        "AutoDutyPRO for Windows 4.0 has stopped working", "application failed to initialize"
        On startup, AutoDutyPRO displays "Unable to create directory"
        When I start AutoDutyPRO, I am getting ACCESS DENIED errors
        What do the various 'machnm1.exe' errors mean? Can I stop them?
        Stream Write errors when calculating duty rosters
 

On startup, AutoDutyPRO displays "Unable to create directory"
 
As recent as April, 2013, AutoDutyPRO Technical Support is getting increasing reports of the "Unable to create directory" error message being displayed when the program is first started.

Once this message appears, clicking the OK button clears the error message; however, AutoDutyPRO will not operate at all.

How it is triggered
When AutoDutyPRO starts up, it checks for the existence of data files in the end-user's %appdata% and Documents folders. If the AutoDutyPRO folder (and subfolders) do not exist, it attempts to create those.

AutoDutyPRO uses established Microsoft standards and recommendations to retrieve the location of these files from the Windows registry, and to then create and store AutoDutyPRO data in those folders. This error is triggered when AutoDutyPRO has been unable to determine the current user's AutoDutyPRO data folder and/or Documents folder from the registry; because it doesn't know where to create the data on the computer, any attempts to use the program would not work and the error message is displayed.

The code in AutoDutyPRO to retrieve the location of these folders and then create the missing folders has not changed in years. What has changed at most military locations, however, is how AutoDutyPRO is being deployed to the machines.

More posts are using Microsoft's SCCM software to deploy AutoDutyPRO packages; in some of these package configurations, a registry key entry is missing which then causes this error to trigger.

Initially, we might only see this error when an administrator runs the program the initial time to register; however, it is becoming more common even with standard users.

In each case, whomever the current user is at the time (admin or non-admin), one or two registry key entries are missing.

Solution
There is essentially one solution: create the missing registry key entries. There are two approaches:

1. Approach #1
If SCCM is being used to deploy AutoDutyPRO, modify the SCCM package to create the missing registry key entries under the HKEY_CURRENT_USER hive. This solution requires the AutoDutyPRO SCCM package to be modified, rebuilt, and then redeployed.

2. Approach #2
Manually create the missing registry key entries under the HKEY_CURRENT_USER hive.

If only the administrator-level access is getting this error during the activation process, logging in as the administrator and manually creating the registry key is sufficient.

If non-administrative users are getting this error message, the normal user should log in but administrator credentials may be required when manually creating the missing registry key entry.

For each approach, the information to be added is:

1. Ensure the following key exists in the registry:
HKEY_CURRENT_USER\Software\First Shirt Software\AutoDutyPRO\4.2

2. Ensure a string data value (REG_SZ) exists in the key from Step 1:
DataDir

3. Ensure the string data value is set to the current user's Roaming folder, with 'AutoDutyPRO' appended to the end:
C:\Users\[username]\AppData\Roaming\AutoDutyPRO

[username] refers to the current user's folder as indicated in C:\Users.

For step 3, the Roaming path value can be determined from the environmental variable %appdata%; i.e., click on the Windows Start orb, and type in %appdata% in the search box and press enter.

Windows will open an explorer window into the current user's Roaming folder. You can right-click the path at the top of the window, choose the 'Copy address as text' option, and paste into the DataDir string value. Don't forget to add '\AutoDutyPRO' to the end of the pasted text!

Once this registry key entry has been created, the current user should be able to run AutoDutyPRO as expected. If more than one user on the machine is experiencing this error, these steps will need to be followed for each user; i.e., each user logs in and the missing registry entry is added to their HKEY_CURRENT_USER hive.

If the issue still continues, it may be necessary to add a second registry key:

4. Ensure the following key exists in the registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

5. Ensure a string data value (REG_SZ) exists in the key from Step 4:
Personal

6. Ensure the string data value is set to the current user's Documents folder
C:\Users\[username]\Documents

[username] refers to the current user's folder as indicated in C:\Users.

For step 6, the path value can be determined from the environmental variable %userprofile%; i.e., click on the Windows Start orb, and type in %userprofile% in the search box and press enter.

Windows will open an explorer window into the current user's folder. Double-click on Documents, and then you can right-click the path at the top of the window, choose the 'Copy address as text' option, and paste into the Personal string value.

Once this registry key entry has been created, the current user should be able to run AutoDutyPRO as expected. If more than one user on the machine is experiencing this error, these steps will need to be followed for each user; i.e., each user logs in and the missing registry entry is added to their HKEY_CURRENT_USER hive.


If the solutions above do not resolve the issue, or you have a different solution that works for you, please let us know so we can update our technical notes and help others who may have this issue.