I have the custom actions scheduled like this:

<InstallExecuteSequence>
        <Custom Action="CreateScheduledTask" After="InstallFinalize">NOT
Installed</Custom>
        <Custom Action="RemoveScheduledTask"
Before="RemoveFiles">Installed</Custom>
</InstallExecuteSequence>


I struggle with scheduling I don't "get it", but this works for me in the
scenarios I have to support.
I may have missed something in the scheduling that the list regulars can
point out/correct.




-----Original Message-----
From: MacDiarmid, James D [mailto:james.macdiar...@eds.com] 
Sent: Monday, July 27, 2009 1:09 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Creating Scheduled Tasks using Wix

Hi Phil,

In what part of the code did you put this?  I have some other things I
may need to do during the uninstall. I didn't realize you could have
Custom Action Codes do this.

Thanks very much!  
Jim

 

-----Original Message-----
From: Phil Sayers [mailto:p...@cds-am.net] 
Sent: Monday, July 27, 2009 12:23 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Creating Scheduled Tasks using Wix

Wouldn't be complete without the custom action to remove the task for
uninstall.

<CustomAction
Id="RemoveScheduledTask" 
Return="ignore"
Directory=" MyDirectory "
ExeCommand="&quot;[SystemFolder]SCHTASKS.EXE&quot; /DELETE /TN &quot; My
Scheduled Task Name &quot; /F" />


-----Original Message-----
From: Phil Sayers [mailto:p...@cds-am.net] 
Sent: Monday, July 27, 2009 12:19 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Creating Scheduled Tasks using Wix

Hi Jim,

I think we both found the same wix snippet to manipulate scheduled
tasks.
I had to shuffle it around a little, and this is what I ended up with:


<CustomAction 
Id="CreateScheduledTask" 
Return="check"
Directory="MyDirectory"
ExeCommand="&quot;[SystemFolder]SCHTASKS.EXE&quot; /CREATE /SC DAILY /TN
&quot;My Scheduled Task Name&quot; /ST 00:00:00 /SD 01/27/2006 /TR
&quot;\&quot;[#FullPathToMyExe]\&quot; type=Foo1 url=[FooURL]
user=[FooUSER]
password=[FooPASSWORD]&quot; /RU &quot;NT AUTHORITY\SYSTEM&quot; " />


I needed the escaped quotes around the label/name you want to give to
your
scheduled task.

If you notice the ...  &quot;\&quot;   ...   before the FullPathToMyExe,
I
had to double-up on the quotes since I need to pass command line args
(type,
url, user, password) to my scheduled task, the slash between the
soubled-up
escaped quotes is needed to re-escape it for the schtasks.exe program.

This works for me on WinXp, Vista, server2003  currently untested by me
on
server 2008.



-----Original Message-----
From: MacDiarmid, James D [mailto:james.macdiar...@eds.com] 
Sent: Monday, July 27, 2009 11:51 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Creating Scheduled Tasks using Wix


I found some code to create scheduled tasks during an install.  I'm
having trouble with one where I have to pass the following xml string on
the command-line. 

XML string is "<DIRECTION>UP</DIRECTION>"  Here is the code that creates
the scheduled task:

<CustomAction Id="CREATETASK_CC_CIS_FILE_CREATION_UPLOAD" 
Return="check" 
Directory="ScheduledTasks"
ExeCommand="[SystemFolder]SCHTASKS.EXE /CREATE /SC DAILY /TN Run CC
<DIRECTION>UP</DIRECTION> /ST 00:00:00 /SD 01/27/2006 /TR
D:\apps\nfts\NFTS V3 Batch Processors\FireBatch\FireBatch.exe /RU
[%USERDOMAIN]\[LogonUser] /RP" />

Is there a way to pass that as a string and not have votive or wix look
at that string as xml?  

Thanks,
Jim


------------------------------------------------------------------------
----
--
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
----
--
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to