Jump to content

howto determine, if TCP/IP (Win7) is ready, to start two services?


rudi
 Share

Recommended Posts

Hi.

OS=Win7-64 Enterprise.

Today we got the new version 4.01.000.000 of Avaya One-X, a PBX software.

This $%&$% thing fails at startup, as the two services OSPCDatabase and ospc_jonas are up and running, but not working properly, as they start prior the Win7 network is *REALLY* ready.

The Avaya Tech phoned somenone explaining, that these services require, that the TCP/IP services of windows are up and running, before they are started. Setting dependencies to LANMANSERVER, LANMANWORKSTATION, DHCP, and others didn't help so far [1]. So I'm wondering, what would be the appropriate method to determine with an Autoit Script, if the Win7 Network is *REALLY* up already. That script would be installed as a service [2], to start the two other services, as soon as the network ist up and running.

I don't want to provide a "service restart autoit applet" for manual service restart, as the user shall not be logged on with elevated privileges [3].

Setting the startup type to "automatic (delayed)" causes the services not to start at all (waited 15 mins).

Any suggestions appreciated, Regards, Rudi.

[1] http://support.microsoft.com/kb/193888

[2] http://support.microsoft.com/kb/137890

[3] using runaswait() with local admin credentials within the script (either autorun folder or desktop icon for restart) is the last option, I'd like to (ab)use.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

You can always try to create an autoit script like this, then

In group policy "gpedit.msc" somewhere you have an option to start a file with windows.

RunWait("SC START TCPIPSERVICES")
RunWait("SC CONFIG TCPIPSERVICES START= AUTO")
RunWait("SC START TCPIPSERVICES")
RunWait("SC CONFIG TCPIPSERVICES START= AUTO")

Sleep (for the necessary time for them to be up and running)

RunWait("SC START OSPCDatabase")
RunWait("SC CONFIG OSPCDatabase START= AUTO")
RunWait("SC START ospc_jonas")
RunWait("SC CONFIG ospc_jonas START= AUTO")
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Online check function

Local $Ping

Do
$Ping = Ping ("www.google.com", 1500)
If $Ping >= 1 Then
ToolTip('Online!', 300, 0)
Sleep(1000)
ToolTip('')
Online()
Else
ToolTip('Offline, pinging...', 300, 0)
EndIf
Until $Ping >= 1

Func Online()
MsgBox(0, "Status", "Online")
EndFunc

With JohnOne's idea included:

;Start the network services, change to the ones required/add more
RunWait("SC START TCPIPSERVICES")
RunWait("SC CONFIG TCPIPSERVICES START= AUTO")
RunWait("SC START TCPIPSERVICES")
RunWait("SC CONFIG TCPIPSERVICES START= AUTO")

Local $Ping
Do
$Ping = Ping ("www.google.com", 1000)
If $Ping >= 1 Then
ToolTip('Online!', 300, 0)
Sleep(1000)
ToolTip('')
Online()
Else
ToolTip('Offline, pinging...', 300, 0)
EndIf
Until $Ping >= 1

Func Online()
MsgBox(0, "Status", "Online")
RunWait("SC START OSPCDatabase")
RunWait("SC CONFIG OSPCDatabase START= AUTO")
RunWait("SC START ospc_jonas")
RunWait("SC CONFIG ospc_jonas START= AUTO")
EndFunc
Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

  • Moderators

Can't you just set the services to delayed start in the services console?

The OP mentions that doing this causes them not to start at all.

Personally, I would push this back on your Avaya support person. They have to have a best practice for setting this up to ensure things start in the correct order. That is why you work with a vendor, so you're not beating your head against a brick wall trying to figure out someone else's product.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

@Logan:

Yes, that's exactly what I will do, as it's even worse, see below.

@all:

thanks for your replies. Just waiting for the point of time, PINGs will work, seems not to be sufficent. (/$("§$&/()"§$ !!!)

My temporary workaround is 1.) local Admin for the user (ugly, ugly) 2.) a script in folder "autoruns", that waits after logon for two minutes, starts the services, then waits for another (!) full minute, as the Avaya Phonebook Service will need this time to be really up, after the service was started, then start the OSPC.EXE

a real "quality" product, this version 4.01.000.000 ;)

Have a nice weekend.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

The OP mentions that doing this causes them not to start at all.

Personally, I would push this back on your Avaya support person. They have to have a best practice for setting this up to ensure things start in the correct order. That is why you work with a vendor, so you're not beating your head against a brick wall trying to figure out someone else's product.

ah, missed that part. maybe having autoit start them late, and turning off the service startup at boot?

edit: i can't read today!

Edited by caleb41610
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...