Real Geek Forums  

Go Back   Real Geek Forums > Archives > Operating Systems > Windows XP > Windows XP Configuration & Management

Notices

Reply

Automatically Launching Application after Logon

 

LinkBack Thread Tools Display Modes
Old 08-31-2005, 04:06 AM   #1 (permalink)
Default Automatically Launching Application after Logon

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,


Tom Bombadill
Guest
 
Posts: n/a
Reply With Quote  
Old 08-31-2005, 03:15 PM   #2 (permalink)
Default Re: Automatically Launching Application after Logon

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,
|
|


Dave Patrick
Guest
 
Posts: n/a
Reply With Quote  
Reply

Tags
None

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

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


All times are GMT. The time now is 09:33 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright © 2005 - 2007 RealGeek.com. All rights reserved.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90