Tom's Hardware > Forum > Windows XP > Configuration & Customize > Automatically Launching Application after Logon

Automatically Launching Application after Logon

Forum Windows XP : Configuration & Customize - Automatically Launching Application after Logon

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

 

Hi,

The machine in question is in an unsupervised, Kiosk type environement. The
computer is a stand-alone XP pro. It reboots itself once a day. The OS
automatically logs on a user with limited permissions after each reboot. I
have put a shortcut of the application in the Startup folder of the user. So
far, so good...

The problem:
The app that's being auto-launched runs on a local instance of SQL engine
(MSDE). It sometimes happens that the SQL services have not had enough time
to initialize before the App is launched. So it fails.

How can I configure the app to launch after the SQL has initialized?

All I need is about 30 secs. Can I insert a wait period? Can I slave it to
SQL?

Thanks for your input,

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

 

Give this VBScript a go.

Option Explicit
Dim objWMIService, colRunningServices, objService
Dim oShell
Do While servstate <> "Running"
' msgbox "not running"
Wscript.Sleep 2000
Loop

Function servstate
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\.\root\cimv2" )

Set colRunningServices = objWMIService.ExecQuery("Select * " _
& "from Win32_Service Where DisplayName = 'MSSQLSERVER'" )

For Each objService in colRunningServices
servstate = objService.State
Next
End Function
Set oShell = CreateObject("Wscript.Shell" )
oShell.Run "E:\WINDOWS\system32\calc.exe"

Set objWMIService = Nothing
Set colRunningServices = Nothing
Set oShell = Nothing

(watch for line wrap)

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Tom Bombadill" wrote:
| Hi,
|
| The machine in question is in an unsupervised, Kiosk type environement.
The
| computer is a stand-alone XP pro. It reboots itself once a day. The OS
| automatically logs on a user with limited permissions after each reboot. I
| have put a shortcut of the application in the Startup folder of the user.
So
| far, so good...
|
| The problem:
| The app that's being auto-launched runs on a local instance of SQL engine
| (MSDE). It sometimes happens that the SQL services have not had enough
time
| to initialize before the App is launched. So it fails.
|
| How can I configure the app to launch after the SQL has initialized?
|
| All I need is about 30 secs. Can I insert a wait period? Can I slave it to
| SQL?
|
| Thanks for your input,
|
|

Reply to Anonymous
Tom's Hardware > Forum > Windows XP > Configuration & Customize > Automatically Launching Application after Logon
Go to:

There are 815 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them