I'm creating a .wsf file with multiple jobs. I want to call other (sub) jobs
from Main job or control job execution sequence dynamically. Is this
possible or should I just write sub routines to accomplish basically the
same thing? Also, do jobs execute in order, first job auto-magically per
docs, until no more jobs or can I stop file execution at end of first (main)
job with WScript.Quit?
I can't seem to get other jobs to execute when called from Main job. I've
tried:
OtherJobId
and
file://job:OtherJob
(ignore 'file:' in above, OE auto-magically inserts)
I'm either syntactically challenged or barking up the wrong tree.
Insights appreciated,
Marcus
"Marcus E. Carlson" <m...@hepco.com> wrote in message news:#HRH583Z$GA.202@cppssbbsa05...
Excellent info. I guess I'll stick to sub/function routines :-) I do have a
question on the following:
<snip>
2) convert the common code to public methods of a Windows Script Component
(a .wsc file), register the .wsc file as a component, and "include" it with
set cc = createobject("commoncode.wsc")
or
set cc = getobject("script:fullpath\commoncode.wsc")
assuming you used commoncode.wsc as both filename and the progid when you
created the .wsc file.
If you use the getobject method with the "script:" COM moniker, you don't
need to register the component (in fact it doesn't even need a
<registration> element.
Now subs/functions are called as object methods
result = cc.myfunction(<myarguments>)
cc.mysub arguments <myarguments>
</snip>
How do you specify progid or does it just happen when you create the .wsc
file?
Not sure I follow the "..don't need to register" approach. I thought you had
to register. Do the docs explain this? So if I had a .wsc file I wouldn't
have to register on all my clients I could just do the following:
result = [relative path | <share>] \cc.myfunction(<myarguments>) ?
I would appreciate furthur info,
Marcus
Marcus
Günter Born <Guente...@csi.com> wrote in message
news:86m5r5$f13$1...@ssauraab-i-1.production.compuserve.com...
> Shell the 2nd job using run
>
> Set oAdr = CreateObject ("WScript.Shell")
> oAdr.Run "WScript.exe file://J:Jobname " & wsf-file
>
> G. Born
>
> Check out the WSH Bazaar at:
>
> http://ourworld.compuserve.com/hompages/Guenter_Born/index0.htm
>
>
>
>
> Marcus E. Carlson schrieb in Nachricht <#HRH583Z$GA.202@cppssbbsa05>...
"Marcus E. Carlson" <m...@hepco.com> wrote in message news:eAw$JMBa$GA.259@cppssbbsa04...
Michael:
Excellent info. I guess I'll stick to sub/function routines :-) I do have a
question on the following:
<snip>
2) convert the common code to public methods of a Windows Script Component
(a .wsc file), register the .wsc file as a component, and "include" it with
set cc = createobject("commoncode.wsc")
or
set cc = getobject("script:fullpath\commoncode.wsc")
assuming you used commoncode.wsc as both filename and the progid when you
created the .wsc file.
If you use the getobject method with the "script:" COM moniker, you don't
need to register the component (in fact it doesn't even need a
<registration> element.
Now subs/functions are called as object methods
result = cc.myfunction(<myarguments>)
cc.mysub arguments <myarguments>
"Marcus E. Carlson" <m...@hepco.com> wrote in message news:eAw$JMBa$GA.259@cppssbbsa04...
Michael:
Excellent info. I guess I'll stick to sub/function routines :-) I do have a
question on the following:
<snip>
2) convert the common code to public methods of a Windows Script Component
(a .wsc file), register the .wsc file as a component, and "include" it with
set cc = createobject("commoncode.wsc")
or
set cc = getobject("script:fullpath\commoncode.wsc")
assuming you used commoncode.wsc as both filename and the progid when you
created the .wsc file.
If you use the getobject method with the "script:" COM moniker, you don't
need to register the component (in fact it doesn't even need a
<registration> element.
Now subs/functions are called as object methods
result = cc.myfunction(<myarguments>)
cc.mysub arguments <myarguments>
"Marcus E. Carlson" <m...@hepco.com> wrote in message news:O9LXUvEa$GA.1532@cppssbbsa06...Already got it. Been reading the documentation and now realize there's more than meets the eye with these scripting technologies. My head's starting to spin! I'm not sure I've been able to sort out when to create a vbs file, a wsf file or a wsc file.I've found lots of WSH, VBS/JS resources but few Component resources. Know anybody with a site devoted primarily to Script Components? I've read most the msdn articles but the examples are fairly light, though beneficial.It seems like there is quite a bit of overlap amongst the technologies as a wsf or wsc file can contain any supported language so when's it best to use which technique? Do you create stand alone vbs/js files and "src=..." them in a wsf? Create stand-alone vbs/js files that call jobs in a wsf file that has a "src=.." to outside vbs/js files? Create a wsf that instantiates a component? Create a Component with multiple <component> elements that can reference each other? Sheesh, I'm confused. Any recomendations on "best practices"?TIA,MarcusMichael Harris <Please...@To.NewsGroup> wrote in message news:#qeY9cEa$GA.264@cppssbbsa04...
Michael Harris <Please...@To.NewsGroup> wrote in message news:OT3qWzEa$GA.259@cppssbbsa04...
Set oAdr = CreateObject ("WScript.Shell")
oAdr.Run "WScript.exe //J:Jobname " & wsf-file