Options

Creating a service

DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
I did this once awhile back and can't seem to get it to work.I want to make an application run as a service.

The command I used was
sc.exe "Calculator" binPath= "C:\windows\system32\calc.exe"

This creates the service, and I can locate it in services.msc. But I can't start it.

Is this because I need to do something else, or because running the calculator as a service just isn't possible.

Ultimately I want to make an aircard program start as a service so that an internet connection can be established prior to login so that when the vpn client attempts to connect, the internet connection is already established.

(Ideally the VPN connection is established prior to login so that cached credentials are not needed and so that the DC will tell the laptop that the password is about to expire. Rather than have the password expire with the user having no idea of it, and then when they try to do something it doesn't work because their password is expired. Also establishing the VPN prior to login will map all of the network drives.)
Decide what to be and go be it.

Comments

  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    Silentsoul wrote: »

    Thanks for the reply. I actually read the microsoft KB already and I'm under the impression that that method only works for windows NT and Windows 2000. The second articles uses the same tools, but implies that it can be used for any os. (I'm wanting it to work on XP.)

    I was under the impression that the sc.exe was the new method of doing this on xp. (But I have been wrong before, just once though.)

    Where can I find a resource disk to try and use these tools?
    Decide what to be and go be it.
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    Silentsoul wrote: »

    Sounds like that has the tools I need. I'll have to give it a try tonight. Work might frown on random installations.
    Decide what to be and go be it.
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    Just want to point this out here. The ultimate goal is to be able to run the aircard software and connect to the internet prior to logon. If someone knows how to do this without making it a service, I would love to hear that too.
    Decide what to be and go be it.
  • Options
    ClaymooreClaymoore Member Posts: 1,637
    Devilsbane wrote: »
    Just want to point this out here. The ultimate goal is to be able to run the aircard software and connect to the internet prior to logon. If someone knows how to do this without making it a service, I would love to hear that too.

    Most VPN Clients have a option to launch prior to Windows logon. Here is an example using the Cisco VPN client. The Cisco client will also allow you to launch other programs such as your air card software. You also have the option to logon using dial-up networking, which is something I have used with an ISA VPN in the past. The ISA VPN was set up as a dial-up networking connection so it could be launched before the user logged in and they would get their logon script and mapped drives.

    At my previous employer, I used to tell my team to bring me the problems along with the solutions. Too often they would ask me if something were possible, I would tell them if it were or how to do it and they would move on. Later I would find out they were trying to do some Rube Goldberg-esque workaround for a very simple problem, and there question to me was only one of several steps involved. This is a perfect example of that. You are tying one way to solve a problem and we are trying to help, but there may be an easier way. By working the problem rather than the solution we can hopefully solve it.
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    We use the cisco vpn client, and it usually does launch prior to login. (Sometimes screws up, but that is a different story.)

    The problem is when they are using a laptop with an air card to connect to a cell tower. The VPN client still runs, but since they aren't online yet, they don't connect to the VPN.

    So we need the aircard program to connect them to the internet AND the VPN client to establish the VPN connection prior to login.

    I understand there are always more than one way to solve the problem. Making the aircard program was my first (and for the moment only) solution. I am always available to other possibilities.

    The problem is that I don't have experience with this very much. I have never connected to the VPN because I don't have a laptop. And because of that, I have obviously never connected with the air card. I just know that quite the problems can result when passwords expire on these laptops.

    Again, thanks to everyone for their help and ideas.
    Decide what to be and go be it.
Sign In or Register to comment.