SmartCAM Technical Bulletin
Licensing fails after upgrading from v16.x to v16.6 or above

Technote 241
Date: Jan 2010
Product: All Applications
Version: 16.6+, Windows Vista or Windows 7

Problem:

This issue only applies to users running Windows Vista and Windows 7.

If after upgrading from an earlier version of SmartCAM v16.x to SmartCAM v16.6+ (or above) you get the following error when trying to run your applications or the License Manager:

The likely cause is a feature in Windows UAC (User Access Control) called File Virtualization or VirtualStore. In certain directories, when a file is modified by a Windows account user without proper Write and Modify permissions on the files and folders, the file is not directly modified. Instead it is copied to a VirtualStore directory in the current user's HOME directory and the copy of the file is changed.

When a file that has been copied to VirtualStore is accessed, Windows redirects the access from the local copy of the file to the copy in the VirtualStore directory.

File Virtualization (VirtualStore) is partially controlled by an embedded parameters file called a manifest file. Starting in SmartCAM v16.6 the application manifest files include additional standard settings. These settings affect how VirtualStore functions.

Recent SmartCAM versions (greater than v16.5) use a manifest setting that disables most file redirection under VirtualStore. Therefore, when a user tries to run SmartCAM, without having sufficient permissions, instead of redirecting the accessed file to VirtualStore and running it from there. It instead returns a permissions error to the application. This error is what triggers the 501 error shown above.

Solution:

The primary cause for this issue is that the current Windows login does not have full Read/Write/Modify permissions on the file or folder being accessed.

File permissions have changed in Vista and Windows 7 from previous versions. Previous Windows versions would use the highest available permissions when accessing files. So if a Windows login belonged to both the Users and Administrators group, it would be the full access Administrators group permissions that were used.

Windows Vista and Windows 7 now use a lowest level of permissions process. So if a user belongs to both Users and Administrators groups, unless specifically forced, Windows will use the User level permissions to access the file, not Administrator. User level permissions, on your system, may not have full Read/Write/Modify permissions.

To resolve this issue do:

There are a couple of ways to handle this issue: modify the permissions on the SmartCAM files and folders. Or, uninstall SmartCAM and reinstall in a new location that is not under VirtualStore control. There are a couple of other options, but the above two are the most likely to be used.

Modify File/Folder Permissions

You may need your Administrator's password to handle this work. If possible, have your IT department make this change for you.

Note: This is the recommended approach for SmartCAM v17.0.

SmartCAM needs full read/write/modify permissions on its files and folders. We will assume you have installed using the default paths. The default paths are:

SmartCAM v16.x:

  • Program Files: \Program Files\SmartCAM\SmartCAMv16
  • User Files: \Program Files\SmartCAM\SmartCAMv16\SCUSER
  • Temp Directory: \Program Files\SmartCAM\SmartCAMv16\TEMP

SmartCAM v17.x:

  • Program Files: \Program Files\SmartCAM\SmartCAMv17
  • User Files: \ProgramData\SmartCAM\SmartCAMv17\SCUSER
  • Common Files: \ProgramData\SmartCAM\SmartCAMv17\
  • Temp Directory: \ProgramData\SmartCAM\SmartCAMv17\TEMP

See Technical Bulletin 244: How Do I Find My INI Files for more information on locating your INI file path.

\ProgramData\ was introduced with Microsoft Vista and continued in Windows 7 as the default path for common application files. However, on some systems it may be mapped to other paths; the common alternative paths for this are: \Documents and Settings\AllUsers\, \My Documents\AllUsers\, and \Users\AllUsers\.

On 64-bit versions of Windows, the \Program Files\ path will be \Program Files (x86)\.

Verify your paths by finding and opening your SmartCAM "smartcamcnc.ini" file. Locate the [Defaults] section. The following INI keys contain your current SmartCAM paths:

  • Program Files: SmartCAMPath=...
  • User Files: CFGPath=...
  • Temp Directory: temp_dir=...

Modify each of these paths and all of the files and folders within each, so that the User account group contains full Read/Write/Modify permissions. You can also use the Full Control option (which amounts to the same thing).

Briefly the process for doing this is:

  1. Open a Windows Explorer
  2. Change to your SmartCAM Program Files path
  3. Right-click on the SmartCAM folder in the left-side tree view of the Windows Explorer
  4. Select "Properties" from the pop-up menu.
  5. Select the "Security" tab. This tab shows the list of "Group or user names& and below that a list of permissions in the "Permissions for ..." list.
  6. Use the Edit button to edit the Security properties for the given folder. This opens a Permissions dialog.
  7. Pick the Group to edit in the top list, this should be Users and/or Authenticated Users.
  8. Enter the permissions in the window below. Should include Modify, Read and Execute, List folder contents, Read, and Write. Can also use the Full Control setting which enables everything.
  9. After setting your permissions, use the Apply button. Then OK to close the dialog.

Follow the above procedure for all of your SmartCAM paths.

Note: There are some utilities available for download on the internet that may assist in taking ownership of files and folders. You can search for and download these utilities from your internet browser. The following keywords may be useful: "windows file ownership utility". We recommend you have your IT staff handle this task, as there may be damaging utilities returned in the search results. Make sure your anti-virus and internet protections are running when browsing these pages. Run a virus scan on the downloaded utility before and after installing it.

After setting permissions you need to move all your SmartCAM files from VirtualStore back into your SmartCAM Program Files tree. Before moving the files from VirtualStore back into your regular SmartCAM directory, make a copy of your User Files directory. This way if any of the files in VirtualStore are not the most recent copies you can get the recent copy from the SCUSER backup directory.

The VirtualStore path is usually: \users\windows login account name\AppData\Local\VirtualStore\. The AppData folder is often a hidden folder. You may not see it in the \users\windows login account\ folder, but it should be there. Add this part of the path manually by clicking on the path at the top of the Explorer window and adding the missing AppData folder.

Once in VirtualStore the remainder of the tree should mimic the Program Files\ and ProgramData\ path and subfolders. Change in to the Program Files, Program Files (x86), and/or ProgramData folders, under VirtualStore and look for SmartCAM folders. If found, move all the files from this tree back in to the actual SmartCAM directory tree.

After moving all the files, delete any SmartCAM folders from the VirtualStore folder.

Try running your application again.

Reinstall in new Path

Not all Windows folders use file virtualization. Another solution for this issue is to uninstall your SmartCAM applications and use a Custom installation to install them in a different path.

Note: For SmartCAM v17.x installations, on Windows Vista or Windows 7, installed using the default path selections, we do not recommend this option. The default paths used by the installer are based on recommendations from Microsoft. Changing the paths may have unintended consequences when Microsoft makes updates to the operating system; such as service packs. It is very likely changing the paths will have zero consequences, however, it is not possible to predict future operating system changes.

To reinstall SmartCAM v16.x do:

  1. Use "Programs and Features" control panel and uninstall all of your SmartCAM applications.
  2. Reinstall your first SmartCAM application, when prompted for Setup Type select Custom.

    You will be prompted for several pieces of information, accept the defaults except when being prompted for path information.

    When prompted for path information do not use any paths that are in the \Program Files directory tree. Instead install into a new directory tree that is not part of Program Files. Examples:

    • Program Files: C:\SmartCAM\SmartCAMv16
    • User Files: C:\SmartCAM\SmartCAMv16\SCUSER
    • Temp Directory: C:\SmartCAM\SmartCAMv16\Temp

  3. After installing the first application install all remaining applications. The first reinstallation establishes the new SmartCAM directory tree, so you should not need to do Custom installations any longer.

To reinstall SmartCAM v17.x do:

  1. Use "Programs and Features" control panel and uninstall all of your SmartCAM applications.
  2. Reinstall your first SmartCAM application, when prompted for Setup Type select Custom.

    You will be prompted for several pieces of information, accept the defaults except when being prompted for path information.

    When prompted for path information change the following paths. Instead install into a new directory tree that is not part of ProgramData. Examples:

    • Program Files: C:\Program Files\SmartCAM\SmartCAMv17 (this is the default path, keep it)
    • User Files: C:\SmartCAM\SmartCAMv17\SCUSER
    • Common Files: C:\SmartCAM\SmartCAMv17\
    • Temp Directory: C:\SmartCAM\SmartCAMv17\Temp

  3. After installing the first application install all remaining applications. The first reinstallation establishes the new SmartCAM directory tree, so you should not need to do Custom installations any longer.

After reinstalling your applications, you will need to pull your SmartCAM license file out of VirtualStore and put it into your new SmartCAM tree.

The VirtualStore path is usually: \users\windows login account name\AppData\Local\VirtualStore\. The AppData folder is often a hidden folder. You may not see it in the \users\windows login account\ folder, but it should be there. Add this part of the path manually by clicking on the path at the top of the Explorer window and adding the missing AppData folder.

Once in VirtualStore the remainder of the tree should mimic the "Program Files\path", "ProgramData\" and subfolders. Change in to the "Program Files", "Program Files (x86)", or "ProgramData" folders, under VirtualStore and look for SmartCAM folders. Find the SmartCAM\SmartCAMv17\SCUSER folder. Copy the "SmartCAMcnc.lic" file from this folder to your new SCUSER folder in the area where you installed your applications.

Try your applications. Once you have verified that they are all working and that they are complete, change into the VirtualStore folder and remove any SmartCAM folders or files.

Related Information:

  1. Microsoft Support: Common file and registry virtualization issues in Windows Vista or in Windows 7
  2. MSDN: New UAC Technologies for Windows Vista
  3. TechNote Magazine: Inside Windows Vista User Access Control
  4. MSDN: Manifest Files Reference