That's good to know. From your comment, it appears there is no "graceful" method to end the program if it is run as a service.
I'll probably just continue to run it from our scheduler and control it via the ini file then.
Thanks for responding.
Gil.
I have a filewatcher VBscript that I want to set up as a service. I have found where you can use SERVANY.EXE to do this.
Current process: The filewatcher script reads a .ini file to determine which folders/files to process. There is also a flag in the .ini file that tells the filewatcher to...
Although I can see your point, I have always used the code Do Until objCmd.Status which resolves to True once the command is finished. For clarity it would make sense to expand the full code and add the = True argument.
I will make this change and test again when I have the opportunity...
I've been experimenting while waiting for some feedback and I tried changing the WShell.Exec to a WShell.Run and that seems to work w/o a problem.
Curious to know why the Shell exec wouldn't work?
I have a VBScript that invokes a Perl command line to process a file.
set objCmd = WShell.Exec(OutCmd2Exec)
Do Until objCmd.Status
Wscript.Sleep 1000
Loop
Where OutCmd2Exec is :
perl c:\gsc_scripts\lawson.pl
"E:\FTPfiles\lawrpt\failed\20100218081721.352414"
For most of the files the perl...
Hi Tsuji, before I tried the connectobject I tried setting the alias when I define the new oAcroDist object. Both ways seem to work but like you, I prefer doing it at the beginning when you define the object.
CheckError is a sub I call after certain events to check and report on possible...
I have tried the following :
bJobToEnd = oAcroDist.FileToPdf strInputPostScript, strOutputPDF, strPDFOptions
Set bJobToEnd = oAcroDist.FileToPdf strInputPostScript, strOutputPDF, strPDFOptions
But both return a VBScript compilation error: Expected end of statement.
I expect I could query the...
It was my impression that the FileToPdf will eventually cause the event OnJobDone to trigger the OnJobSub to execute and change the value of bJobToEnd to true however, the problem appears to be that the OnJobDone event is not being captured by the script.
I have used The Exec method of the do...
Hi Tsuji, thanks for the suggestion. I tried it however, the OnJobDone sub is still not firing because the script just keeps looping in the do while not bJobToEnd loop like it is not recognizing the events. Any other suggestions?
Here are the major parts, pardon any line wraps...
Set fs =...
I don't see many examples of invoking Distiller via VBS however, I did find enough examples on the web to get one working.
The problem I am having is trying to figure out how to capture the events indicated in the Acrobat® Distiller® API Reference
OnJobStart
OnJobDone
OnJobFail
OnLogMessage...
Thanks for all the responses. I think I was getting my shorts all bunched up with the return code. I was expecting a successful copy to have a RC=0 but instead as someone pointed out RC=1 means success. I overlooked that when I reviewed the File::Copy documentation.
In my original post, I...
The contents of $! says: No such file or directory
$filename gets set at the beginning of the script as such:
$filename = $ARGV[0]
$szNewBBSfile gets built as such:
my $bbsfilepath="E:\\FTPfiles\\mainframe\\ftp2gscapps\\";
$szBBSName=lc($companyid . "@" . $record[3] . "@" . $record[1] ...
Please excuse any text wrapping.
I have a dataset that is in the following format:
'UN.GS4P.GSRT087.GSRT087C.TXT-CST02824-' and yes the quotes are part of the filename and I cannot rename the file.
I want to perform a copy of this dataset using File::Copy to another directory with the name of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.