I think you need to run msiexec and get a log file, that should show you
what the problem is.

Neil

-----Original Message-----
From: MaheshGuru Pawar [mailto:maheshgu...@hotmail.com] 
Sent: 08 June 2010 18:02
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Creating a scheduled task using wix installer
after running a setup.msi file


 

 

     Hey Neil,
                       I did try what you told but no luck so far. These
are my changes as per ur advice
 
<CustomAction
Id="CreateScheduledTask"
Return="check"
Directory="SystemFolder"
ExeCommand= "C:\Windows\System32\schtasks.exe /create /tn MySchedule /tr
d:\MyApp1\MyApp1\bin\MyApp1.exe /sc monthly /d 15 /RU schedman /RP
Schedule1"
Execute= "deferred"/>
 
Please tell if this is alright.
I also added  <Directory Id="SystemFolder" Name="System">
 
May be there is a problem in my execute sequence. I tried
InstallFinalize but it gives error.
 
<InstallExecuteSequence>
<Custom Action="CreateScheduledTask"
After="InstallInitialize">NOTInstalled</Custom>
<Custom Action="RemoveScheduledTask"
Before="RemoveFiles">Installed</Custom>
</InstallExecuteSequence>
 
Thanks 
Mahesh
 



 
> Date: Mon, 7 Jun 2010 22:07:43 +0100
> From: n...@x2systems.com
> To: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] Creating a scheduled task using wix installer
after running a setup.msi file
> 
> I think the problem is that you are not specifying the full path to
> schtasks.
> 
> I do something similar for a non-public application in the following
> way:
> 
> <!-- Embed a copy of schtasks -->
> <Binary Id="schtasks"
> SourceFile="$(var.ProjectDir)\Support\schtasks.exe" />
> <CustomAction Id="CreateMaintenanceTask" BinaryKey="schtasks"
> ExeCommand="/create /tn &quot;My Task&quot; /tr &quot;\&quot;[#My
Batch
> File.bat]\&quot;&quot; /sc DAILY /st 02:00:00 /ru System"
> Execute="deferred" Return="check" Impersonate="no" />
> 
> I should point out that redistributing schtasks.exe this way is
probably
> against a licence agreement. Also, be aware that the command line for
> schtasks is localised to this will only work on the English version of
> Windows.
> 
> Neil
> 
> -----Original Message-----
> From: maheshguru [mailto:maheshgu...@hotmail.com] 
> Sent: 07 June 2010 20:48
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Creating a scheduled task using wix installer
after
> running a setup.msi file
> 
> 
> 
> Hi I am mahesh, I am working on a Wix project but I am not
> able 
> to add schedule tasks to it.
> Here is my code. Please help me out. here is my code,
> 
> 
> <CustomAction
> Id="CreateScheduledTask"
> Return="check"
> Directory="ProgramFilesFolder"
> ExeCommand= "schtasks /create /tn MySchedule /tr
> d:\MyApp1\MyApp1\bin\MyApp1.exe /sc monthly /d 15 /RU schedman /RP
> Schedule1"/>
> 
> 
> <CustomAction
> Id="RemoveScheduledTask" 
> Return="ignore"
> Directory="ProgramFilesFolder" 
> ExeCommand= "schtasks /delete /tn MySchedule " />
> 
> <InstallExecuteSequence>
> <Custom Action="CreateScheduledTask"
> After="InstallFinalize">NOTInstalled</Custom>
> <Custom Action="RemoveScheduledTask"
> Before="RemoveFiles">Installed</Custom>
> </InstallExecuteSequence>
> 
> -- 
> View this message in context:
>
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Creating-a
>
-scheduled-task-using-wix-installer-after-running-a-setup-msi-file-tp515
> 0789p5150789.html
> Sent from the wix-users mailing list archive at Nabble.com.
> 
>
------------------------------------------------------------------------
> ------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit. See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
>
------------------------------------------------------------------------
------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit. See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
                                          
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from
your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:
ON:WL:en-US:WM_HMP:042010_2
------------------------------------------------------------------------
------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to