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 "My Task" /tr "\"[#My Batch File.bat]\"" /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