How to complete MSI installation #1 before #2 starts (when running multiple installations)

Sometimes it is necessary to run and complete one MSI installation before the next MSI installation starts. This may happens if your software is dependent of some specific prerequisites, also during the installation. One common problem is that one component can not be installed and registered in the system, in a proper way, before some basic components that it needs are installed first. The installation of these basic components must be completed first, otherwise the next installation may fail.

It is possible to create setup packages where one installation is completed before the next one starts, but this can normally be tricky to achieve. But with the new script command MSIEXEC that we have added to Visual Installer, this is very easy done.

The MSIEXEC command is used to install MSI packages and MSIEXEC has a parameter with the name %Wait that is useful when multiple MSI setup packages need to be installed, and they must be installed in a specific order. If you set this parameter to WAIT Visual Installer will pause its own setup process until the installation of the MSI package is completed. Thereafter the installation (for example processing of more script lines) will continue.

Example
Below we will show you an example of how to use the MSIEXEC command.

MSIEXEC

In this example Visual Installer will first install MSI file #1 (MySetup1.msi), waits until the installation of the MSI file is completed, and then install MSI file #2 (MySetup2.msi), and wait until this installation is completed, and then continue the rest of the installation.

(The script command MESSAGE can be used to inform the user what happens during the setup process. If the MSI installations are time consuming it can be a good idea to inform the user that another installation is running for the moment.)

More information about MSIEXEC
For more details about the new MSIEXEC script command, and for more examples of usage, see this tips & tricks page:
> Tip: Run MSI installation from script

See also
> Visual Installer: New script command that handles MSI installations

Visual Installer: How to add a shortcut to an application

If you use Visual Installer to install an application, it is very likely that you want to add a shortcut to Windows’ Program menu, and maybe also to Window’s desktop, that starts the application when the user clicks on the shortcut.

List - Shortcut (icon)

We have published two tips on our tips & tricks pages for Visual Installer that describes how to create a shortcut to a program that is installed with Visual Installer. The first tip explains how to add a shortcut to Window’s Program menu, and the second tip explains how to add a shortcut to the desktop in Windows. Click on the links below to read the tips:

> Tip 1: How to add a shortcut to a program file
> Tip 2: How to create a desktop shortcut

Visual Installer: Where do I handle my setup dialog boxes?

The setup dialog boxes (the setup wizard) is a very important part of an installation. Via these dialog boxes you can give the user important information about the installation and let the user choose for example an installation folder, drive, program group, or ask for a license key or password. The setup dialog boxes are also a good opportunity to give your users a great first impression of your product or your company.

In our installation tool Visual Installer the setup dialog boxes are handled in the Dialog boxes tab of the editor (see the picture below).

Visual Installer

The following tip page will explain for you in detail how to choose setup dialog boxes to an installation, how to add text to the setup dialog boxes and how to change image for the setup dialog boxes. If you are new to Visual Installer we recommend you to read this tip page:

> Setup dialog boxes: How to choose dialog boxes, add text & change image

Video: Getting Started with Visual Installer

We have published a tutorial video on our website that helps you get started with our easy-to-use installation tool Visual Installer. The video shows how to create a basic setup project; for example how to start a new project, how to choose an installation folder for an installation, how to add files and how to specify texts for the installation dialog boxes. The video also shows how to save a project and how to build (compile) a setup package.

Getting Started with Visual Installer

Click here to watch the videoYou can view the tutorial video on this page:
> Getting Started with Visual Installer – Video

The tutorial is also available as text based tip pages. If you prefer the text version of the tutorial, you can go to this webpage:
> Getting Started with Visual Installer

CD-Menu Creator: How to use the Picture Gallery

We have added a new tip to the Tips & Tricks section of our web site. The tip explains how to use the Picture Gallery feature in SamLogic CD-Menu Creator.

The Picture Gallery is a special window that displays all images in a specified folder on a CD, DVD or USB flash drive. It can also be used to play videos.

Click here to read the tip. The tip assumes that you have SamLogic CD-Menu Creator 2014 or later installed in your computer. If not, you can download a trial version of CD-Menu Creator from this download page.

How to use SamLogic’s Windows applications on a Mac

We are often asked about if our programs are available in Mac versions. Even though we have no dedicated Mac versions of our programs, you can still easily use them on a Mac (Macintosh) computer. All you have to do is to install a virtualization software on your Mac that allows you to install and run Windows on it. With help of such virtualization software you can use our programs on a Mac just as you would do it on a PC with Windows. The virtualization software lets you run Windows and Mac OS X on your computer at the same time. This has several other advantages, such as allowing you to copy data between programs running on different operating systems.
SamLogic's Windows applications can also be used on a Mac
There are several available virtualization programs that you can use. Among the best ones are VMware Fusion, Parallels Desktop and Oracle VirtualBox.

Apple has developed its own product called Boot Camp that allows running Windows operating system on a Mac. However, Apple’s Boot Camp requires to reboot your computer when switching between Windows and Mac OS X which it is not very smooth. Boot Camp is included in Mac OS X version 10.5 and later.

To read more about Apple’s Boot Camp and how it is used, click here:
> Using Windows on Mac via Boot Camp

Visual Installer 2014: How to change user interface

In the previous blog post we informed about Visual Installer’s new user interface and the possibility to change visual theme for the user interface. In this blog post we will show how to change visual theme for the user interface.

If you want to change the visual theme for the editor, follow these steps:

1. Start Visual Installer
2. Open the Special menu
3. Choose the Editor options menu item
4. Open the Application window’s style combo box

Application window's style

5. Select the style / theme that you want to use
6. Click OK

Below you can see some samples of the visual themes included in Visual Installer 2014:

STYLE: Theme Silver 1
Theme Silver 1

STYLE: Theme White 1
Theme White 1

STYLE: Theme Blue 1
Theme Blue 1

How to give a standard user write permission to a folder in Program Files

In Windows Vista, Windows 7 and Windows 8 the Program Files folder and the Program Files (x86) folder (and all subfolders beneath) are read-only folders for standard users (users that run programs with standard privileges). This means it is not possible for them to create files or update files in this location of the hard disk. The folders are write-protected. Why these folders are write-protected is explained in this technical article on our website.

The 'Program Files' and 'Program Files (x86)' folder

We sometimes get the question: is it possible to circumvent the write protection and allow also standard users write access to a folder beneath Program Files and Program Files (x86)?

The answer is: Yes, it is possible. You can do it by changing the permission settings for the folder.

This should always be the last resort if you can not find another way. All folders placed in Program Files and Program Files (x86) should be write-protected for standard users, but sometimes this can give problems to older legacy software. In some computers a virtualization system called VirtualStore can solve the problem, but in many computers this is turned off. And then it is impossible to write data to a file. A file can be neither created nor updated.

You should note that it requires a user with administrator rights to change the permission settings for a folder in Program Files and Program Files (x86). A standard user can not change any permissions.

How do I change the permission settings for a folder?
This can be done in different ways. One method is just to right click on the folder in Windows Explorer, choose the Properties menu item, open the Security tab, select the Users item and change permissions for the user.

The 'Properties' dialog box in Windows

Although this is achievable, this is not a user-friendly solution for end-users. Especially not for users that are not so familiar with computers. A much better method is to change the permissions programmatically.

Let the installation program change the permission settings
As mentioned above, the permissions should be changed programmatically, and the best method is to let the installation program change the permission settings. When a software is installed to the Program Files / Program Files (x86) folder, the setup program is always run with administrator rights. This means that the installation program is allowed to change permission settings for a folder. If you try to change the permission settings later, for example when the installed software is running, it is very likely that the software do not have administrator rights. It will very likely only have standard user access rights, and it can therefore not change any permission settings for folders in Program Files / Program Files (x86).

How Visual Installer can handle this
In our setup tool Visual Installer there is a special script command that can be used to change permission settings for a folder. The name of the command is SETPERM, and below you can see an example of how to use the script command:

The 'Execute script commands' dialog box in Visual Installer

%DESTDIR\MyDataFolder is a path to a folder that will have its permissions changed and PERM_ALL tells Visual Installer to give a standard user full access rights to the folder (including write access). Instead of PERM_ALL you can also use PERM_WRITE as a second parameter. PERM_WRITE will give the standard user write access to the folder, but no other permission settings are changed.

%DESTDIR is variable that contains the main destination folder for the installation. If for example the main destination folder is C:\Program Files\SamLogic\My Application, the full path to the folder entered above will be C:\Program Files\SamLogic\My Application\MyDataFolder.

Related information
> How to install files in the correct folder using Visual Installer
> Visual Installer’s Scripting Language

CD-Menu Creator: How to always open a DOC file with Word

It is very common to link a button in a menu created with CD-Menu Creator to a document file. One of the most used formats is DOC files (Microsoft Word documents).

In Windows XP and earlier a DOC file can be opened either with WordPad or Word. WordPad has the benefit to be loaded more quickly than Word, and it is always present in Windows. Microsoft Word is a large application, so in a slow computer it can take some time to load the application, so there may be a significant delay before the document is shown. Other disadvantage is that not all computers have Microsoft Word installed.

However, some Word documents require that they are opened with Microsoft Word. They can not be shown correctly with WordPad. That is the case if the Word document is complex and is advanced formatted. Then the only option is to open it with Microsoft Word.

In CD-Menu Creator you can select a setting that makes sure that the DOC file is always opened with Microsoft Word. The steps below show how to achieve this:

1. Start CD-Menu Creator and open the Buttons (text) tab.
2. Click on the Add Button button. The Add Button dialog box is opened.
3. Enter a button text at Text (button).
4. Select the Show Documents command at Command.
5. Press the “…” button and select a DOC file.
6. Select the Open document with Microsoft Word option.

The 'Add Button' dialog box in CD-Menu Creator

7. Click OK to close the dialog box.
8. Create your menu.

When a user clicks on the button that you just added, the DOC file will always be opened with Microsoft Word. If you want the DOC file to be opened with WordPad in Windows XP or earlier, you can unselect the Open document with Microsoft Word option.

Notes
In Windows Vista or later, WordPad does not support DOC files anymore. So if your end-user for example uses Windows 7, the document will always be opened with Microsoft Word. If Microsoft Word is not installed, CD-Menu Creator will try to open the document with other software that can read Word documents. But if no such a software is installed in the computer, an information message is shown for the user. However, it is very rare that an end-user can not open Word documents. Almost all computers have some kind of software installed that can open Word documents.

How to add an ActiveX control to a Visual C++ 2010 project

In a previous blog post we showed how to add an ActiveX control to a Microsoft Visual Basic 2010 project. In this blog post we will show how to add an ActiveX control to a Microsoft Visual C++ 2010 project. We will also show how to create a variable that can be used to access properties and methods in the ActiveX control.
Twitter
In this step-by-step tip we will use the Twitter control that is included in our SamLogic Social Media Components component library. This control can be used to send tweets to Twitter, and we will show how to add this control to a Visual C++ project. Although this tip will cover Microsoft Visual C++ 2010, the steps in other versions of Visual C++ are very similar.

How to add an ActiveX component to a Visual C++ 2010 project

1. Start Visual Studio 2010 and choose New project in the File menu.

2. Select the MFC Application option in the Visual C++ node in the New project dialog box.

New Project - Visual C++ - MFC Application

3. In the MFC Application Wizard window that is shown, choose Dialog based in the Application Type step. We will create a dialog based Windows application.

4. In the Advanced Features step in the MFC Application Wizard, make sure that the ActiveX controls option is selected.

5. In the last step of the MFC Application Wizard, click on the Finish button.

We have now created a basic Visual C++ / MFC project that uses a dialog based window. Next will show how to add the Twitter ActiveX control to the project:

6. Right-click over the Toolbox window.

7. Select the Choose items menu item in the local menu that is shown.

The 'Choose Items' menu item

8. The Choose Toolbox Items dialog box is now shown. In this dialog box, open the COM Components tab.

9. If you have installed the Twitter component and want to use it, select the SLTwitCtrl control in the list. Otherwise, select the ActiveX component that you want to use.

The 'Choose Toolbox Items' dialog box in Visual C++

10. Click OK to close the dialog box.

11. The selected component should be visible in the Toolbox window; probably in the bottom of the window.

12. Now drag and drop the component on the dialog box.

The Twitter ActiveX control is placed in the dialog box

We have now included an ActiveX component into a Visual C++ 2010 project and put it in a dialog box. We will now show how to create a variable that can be used to access properties and methods in the ActiveX control.

13. Right-click on the ActiveX control in the dialog box window.

The 'Add Variable' menu item

14. Click on the Add Variable menu item in the local menu that is shown.

15. Enter a variable name in the dialog box that is shown, for example: SLTwitterCtrl.

The 'Add Member Varible Variable' dialog box

15. Click Finish to close the dialog box and create the variable

16. We have now created a variable that can be used to access properties and methods in the ActiveX control. The example below shows how to access the AppName property in SamLogic’s Twitter Control (it sets the ActiveX property to “Twitter Test Application”):

Code example - How to access the AppName property in SamLogic's Twitter component in Visual C++

Related Blog Posts
> How to add an ActiveX component to a Visual Basic 2010 project
> How to add an ActiveX component to an Excel 2010 sheet