MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: TryMeTaskSchedules.MM[Next]: TryMeCreateIisSite.MM
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->MAKEMSI Installs...->Samples Installed by MAKEMSI->Samples - Build New MSI/MSM->TryMeTemplate-SimpleSchedule.MM

TryMeTemplate-SimpleSchedule.MM

This is one of the MAKEMSI samples which build a new MSI. This MSI makes use of these "TryMe.MM" files:

  1. TryMe.ver
  2. TryMe.rtf

This script may requires the "JT.EXE" tool to be available and will tell you if you forget. Please download the tool from Microsoft and copy to the same directory as the script.

;----------------------------------------------------------------------------
;    MODULE NAME:   TryMeTemplate-SimpleSchedule.MM
;
;        $Author:   USER "Dennis"  $
;      $Revision:   1.0  $
;          $Date:   03 Mar 2015 18:44:46  $
;       $Logfile:   C:/DBAREIS/Projects.PVCS/Win32/MakeMsi/TryMeTemplate-SimpleSchedule.MM.pvcs  $
;
; DESCRIPTION
; ~~~~~~~~~~~
; Shows how a simple single schedule msi can be created.
; Note that I haven't actually include "ThisDoesTheWork.cmd" but it can be
; any batch file.
;----------------------------------------------------------------------------

;--- Define the parameters an include the template ------------------------
#define  SIMPLE_SCHEDULE_COMMANDS                       call "ThisDoesTheWork.cmd"
#define  SIMPLE_SCHEDULE_TRIGGERS                       ;;Doesn't create a "real" trask schedule so no triggers to define
#define  SIMPLE_SCHEDULE_LOGON_SCHEDULED_VIA_REGISTRY   Y
;#define SIMPLE_SCHEDULE_REQUIRED_FILES                 ThisDoesTheWork.cmd;AnotherFile.txt
#define  SIMPLE_SCHEDULE_MAKEMSI_SUPPORT                ME.MMH
#define  VER_FILENAME.VER                               TryMe.Ver      ;;I only want one VER file for all samples!
#include "TEMPLATE_MSI-SimpleSchedule.MMH"


;###############################################################################
;###############################################################################
;###############################################################################
#EOF            ;;Nothing past this line will be executed when the example is built :-)

;What follows is an alternative way of defining some of the above parameters

;----------------------------------------------------------------------------
;--- Define the command(s) that the schedule invokes ------------------------
;----------------------------------------------------------------------------
#(  '<?NewLine>'
    #define  SIMPLE_SCHEDULE_COMMANDS

    ::--- We have put all of the work into a single batch file ---
    call "ThisDoesTheWork.cmd"
#)


;----------------------------------------------------------------------------
;--- Define the Triggers (can be empty if using registry) -------------------
;----------------------------------------------------------------------------
#(  ' '
    #define  SIMPLE_SCHEDULE_TRIGGERS

;**    [CommentBlockStart     (3 March 2015 9:00:56 AM, bareisd)
;**+----------------------------------------------------------------------
;**|   ;--- Example: Run at user logon ------------------------------------------
;**|   /CTJ
;**|   Type = AtLogon
;**|   Disabled = 0
;**|
;**|   ;--- Create COMPUTER STARTUP trigger ------------------------------------
;**|   /CTJ
;**|   Type = AtStartup
;**|   Disabled = 0
;**|
;**|   ;--- Create EVERYDAY trigger ---------------------------------------------
;**|   /CTJ
;**|   Type = Daily
;**|   TypeArguments = 1
;**|   EndDate = 00/00/0000
;**|   StartTime = 23:00                ;;Starts 11pm
;**|   MinutesDuration=60
;**|   KillAtDuration=1
;**|   Disabled = 0
;**+----------------------------------------------------------------------
;**    CommentBlockEnd]       (3 March 2015 9:00:56 AM, bareisd)
#)


;------------------------------------------------------------------------------
;--- We want User logon "scheduled" via registry [under user context] and not via a window's "task" schedule [under system context] ---
;------------------------------------------------------------------------------
#define  SIMPLE_SCHEDULE_LOGON_SCHEDULED_VIA_REGISTRY  Y


;------------------------------------------------------------------------------
;--- Define Extra Files (to support commands in "SIMPLE_SCHEDULE_COMMANDS") ---
;------------------------------------------------------------------------------
#(  ';'
    #define  SIMPLE_SCHEDULE_REQUIRED_FILES

    ;--- List extra files your script needs (if any) ------------------------
    ThisDoesTheWork.cmd
#)



;----------------------------------------------------------------------------
;--- Invoke the schedule framework ------------------------------------------
;----------------------------------------------------------------------------
#define SIMPLE_SCHEDULE_INSTALL_LOCATION    [ProgramFilesFolder]\<$ProdInfo.ProductName>
#define SIMPLE_SCHEDULE_MAKEMSI_SUPPORT     ME.MMH
#include "TEMPLATE_MSI-SimpleSchedule.MMH"


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: TryMeTaskSchedules.MM[Next]: TryMeCreateIisSite.MM


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday February 28 2016 at 3:45pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.