Prev: A problem using PrintForm
Next: How To Know
From: Nobody on 21 Dec 2009 11:47 "Steve Ricketts" <velocedge(a)hotmail.com> wrote in message news:eqFfGblgKHA.2104(a)TK2MSFTNGP05.phx.gbl... >I neglected to copy the CD <directory name> when I pasted the contents of >the bat file. I actually had that problem the first time I ran it inside >VB. All the directories in this case don't have spaces, but I've added >them in case things change... and they will. ;-) I have made the program >work by doing exactly what you've suggested, but I'd really like to know >how to run a bat from a service in case I have a situation where I can't >execute everything from the service. Use ShellExecute(Ex) to run a batch file, or even a text file(which will be opened by the associated program). Search this VB6 site for that function for samples: http://vbnet.mvps.org/ If using CreateProcess, you need Environ("ComSpec") and /C option. Note that both of these functions allow you to set the working directory.
From: Karl E. Peterson on 21 Dec 2009 13:35 Steve Ricketts pretended : >> I was wondering about that too, do you use a batch file for speed, or could >> you replace it with a VB program? > > Contents are changed each time it's run. I don't think you answered the question. Or even thought about it. > The bat file builds a rounded > corner button .gif with transparency with gradient colors based on a start > and end value. All the sizes and colors will differ as well as the type. No, the bat file doesn't do that. The bat file executes another program that does that. Again, why a bat file? -- ..NET: It's About Trust! http://vfred.mvps.org
From: Karl E. Peterson on 21 Dec 2009 13:37 Steve Ricketts has brought this to us : > BTW, I can make this work by calling the executables directly in each line of > the .bat file. But I would really like to know how to run a .bat file from a > service in case I ever need to do it again. It's extremely difficult to envision a scenario where you *need* to call a batch file from a full-blown programming language. The only one that comes immediately to mind would be the ease with which you could go async on the call. Is that the real issue? -- ..NET: It's About Trust! http://vfred.mvps.org
From: Schmidt on 21 Dec 2009 13:54 "Steve Ricketts" <velocedge(a)hotmail.com> schrieb im Newsbeitrag news:uBcc$HlgKHA.6096(a)TK2MSFTNGP02.phx.gbl... > Contents are changed each time it's run. > The bat file builds a rounded corner button .gif with > transparency with gradient colors based on a start > and end value. All the sizes and colors will differ as > well as the type. Aside from the "batch-start-problem"... If you can live with generated *.png-file content instead of the *.gifs, you can do that (and much more, as for example direct *.pdf creation) directly inside your VB- service-App with the use of a free cairo-wrapper-library. Let me know, if I should give you an example for that (all drawing-routines antialiased, rounded rects, etc... gradients with different color-stops, transparent overlays... rotation, text-out, etc - all no larger problem, since you talk with the cairo-lib over a VB-COM-Object). But also GDI+ should work fine for that (in case the Server-OS is a relative "fresh one", it should be already preinstalled/available). Olaf
From: Steve Ricketts on 21 Dec 2009 15:03
Sorry... I thought I did answer. I'll try again. Not using the bat for speed, more for flexibility. The batch file is created by another process as a result of a user changing style information about their web site. The values change each time it's created and the parameters are different from user to user. Like I said in one of the other posts, I have the program running by executing each individual line within the service, but I won't always have that luxury. So, the question is really is now more about how to run a bat file from a service than this specific example. sr "Karl E. Peterson" <karl(a)exmvps.org> wrote in message news:#ZGVbxmgKHA.5604(a)TK2MSFTNGP04.phx.gbl... > Steve Ricketts pretended : >>> I was wondering about that too, do you use a batch file for speed, or >>> could you replace it with a VB program? >> >> Contents are changed each time it's run. > > I don't think you answered the question. Or even thought about it. > >> The bat file builds a rounded corner button .gif with transparency with >> gradient colors based on a start and end value. All the sizes and colors >> will differ as well as the type. > > No, the bat file doesn't do that. The bat file executes another program > that does that. Again, why a bat file? > > -- > .NET: It's About Trust! > http://vfred.mvps.org > > |