RE: Starting CF with cfstart.bat - Can you assign an account?
> When I use the runas command, it asks for a > password. Is it possible to pass a password > to the runas program so that it can be > automated? To be honest, I have no idea. If you want to use it in a batch file, I'm sure there's some way to pass the password to it, although it might not be as simple as an additional attribute. > Also, if I use net start instead, will it always > start the service under the account listed, even > when called from a script? Yes. Services always run within the account in which they're configured to run. This is the option I'd recommend. The cfstart.bat file seems useful for diagnostics, but not for restarting CFMX, really. Just write a batch file with the appropriate "net stop" and "net start" commands, and you'll be all set. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Starting CF with cfstart.bat - Can you assign an account?
Dave, When I use the runas command, it asks for a password. Is it possible to pass a password to the runas program so that it can be automated? Also, if I use net start instead, will it always start the service under the account listed, even when called from a script? Brook At 09:29 PM 1/31/2003 -0500, you wrote: > > Actually, the cfstart.bat file in CFMX (sorry, I > > should have said), triggers jrun.exe with a single > > flag -start. The CFMX Service doesn't even report > > to be running when starting it this way. What I > > really need is a list of flags that can be passed > > to Jrun at startup. > > > > I really need to have it start up under a user account. > > Anybody have any idea? > >Why not just configure the service to run as the desired user, then start it >yourself using: > >net start "ColdFusion MX Application Server" > >Since the cfstart.bat file runs CFMX as an application, you'd have to run >the batch file as the desired user to get CFMX to run as that user. You can >either login as that user, or in Windows 2000, use runas (type "runas" at a >command prompt for more information). If you're running Windows NT, I think >there's a "su" utility in the NT Resource Kit. > >Dave Watts, CTO, Fig Leaf Software >http://www.figleaf.com/ >voice: (202) 797-5496 >fax: (202) 797-5444 > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Starting CF with cfstart.bat - Can you assign an account?
> Actually, the cfstart.bat file in CFMX (sorry, I > should have said), triggers jrun.exe with a single > flag -start. The CFMX Service doesn't even report > to be running when starting it this way. What I > really need is a list of flags that can be passed > to Jrun at startup. > > I really need to have it start up under a user account. > Anybody have any idea? Why not just configure the service to run as the desired user, then start it yourself using: net start "ColdFusion MX Application Server" Since the cfstart.bat file runs CFMX as an application, you'd have to run the batch file as the desired user to get CFMX to run as that user. You can either login as that user, or in Windows 2000, use runas (type "runas" at a command prompt for more information). If you're running Windows NT, I think there's a "su" utility in the NT Resource Kit. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Starting CF with cfstart.bat - Can you assign an account?
Actually, the cfstart.bat file in CFMX (sorry, I should have said), triggers jrun.exe with a single flag -start. The CFMX Service doesn't even report to be running when starting it this way. What I really need is a list of flags that can be passed to Jrun at startup. I really need to have it start up under a user account. Anybody have any idea? Brook At 04:07 PM 1/31/2003 -0800, you wrote: >No. > >The cfstart.bat file just scripts the "net start" command, and that command >only accepts one parameter: service name. > >The service runs under whatever user name it was set up to run under in the >services control panel. > >This is, however, not to say that what you want cannot be done. All it >would take is a script or program that: > >stops the service, if it is running >runs a registry script to change the user name > Application Server ObjectName="Someuser"> >starts the service > >At 03:03 PM 1/31/2003 -0800, you wrote: > >Is there anyway to tell CF what account to run under when calling the > >cfstart.bat file? Does it run under the local system account? > > > >Thanks for the help. > > > >Brook Davies > >maracasmedia.com > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Starting CF with cfstart.bat - Can you assign an account?
No. The cfstart.bat file just scripts the "net start" command, and that command only accepts one parameter: service name. The service runs under whatever user name it was set up to run under in the services control panel. This is, however, not to say that what you want cannot be done. All it would take is a script or program that: stops the service, if it is running runs a registry script to change the user name starts the service At 03:03 PM 1/31/2003 -0800, you wrote: >Is there anyway to tell CF what account to run under when calling the >cfstart.bat file? Does it run under the local system account? > >Thanks for the help. > >Brook Davies >maracasmedia.com ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4