banner



How Can Do A Service Start Before Login

Run customer script pre-login?

Hullo,

I'one thousand looking for a method where a script runs customer side earlier a user logs in after my script runs. What I'd like to do is have mine run, then information technology reboots, and before the user logs in the side by side time, my 2nd script runs.

Whatever Thoughts?

Chris.



Answers (8)

Purple Belt

A quick update, I found SRVANY from the resources kit to help, but I tin can't get the service to collaborate with the desktop before login, only mail service-login - even though the service appears to run at boot and is setup with localsystem privledges.

Posted by: bkelly 18 years ago

Red Belt

Are you in an Active Directory surround where Group Policy is available as an option? Information technology is not "exactly" what you are looking for, but I have seen people have a Grouping Policy assigned MSI run before logon (assigned to the machine) to practice its start steps, and then intentionally return a failure and reboot and then that the grouping policy object will run once more later on reboot (where the script accounted for this and completed the 2d part of the installation successfully). A scrap convoluted- simply it worked.

Practise you have another desktop management solution in place that may help you? I worked in an Altiris surroundings once and did what you lot are talking almost using their client service (ACLIENT).

Purple Belt

Howdy,

Thanks for your quick respond. I thought about and crossed out GPOs (although they are available) because the application script I need to build is going to be run at different times throughout the organziation between unlike users, without It stepping in. The user knows where to go (or is linked to past a manager) to install the awarding - any it wont exist every user, either.

Nosotros likewise run Altiris, notwithstanding, for the same reason as higher up, I can't utilize the Altiris solution. Nosotros wont exist pushing the upshot to machines (although we do for 100s of apps), this will be purely a user based install.

But, I'm glad y'all braught upward Altiris because at present I can use it every bit an example. If you've ever used it to button an image to a PC and the practice postal service-image configuration, you'll know of the big grey box that says "Please wait, configuring" that sits on tiptop of or sometimes backside the login window -- that'due south what I'1000 looking for. I tin can build the form, but can't get it to run pre-login.

Thank you Again!
Chris.

Posted past: bkelly xviii years agone

Red Belt

I have not supported a client that uses Altiris for some time, only worked with Altiris closely long ago. As a big customer I was able to get an undocumented feature added that is exactly what you lot are looking for. You'll have to exam it, because I got this feature added back with the release of version four.five This is the bargain:

I requested a way to trigger scripts during the postal service imaging process. What we came up with were batch files that the Aclient service looks for before doing its own matter. As far equally I know the characteristic remains undocumented:
When the service auto-starts, it looks for the existence of SCRIPT.BAT in the c:\altiris\aclient directory (I'm non certain if this is hard-coded to this location if yous have installed the service files elsewhere). If it is there, it runs the batch file and waits for it to complete. When done the Aclient volition found communications with the server.

It volition and so look for (and if nowadays execute, and expect for, PRECFG.BAT in the same path). Aclient will and so procedure whatsoever events scheduled from the server side equally normal.

This way you can choose to take action before or after the Altiris client communicates with the server- which was important to me at the fourth dimension.

Dorsum with Express 4.v, SCRIPT.BAT would execute before SysPrep, domain joins, etc. and was the reason there was a split batch file (PRECFG.BAT). However, with version five.x I believe that SCRIPT.BAT now executes later these post-imaging tasks (SIDGen/SysPrep, joining the domain).

Being that you are not trying to work this into your imaging process, yous should be able to simply run your “part 1” and create/re-create a SCRIPT.BAT file before rebooting. Upon reboot, SCRIPT.BAT will run prior to the user logging on. Just make certain you delete the batch file when you lot are washed or it will execute every time the service tries to offset.

Give it a shot and let the states know how it goes!

Purple Belt

Thanks Bob,

I tested putting SCRIPT.BAT into the ACLIENT folder and information technology does run the script before the ACLIENT initalizes and connects to the server. This will be great for time to come projects - however I don't see the GUI to the script that I was hoping to come across until subsequently the user begins their login.

Back to Google - I'll post my results :)

Chris.

Posted by: Stevie 18 years ago

Yellow Belt

IIRC, being able to interact with a desktop where no one is logged on requires that y'all acquire a handle to the currently displayed "Windows Station". This is somewhat more involved than just running a batch file or invoking a messagebox.

Posted by: bkelly 18 years ago

Red Belt

Agreed. This method of using Aclient volition simply allow you to initiate actions following reboot. That would satisfy running the 2d office of an installation requiring administrative access- which I believe would be the near common desire for this type of functionality. As for displaying information with nobody logged on- I would tackle that equally a split requirement (one that volition be pretty tough to realize).

I once used the windows background wallpaper to display data about an automated process where I did not want users logging on. I then set the default logon proper name to "Practice NOT LOG ON" in the registry. This got the job done for me, but I have not come across anything that will allow selective data be displayed prior to logon. If y'all should find it, you may be able to utilize this Aclient to kick it off.

If you lot do notice such a tool, please share it with the rest of us, and practiced luck in your search!

Purple Belt

Hello Anybody,

Thanks for your replies. I've gotten handles to windows before (for diverse VB projects), but that didn't even cross my mind. What I concluded upwards scripting yesterday was actually pretty close to the background idea from Bob.

We utilise the Novell client, so what I did was was create 4 BMPs for the different status messages that I wanted to be displayed (i.e. installing xyz, uninstalling abc, configuring app, etc). The BMPs are then used to replace the Novell default startup screen with status messages, and it doesn't even look like a login screen any more.

Second, I used SRVANY from the Windows 2000 Resource Kit to create a service that runs before login. The service calls a batch file called NEXTCMD.BAT. This batch file is created from my script each time it needs to practise a task on reboot.

And so what ends up happening is this:
i) User runs script (exe).
two) Script replaces Novell BMP with Status1.
three) Script creates service for NEXTCMD.BAT
4) Script creates NEXTCMD.BAT to run a second script for the 2nd chore.
5) Script uninstalls a peice of software and reboots.

Now when it comes back up, the status window uses the new BMP, and and so the service starts and NEXTCMD.BAT calls my 2nd script. So and then the 2d script:

i) Uninstalls some other peice of software.
two) Replaces Novell BMP with Status2
3) Rewrites NEXTCMD.BAT with pointer to tertiary script activity.
4) Reboots

And then this happens for steps 3 and 4. Then, after the last reboot, the NEXTCMD.BAT is deleted, and my custom service is stopped and removed.

Thanks Again Anybody!

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign upward! or login

View more than:

question

Related Questions

How Can Do A Service Start Before Login,

Source: http://www.itninja.com/question/run-client-script-pre-login

Posted by: greathouseinart1972.blogspot.com

0 Response to "How Can Do A Service Start Before Login"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel