Results 1 to 5 of 5

Thread: Windows services conversion

  1. #1
    Senior Member Spyrus's Avatar
    Join Date
    Oct 2002
    Posts
    741

    Windows services conversion

    This topic is half security half not... so this seems as good a place as any.

    Problem: Our programmers didnt do some things the proper way when the created some applications that run.

    We have a server that has 30 batch files that are running at all times to gather info and do some things.

    Security Issues:
    This requires you to login and start the files and then lock the server
    I don't want a million people knowing how to login to this server in order to get everything started up.
    I would prefer to give them a managment console pad that allows them to view certain services that they can stop and restart.

    What I would like to do:

    I want to convert these batch files to services that can be stopped and started from a management console and will start when the server starts up instead of having to login.

    Any help would be greatly appreciated
    Duct tape.....A whole lot of Duct Tape
    Spyware/Adaware problem click
    here

  2. #2
    Hi Spyrus!

    I am not much of an administrator, but with windows you always have the 'at' command. Can you use this to run the batch programs?

    HTH

  3. #3
    Senior Member Opus00's Avatar
    Join Date
    May 2005
    Posts
    143
    Look into adding it to:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunService

    That's where you'd find many virus/trojans that run at startup

    It's worth a shot at least, there may be a little more to it, but should be a good place to start

    I've also heard of, but not used, a tool in the resource kit that aids in making something a service.


    [edit]

    Weird, the reg key above wraps after posting, not sure why.

    [/edit]
    There are two rules for success in life:
    Rule 1: Don't tell people everything you know.

  4. #4
    Senior Member
    Join Date
    Oct 2001
    Posts
    748
    First off, you can schedule batch jobs using the windows scheduler to run at certain times, and you can tell them to run in interactive mode so that they do not require a login.

    If you want to run a batch file as a service you will need to convert the batch file to an exe. Use something like this- http://www.soft32.com/download_77247.html

    Googling for convert batch to exe turns up a lot of tools to do this other than what I put above. If you want the service to stop running after the batch file completes you will need to use the SC command to stop the service. See the article below for the exact syntax. It will be sc stop "servicename" no quotes.

    To turn an EXE into a service do this- http://support.microsoft.com/kb/251192/en-us

    Basically something like this will work "sc create yourservicename binpath=c:\temp\yourexe.exe"

    Although I'm not really sure how having services will fix your problem. They will still need access to stop and start the services. And unless they know how to use SC, or computer management remotely that means they will have to login.

  5. #5
    Senior Member Spyrus's Avatar
    Join Date
    Oct 2002
    Posts
    741
    Although I'm not really sure how having services will fix your problem. They will still need access to stop and start the services. And unless they know how to use SC, or computer management remotely that means they will have to login.
    First off thanks for the info... have some incredible Hulk (thats right I used a retarded name to describe something)Anyway, other than being slap happy this morning....

    If I have them running as services I can have them start up when the Server starts up. These batch files never actually stop running, so there is no need to stop and restart them unless the program hoses up. So when it does hose up, there are a couple of people that have access to the servers and they know how to use the computer managemnet option remotely so this will help immensly.
    Duct tape.....A whole lot of Duct Tape
    Spyware/Adaware problem click
    here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •