Running Network-Reliant Processes on Startup

1

I'm in charge of deploying and modifying a bit of in-house software that is meant to run on end-user workstations, which run either Windows 7 or XP SP3. The goal is to maximize the amount of time the software runs on node workstations.

At present, there is a shortcut in every workstation's startup folder that runs the process in the background at login. This works well enough, but I would like to see this software run on startup rather than waiting for a user to login.

The only kinks in all of this are that it's all on an Active Directory domain and that the software itself needs an active Internet connection to run properly.

I've gathered that Task Scheduler is probably the way to go for this, but what what's the best approach to take here?

Andrew MacCaffery

Posted 2013-05-14T20:58:45.977

Reputation: 11

Answers

0

Run application as service.

Example:

sc create Vm-Symantec04 binPath= "\"C:\App32\VMware\VMware Workstation\vmrun.exe\" -T ws start \"P:\VM\Sym04\Sym04.vmx\" nogui" depend= "VMAuthdService/VMnetDHCP/VMUSBArbService/VMware NAT Service"  start= auto

Vm-Symantec04 - service name

\" - double quote escape, space in command line path.

-T ws start \"P:\VM\Sym04\Sym04.vmx\" nogui" - vmware arg's

depend= "VMAuthdService/VMnetDHCP/VMUSBArbService/VMware NAT Service" - depend at services

start= auto - start mode

view service:

 Wmic service where (Name='DHCP') get caption, name, startmode, state, ProcessId, PathName

 Wmic service where (Name='Vm-Symantec04') get caption, name, startmode, state, ProcessId, PathName

Establishing a network/Internet connection:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
IRPStackSize DWORD 32 hex or 50 dec.

Network provider

See too Application lifecycle management software:

Tuleap

STTR

Posted 2013-05-14T20:58:45.977

Reputation: 6 180

What can be done in the way of establishing a network/Internet connection prior to execution? – Andrew MacCaffery – 2013-05-14T21:08:54.393

@AndrewMacCaffery Make the service depend upon the Network service. Windows will sort out the order for you so that your service only starts after the Network service has come up. – Darth Android – 2013-05-14T21:10:13.677

The Network service isn't a useful prereq, as users have to authenticate via Active Directory before the workstation establishes an Internet connection. @DarthAndroid Is there a workaround here that establishes an Internet connection via Active Directory with a provided username/password combo? – Andrew MacCaffery – 2013-05-14T21:11:54.983

@AndrewMacCaffery How do system services such as Windows Update access the internet, then? They do not authenticate under the currently logged in user. You might be able to set the logon user for your service to a valid AD user. – Darth Android – 2013-05-14T21:14:51.450

@DarthAndroid This is a fair point. I may need to reevaluate my approach if Internet connectivity isn't my issue when it comes to running the process on login. – Andrew MacCaffery – 2013-05-14T21:17:13.847

Service will start with rights of the local system ... – STTR – 2013-05-14T21:27:13.957

@STTR You can configure them to use the rights of any user on the system. – Darth Android – 2013-05-14T21:33:28.467

@DarthAndroid If the service does not need to run as the user, it is better not to. If you want more security, you can use the built-in accounts with fewer rights. But to use domain accounts in a pinch. – STTR – 2013-05-14T21:40:54.823