Exercise 2

In our second exercise, we use the SWV Admin tool to create a virtual software archive (. Xpf file) for the pdf2cad MSI package. pdf2cad is a small application that converts a standard PDF document into a CAD object. This MSI installation requires a reboot at the end of the installation, so we will look at the most popular activities around the use of a restart at a film production and apply them accordingly during this packaging. Precisely because this is an MSI file, try to be that we create as SWV package, we want to make sure that we follow in practice the most common method of installing non-advertised shortcuts, we put this in our film. This goes against the installed by the MSI advertised shortcuts.

 

  • 1.   First we create a transcript of the MSI installation using the SWV Admin Tools.

  • 2.   After Sarten SWV Admin click File -> Create layer

  • 3.   Make sure that the radio button "install application" is checked and click "Next".

  • 4.   For the layer name they enter pdf2cad and click "Next".

  • 5.   In contrast to Exercise 1, we will specify the command line for pdf2cad directly. We also want to prepare this package to "streaming", by creating a special command line to disable the "Advertised Shortcuts".

    Tap please enter the following:
    a)    Programmname:    C:\Windows\System32\msiexec.exe
    b)    Parameter:        /i „<Pfad zur MSI Installationsdatei>\pdf2cad 6.8.msi“ DISABLEADVTSHORTCUTS=1

 

  • 6.   To start click on "Next" and then "Finish" to the recording of the installation.

  • 7.   Apply it during pdf2cad installation all default settings and then click "Finish" in the last dialog box.
  • 8.   After installation is complete you will be asked whether they want to perform a reboot.
    In the following it is important to treat these restart query properly within the meaning of virtualization process to ensure all information and accurate data to the read-only layer.
    First it is important to cancel the reboot, so "no" to say
    .


  • 9.   Subsequently, the layer must be disabled so that it can be further processed.


    Typically, there are 4 reasons why an installation requires a reboot:

 

a)   The installation has installed a driver that is written into memory at boot time must.


b)    The installation has tried to write files, but they were in use at runtime.
Since SWV writes during a new installation files into a blank layer (installation redirection), it may not happen in theory, that a file should be overwritten, which is now in use. This may not be in our example of the reason for the need of a computer restart
.

c)    The developer of the installation may have decided that it would be easier some things, such as the launch of services to be performed by a forced restart at the end of the installation. SWV can with pre-activation events, such as the ramp-up of services or performance of "Run" and / or "Run" events around (these actions shall be in front of a layer activation performed) unless such conditions are no reason to perform a computer restart.

d)    Sometimes installations are designed so that some program configurations or other installation work is carried out only after a Rechnereboot.

This is an option which we will analyze below.

The two most common ways to trigger a re-installation are the creation of a "Run" registry key, or create a corresponding shortcut in the Startup folder. So we will check below the appropriate places in the layer corresponding to events.

 

 

  • 10.   Double click siDoppelklicken in SWV Admin tool on the pdf2cad layer to edit the film.
    Here we search in the start menu / Startup folder for entries that are invoked after a restart.
    They expand the System node under "pdf2cad (read-only)". Highlight the [COMMON STARTUP] folder. This is the All Users Startup folder. On the right side you can see that the folder is empty. Now we expand the user-specific node, and then the USER_TEMPLATE node. Highlight the [STARTUP] folder. Also, this folder is empty
    .

 

  • 11.   Next we examine the layer regarding RunOnce Key entries.
    All commands that are listed in this key would be run at reboot, but what we want to suppress
    .

    First, click on the Registry tab, so we can see all the registry entries of our layer.
    Expand them under "pdf2cad (Read-only)" the HKEY_LOCAL_MACHINE node and follow it to the following key: SOFTWARE / Microsoft / Windows / CurrentVersion / Run. On the right side you will see that there is indeed a registry key registered in our pdf2cad layer
    !

 

  • 12.    

    What will we do next is to copy this command line from the RunOnce registry key, delete the key and the command line, such as, that therefore the read-only layer is updated. This is an important step!

     

    If we leave the RunOnce entry in the layer, SWV would run the command in the activation on the target machine certainly, but the result would be written into the writabel layer, a layer would reset this Ändeurngen but lost! We must therefore ensure that the appropriate changes wwerden written in the read-only layer.

     

    To copy the contents of the corresponding registry entry to the clipboard: "% systemroot% \ system32 \ pdf2cad_config.exe". Then delete the RunOnce RegKey from the layer.

 

  • 13.   Close them all open tabs.
    > Update Existing layer - click on File
    .

 

  • 14.   Mark the pdf2cad layer and click "Next".

 

  • 15.   Since the file to be executed, in (!) Layer is, this is only visible and accessible and executable if the layer is active. The application layer is activated automatically when we go "Update an existing layer" mode. Seen as in Exercise 1 to type C: \ windows \ system32 \ cmd.exe in the "Program Name" field or browse to your computer afterwards. Then click on "Next" and "Finish".

 

  • 16.   Everything is now running out of the console, and accordingly caused all system changes are written to the read-only section of our pdf2cad layer. So they add the command line "% systemroot% \ system32 \ pdf2cad_config.exe" in the console window and press Enter. It should be openable connect another console window and the "post-installation" is completed.

    You can find the original console window now close to the sisters envy process to finish.

 

  • 17.   Now that we have successfully created a new application layer for "pdf2cad" while characterizing engelern the reboot scenario, we can run the pdf2cad shortcut on the desktop and then make the application to ensure that the application works correctly.

 

  • 18.   Disable the pdf2cad layer and they can observe how the application icon disappears from the desktop.

 

<< Übung 1 | >> Übung 3




-->