Just Great Software

Latest Issue of the Just Great Software Newsletter

February 2017

  1. Updated: DeployMaster 6.0.1
  2. Updated: AceText 3.3.1
  3. Tips & Tricks: Run a Command on Many Files

Updated: DeployMaster 6.0.1

DeployMaster 6.0.1 is now available for download.

DeployMaster 6 is a free minor update. We've numbered it as a major upgrade because it brings some fundamental changes. You should back up your existing installation before upgrading.

The most apparent change in DeployMaster 6 are the new icons. DeployMaster's application icon now scales to all sizes that Windows Explorer can display icons at. The folders and files tree on the Files page in DeployMaster and in the component selection screen in the installer now retrieves folder and file icons from Windows, so they will scale correctly and match the icons the user is used to seeing in Windows Explorer. The toolbar icons have a new flat look of the icons better matches the flat look of Windows 10. DeployMaster includes them in 10 different sizes that cover all the scaling increments from 100% to 400% available in the basic display settings in Windows. DeployMaster can now perfectly scale itself and the installers it generates on all PC and laptop displays, including small laptops with 4K screens.

The icon that you specify on the Project page is now used to replace the icon of the setup.exe. When the user sees your installer in Windows Explorer, they will see this icon. It also appears on the window caption and taskbar button when your installer runs. The icon is no longer displayed it in the lower left and upper right corners of the installer.

Another apparent change is that some of the default labels in the installer have changed. The No-Questions-Asked Installation and Advanced Options Installation buttons, for example, are now labeled Immediate Installation and Advanced Installation. You can still edit all labels on the Language page in DeployMaster. The Print button for the readme file and license agreement now has a text label that you can translate.

The most important change is that DeployMaster 6 can now create user-specific installs without administrator privileges. On the Project page, you can choose whether you want to allow installations for all users, installations for the current user, or both types of installations. There are now two sets of default installation folders. The left hand set is used for installations for all users. The right hand set is used for installations for the current user. All of DeployMaster's features are available for user-specific installs without administrator privileges.

If you enable both types of installations, then an Advanced Installation has a new initial step that shows two buttons labeled install for current user and install for all users to choose the type of installation. The rest of the installation process is unchanged. An Immediate Installation chooses the type of installation automatically. If the installer was forcibly run with administrator privileges or if the user has an account that allows elevation to administrator privileges then the application is installed for all users. Otherwise, the application is installed for the current user only. This way an immediate installation makes use of admin privileges when available, but does not prompt for elevation when the user probably doesn't have the password to an admin account.

If your application is already installed, then both Immediate Installation and Advanced Installation automatically choose the same type of installation. If the existing installation is for all users then administrator rights will be needed. Installations made by installers created with DeployMaster 5.4.0 or earlier are treated as installs for all users.

If one user creates a user-specific installation and then another user runs the installer, then the installer will act as if your application is not installed yet. The second user will then be able to install for themselves as well as install for all users. If the second user installs for all users, the first user will still be able to update or uninstall their user-specific installation.

Because DeployMaster now differentiates between all-user and user-specific installs, it imposes some new restrictions on the folders that you can use. The folders %MYDOCUMENTS%, %APPDATAROOT%, and %LOCALAPPDATAROOT% cannot be used as default folders for all users, and cannot be used on the Files page if you enable the option to install for all users. These folders are user-specific folders and are not (easily) accessible to other users on the same PC. The folders %COMMONDOCUMENTS% and %COMMONAPPDATAROOT% cannot be used as default folders for user-specific installs and cannot be used on the Files page if you enable the option to install for all users. These folders are shared between all users.

The folders %PROGRAMFILES%, %COMMONFILES%, %WINDOWS%, %FONTS%, %SYSTEM%, and %SYSTEMDRIVE% are system folders. They are shared between all users and require admin rights to write to. So you shouldn't use these folders for user-specific installs. DeployMaster will permit you to use them for user-specific installs, however, if you turn on the option to require admin rights for installations for the current user. Doing so is not recommended as it mostly defeats the purpose of allowing user-specific installs. This option is mainly provided to allow you to deal with poor decisions made in the past. If management decides that applications should be installed into %PROGRAMFILES% and that data files should go into %MYDOCUMENTS% because that's the easiest place for the user to find them, then you can accommodate this with DeployMaster 6 by turning off the option to install for all users and turning on the options to install for the current user with admin rights. This combination of options will also allow installations made with DeployMaster 5.4.0 or prior to be upgraded correctly.

There are also new restrictions on registry keys. If you enable installations for all users, then you cannot create registry keys under HKEY_CURRENT_USER because those are only visible to the user performing the installation. If you enable installations for the current user, then you shouldn't create registry keys under HKEY_LOCAL_MACHINE. If you must then you'll need to the option to require admin rights for user-specific installs.

If you enable both types of installations, you can't use either of these root keys. In that situation, create your registry keys under HKEY_AUTO. This is not an actual registry key but a placeholder in DeployMaster that represents HKEY_LOCAL_MACHINE for all-user installs and HKEY_CURRENT_USER for user-specific installs. When your application needs to read keys written by the installer, it should first try to read from HKEY_CURRENT_USER. If that succeeds, it is running from a user-specific install. If that fails, it should read from HKEY_LOCAL_MACHINE. To determine installation folders, create a registry value using placeholders such as %APPFOLDER% or %USERDATA% under HKEY_AUTO.

If your application needs to be installed for all users and also needs keys under HKEY_CURRENT_USER, then you can create those keys under HKEY_USERS. Keys you place there are created for all user accounts. Your application will be able to read them from HKEY_CURRENT_USER regardless of which user is running it. You can also add dummy keys and values under HKEY_USERS if your application creates registry keys when it runs. This will allow the uninstaller to clean up those registry keys for all users.

Keys you add under HKEY_CLASSES_ROOT are created there for installations for all users. They're created under HKEY_CURRENT_USER\Software\Classes for user-specific installs.

If you just want upgrade to DeployMaster 6 and keep your installer working the way it always has, just open your .deploy file in DeployMaster 6 and click the Build button. If you didn't use any user-specific folders or registry keys, you'll be good to go. If you did, switch to the Project page. Turn off "install for all users" and turn on both "install for current user" and "require admin rights". Cut and paste the default installation folders from the left hand side to the right hand side. Then rebuild. Either way, your new installer will correctly upgrade existing installations. If you had to switch to "install for current user", then new installs will create shortcut icons and file associations for the current user only. Since you had to switch because you were using user-specific folders or registry keys, your installation was never really correct for all users anyway. On a PC used by a single person with a single account, that person will not see any difference between an install for all users or an install for the current user with admin rights.

DeployMaster itself can now be installed for the current user without admin privileges. It can still be installed for all users like before. The Advanced Installation now allows you to choose in which folder DeployMaster should place the .language files that are shared between all your installation scripts.

On the Update page, you can now have your installer expire on a specific date or a certain number of days after the release date. This can be useful to prevent prospective customers from making a decision based on an outdated trial version. If you sell software on a subscription basis, you can prevent accidental installs of outdated versions. You can customize the message shown by an expired installer to explain where the user can get the latest version. This feature is intended to prevent the user from wasting their time installing obsolete software. It can be easily bypassed by fiddling with the system clock. If you really need your software to stop working after a certain date, you need to add such protection to the application itself.

Updated: AceText 3.3.1

AceText 3.3.1 is now available for download.

This release fixes one bug. Editing a clip's label with the shift key held down (to enter capital letters) triggered a harmless but annoying access violation error if the folder or collection containing the clip was sorted by clip labels and the edit changed the position of the clip.

The best way to get technical support for AceText is via its built-in forum. You can access it by selecting Help|Forum in the menu in AceText. If your PC is behind a proxy server, you can configure that by clicking the Proxy button in the forum login window. If you enter a password there then AceText now stores the password in encrypted form. If you entered a proxy password with a previous version of AceText, go into the Proxy settings and click OK without changing any settings to have AceText store the same password in encrypted form.

Tips & Tricks: Run a Command on Many Files

This tips & tricks section demonstrates the "file or folder name collect" action type that is new in PowerGREP 5. One usage for it is to create a batch file or script that executes a command on each file in one or more folders.

As an example, assume you purchased some music that you downloaded in FLAC format, for best quality. Now you want to put this music onto a pocket player in MP3 format. You want to use FFmpeg to perform the conversion. This example shows how you can easily create a batch file with PowerGREP that runs FFmpeg on each of your FLAC files to convert it into an MP3 file.

  1. Mark the folder(s) containing the FLAC files in the File Selector.
  2. Enter *.flac into the "include files" box.
  3. Select a file format configuration such as "proprietary formats" that searches through audio files. Though we don't use this ability in this example, PowerGREP recognizes the FLAC file format and can search through metadata in FLAC files. The "audio file meta tags" file format needs to be enabled. Otherwise PowerGREP would skip all FLAC files.
  4. Set "archive formats to search inside" to "None". FFmpeg can't use paths that point to files inside archives.
  5. Start with a fresh action.
  6. Set the action type to "file or folder name collect".
  7. Leave the Search box blank to convert all FLAC files. If you enter a search term, only files containing that search term in their file name will be collected into the batch file.
  8. In the Collect box, enter a command line to FFmpeg. ffmpeg -i "%FILE%" "E:\%FILENAMENOEXT%.mp3" puts all MP3 files into the root of the E:\ drive. If your FLAC files are in a folder structure you can preserve that with path placeholders. If each album has its own folder, use "E:\%FOLDER<1\FILENAMENOEXT%.mp3". If each artist has a folder and each album a folder inside that, use "E:\%PATH<2\FILENAMENOEXT%.mp3".
  9. Set "target file creation" to "save results into a single file" and set "target file location" to the full path to a .bat file for PowerGREP to create.
  10. Set "target file text encoding" to your computer's default code page, which is probably Windows 1252.
  11. Set "target line break style" to "Windows (CR LF)".
  12. Leave "order of matches from different files" set to "no particular order". The order in which the files are converted is irrelevant.
  13. Set the backup options for the .bat file as you like them.
  14. Click the Collect button to create the batch file.
  15. Double-click one of the highlighted matches on the Results panel to open the batch file in PowerGREP's built-in editor to check that everything looks correct.
  16. Open a command prompt from the Windows Start menu and execute the batch file. Or just double-click the batch file in Windows Explorer.

In many situations, you may need to collect some code before and after the block of statements that process all the files. Your script may need a shebang or import statements. Or it may need to do some extra work before and after all the files are processed. You can do this with the "collect headers and footers" checkbox. After turning this on, select "target file header" and enter the block of code that should go before the file statements. Then select "target file footer" to enter the code that should go after the file statements.

 

That's it for this month. Thank you for using our software, and see you next month!

Kind regards,
Jan Goyvaerts

Subscribe to The Just Great Software Newsletter

Email

Please enter your email address below if you wish to receive the Just Great Software Newsletter via email once a month. If you have previously subscribed but your email address has changed, please enter both your old and new email address so we can properly update our database.

Your email address:

If you are resubscribing because your email address has changed, please provide your old address here:

RSS Feed

If you use a news reader, subscribe to the Just Great Software RSS news feed to read newsletter articles as we write them, rather than once per month. You can expect a couple to a handful of articles each month.