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:[email protected]]
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:[email protected]]
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=""[SystemFolder]SCHTASKS.EXE" /DELETE /TN " My
Scheduled Task Name " /F" />
-----Original Message-----
From: Phil Sayers [mailto:[email protected]]
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=""[SystemFolder]SCHTASKS.EXE" /CREATE /SC DAILY /TN
"My Scheduled Task Name" /ST 00:00:00 /SD 01/27/2006 /TR
"\"[#FullPathToMyExe]\" type=Foo1 url=[FooURL]
user=[FooUSER]
password=[FooPASSWORD]" /RU "NT AUTHORITY\SYSTEM" " />
I needed the escaped quotes around the label/name you want to give to
your
scheduled task.
If you notice the ... "\" ... 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:[email protected]]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------
----
--
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
----------------------------------------------------------------------------
--
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users