![]() |
| |||||||
| Notices |
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| 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, | Guest
Posts: n/a
|
|
| | #2 (permalink) |
| 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\cim v2") 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, | | | Guest
Posts: n/a
|
|
![]() |
| Tags |
| None |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GINA Logon: Winlogon.exe Application Error | sean | Windows XP Embedded | 2 | 10-04-2003 12:10 AM |
| *.Exe launching other apps | Anne-SOphie | Windows XP Basics | 2 | 08-26-2003 03:45 PM |
| Screen display goes weird when launching an application | Chris Nagel | Windows XP Performance & Maintenance | 0 | 07-30-2003 02:20 AM |
| Logon.scr Application error | Jagfan | Windows XP Basics | 0 | 07-16-2003 11:23 AM |
| Application error 0xc0150004 when launching TaskManager | Carl Hilton | Windows XP | 1 | 07-14-2003 05:38 AM |