Still having an issue here.
I have followed advice and created a package for my test script.
The script is here
and I have called it DeleteIcons.vbs
I have copied the both script and cscript.exe to my source directory on my SMS server and made this the Data Source in the Package Properties and Access is through the Distribution folder through common SMS package share.
This appears to be copying to the DP just fine.
The program command line is 'cscript DeleteIcon.vbs'
and is set to run 'only when a user is logged on' with Admin rights.
All seems to run ok, I get this line in Execmgr.log
'Execution is complete for program DeleteIcons. The exit code is 0, the execution status is Success execmgr 23/01/2007 12:05:38 3980 (0x0F8C)
'
....I have 'tweaked' and tried slight changes but it doesn't work, although it ran fine from the command line.
...........
Any help much appreciated
Full log is here
<![LOG[Script for Package:6500003B, Program: Delete Icon failed with exit code 1]LOG]!><time="11:16:57.983+000" date="01-23-2007" component="execmgr" context="" type="3" thread="728" file="executionstatus.cpp:243">
<![LOG[Raising event:
[SMS_CodePage(850), SMS_LocaleID(2057)]
instance of SoftDistProgramErrorEvent
{
AdvertisementId = "65020097";
ClientID = "GUID:B4A07F4F-7149-463A-B2BD-1A7E16C427A4";
DateTime = "20070123111657.983000+000";
ExitCode = "1";
MachineName = "LTKTG8M1J";
PackageName = "6500003B";
ProcessID = 1948;
ProgramName = "Delete Icon";
SiteCode = "650";
ThreadID = 728;
UserContext = "NT AUTHORITY\\SYSTEM";
};
]LOG]!><time="11:16:57.983+000" date="01-23-2007" component="execmgr" context="" type="1" thread="728" file="event.cpp:522">
<![LOG[Raised Program Error Event for Ad:65020097, Package:6500003B, Program: Delete Icon]LOG]!><time="11:16:57.983+000" date="01-23-2007" component="execmgr" context="" type="1" thread="728" file="executioncontext.cpp:504">
<![LOG[Execution is complete for program Delete Icon. The exit code is 1, the execution status is FailureNonRetry]LOG]!><time="11:16:58.061+000" date="01-23-2007" component="execmgr" context="" type="1" thread="1168" file="execreqmgr.cpp:3181">
<![LOG[Execution Manager timer has been fired.]LOG]!><time="11:19:08.982+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2144" file="execreqmgr.cpp:4287">
<![LOG[Policy arrived for parent program DeleteIcons]LOG]!><time="12:05:31.820+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2908" file="execreqmgr.cpp:4940">
<![LOG[Raising event:
[SMS_CodePage(850), SMS_LocaleID(2057)]
instance of SoftDistProgramOfferReceivedEvent
{
AdvertisementId = "6502009B";
ClientID = "GUID:B4A07F4F-7149-463A-B2BD-1A7E16C427A4";
DateTime = "20070123120531.835000+000";
MachineName = "LTKTG8M1J";
ProcessID = 1948;
SiteCode = "650";
ThreadID = 2908;
};
]LOG]!><time="12:05:31.835+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2908" file="event.cpp:522">
<![LOG[Mandatory execution requested for program DeleteIcons and advertisement 6502009B]LOG]!><time="12:05:31.835+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="execreqmgr.cpp:2761">
<![LOG[Creating mandatory request for advert 6502009B, program DeleteIcons, package 6500003C]LOG]!><time="12:05:31.835+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="execreqmgr.cpp:2858">
<![LOG[Requesting content from CAS for package 6500003C version 1]LOG]!><time="12:05:31.851+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="contentaccesshelper.cpp:136">
<![LOG[Raising event:
[SMS_CodePage(850), SMS_LocaleID(2057)]
instance of SoftDistWaitingContentEvent
{
AdvertisementId = "6502009B";
ClientID = "GUID:B4A07F4F-7149-463A-B2BD-1A7E16C427A4";
DateTime = "20070123120532.242000+000";
MachineName = "LTKTG8M1J";
PackageName = "6500003C";
PackageVersion = "1";
ProcessID = 1948;
ProgramName = "DeleteIcons";
SiteCode = "650";
ThreadID = 3980;
};
]LOG]!><time="12:05:32.242+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="event.cpp:522">
<![LOG[Successfully raised SoftDistWaitingContentEvent event for program DeleteIcons]LOG]!><time="12:05:32.257+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="executionrequest.cpp:1871">
<![LOG[Execution Request for program DeleteIcons state change from NotExist to WaitingContent]LOG]!><time="12:05:32.257+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="executionrequest.cpp:372">
<![LOG[Content is available for program DeleteIcons.]LOG]!><time="12:05:32.429+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="executionrequest.cpp:3802">
<![LOG[Notify user mandatory program DeleteIcons is about to run]LOG]!><time="12:05:32.429+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="executionrequest.cpp:2220">
<![LOG[Execution Request for program DeleteIcons state change from WaitingContent to NotifyExecution]LOG]!><time="12:05:32.523+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="executionrequest.cpp:372">
<![LOG[Executing program cscript DeleteIcon.vbs in Admin context]LOG]!><time="12:05:37.823+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="executionrequest.cpp:2375">
<![LOG[Execution Request for program DeleteIcons state change from Running to Running]LOG]!><time="12:05:37.823+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="executionrequest.cpp:372">
<![LOG[Checking content location \\DPMSS30.uk.ALTD.com\SMSPKGF$\6500003C\ for use]LOG]!><time="12:05:37.839+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="executioncontext.cpp:1467">
<![LOG[Successfully selected content location \\DPMSS30.uk.ALTD.com\SMSPKGF$\6500003C]LOG]!><time="12:05:37.964+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="executioncontext.cpp:1535">
<![LOG[Executing program as a script]LOG]!><time="12:05:37.964+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="executionengine.cpp:96">
<![LOG[Successfully prepared command line "\\DPMSS30.uk.ALTD.com\SMSPKGF$\6500003C\cscript.exe" DeleteIcon.vbs]LOG]!><time="12:05:37.964+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="scriptexecution.cpp:419">
<![LOG[Command line = "\\DPMSS30.uk.ALTD.com\SMSPKGF$\6500003C\cscript.exe" DeleteIcon.vbs, Working Directory = \\DPMSS30.uk.ALTD.com\SMSPKGF$\6500003C\]LOG]!><time="12:05:37.964+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="scriptexecution.cpp:178">
<![LOG[Created Process for the passed command line]LOG]!><time="12:05:38.011+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="scriptexecution.cpp:309">
<![LOG[Raising event:
[SMS_CodePage(850), SMS_LocaleID(2057)]
instance of SoftDistProgramStartedEvent
{
AdvertisementId = "6502009B";
ClientID = "GUID:B4A07F4F-7149-463A-B2BD-1A7E16C427A4";
CommandLine = "\"\\\\DPMSS30.uk.ALTD.com\\SMSPKGF$\\6500003C\\cscript.exe\" DeleteIcon.vbs";
DateTime = "20070123120538.011000+000";
MachineName = "LTKTG8M1J";
PackageName = "6500003C";
ProcessID = 1948;
ProgramName = "DeleteIcons";
SiteCode = "650";
ThreadID = 2192;
UserContext = "NT AUTHORITY\\SYSTEM";
WorkingDirectory = "\\\\DPMSS30.uk.ALTD.com\\SMSPKGF$\\6500003C\\";
};
]LOG]!><time="12:05:38.027+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="event.cpp:522">
<![LOG[Raised Program Started Event for Ad:6502009B, Package:6500003C, Program: DeleteIcons]LOG]!><time="12:05:38.042+000" date="01-23-2007" component="execmgr" context="" type="1" thread="2192" file="executioncontext.cpp:391">
<![LOG[Program exit code 0]LOG]!><time="12:05:38.949+000" date="01-23-2007" component="execmgr" context="" type="1" thread="544" file="scriptexecution.cpp:443">
<![LOG[Looking for MIF file to get program status]LOG]!><time="12:05:38.949+000" date="01-23-2007" component="execmgr" context="" type="1" thread="544" file="executionstatus.cpp:276">
<![LOG[Script for Package:6500003C, Program: DeleteIcons succeeded with exit code 0]LOG]!><time="12:05:38.949+000" date="01-23-2007" component="execmgr" context="" type="1" thread="544" file="executionstatus.cpp:253">
<![LOG[Raising event:
[SMS_CodePage(850), SMS_LocaleID(2057)]
instance of SoftDistProgramCompletedSuccessfullyEvent
{
AdvertisementId = "6502009B";
ClientID = "GUID:B4A07F4F-7149-463A-B2BD-1A7E16C427A4";
DateTime = "20070123120538.949000+000";
MachineName = "LTKTG8M1J";
PackageName = "6500003C";
ProcessID = 1948;
ProgramName = "DeleteIcons";
SiteCode = "650";
ThreadID = 544;
UserContext = "NT AUTHORITY\\SYSTEM";
};
]LOG]!><time="12:05:38.980+000" date="01-23-2007" component="execmgr" context="" type="1" thread="544" file="event.cpp:522">
<![LOG[Raised Program Success Event for Ad:6502009B, Package:6500003C, Program: DeleteIcons]LOG]!><time="12:05:38.980+000" date="01-23-2007" component="execmgr" context="" type="1" thread="544" file="executioncontext.cpp:413">
<![LOG[Execution is complete for program DeleteIcons. The exit code is 0, the execution status is Success]LOG]!><time="12:05:38.980+000" date="01-23-2007" component="execmgr" context="" type="1" thread="3980" file="execreqmgr.cpp:3181">
<![LOG[Execution Manager timer has been fired.]LOG]!><time="12:12:43.699+000" date="01-23-2007" component="execmgr" context="" type="1" thread="544" file="execreqmgr.cpp:4287">