![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Can a service be registered via Powershell? Hello! I'm relatively new to Poweshell and could not find an answer to this question via an Internet search or a search of this newsgroup. (Perhaps I'm not using the most appropriate search terms.) Given a file, SERVICE.SYS, how would one register that file with the Service Control Manager via PowerShell? Thanks! -Ross |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: Can a service be registered via Powershell? Ross J. Micheals wrote:
named sc.exe that should help. PSH>sc.exe /? PSH>sc.exe create /? You're not really doing it *with* PowerShell... Marco -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com | ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Can a service be registered via Powershell? You can with the New-Service cmdlet. It creates a new entry for a Windows Service in the registry and the Service Database. You can set the display name, description, startup type and dependencies of the service. BTW, I've never seen SYS files registered as a windows service. Check the help for more info: help New-Service -full ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
PSH>> sc.exe create /?
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
| | #4 (permalink) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Guest | Re: Can a service be registered via Powershell? On Mar 12, 9:39*am, Shay Levi <n...@xxxxxx> wrote:
The file "service.sys" is most likely a *driver*, not a windows service in the classic sense, although you could be forgiven for thinking this; drivers are also known as "services" in certain contexts. Drivers such as these are found in %systemroot% \system32\drivers although just dropping the file in there is not enough. If you find yourself with such a file, you are almost certainly missing crucial parts (namely a setup.inf or other install information) of the package. What does this file supposedly do, why do you want to install it, and where did you get it from? Yours interrogatively, - Oisin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | #5 (permalink) | ||||||||||||||||||||||||||||||||||||||||||||||||
| Guest | Re: Can a service be registered via Powershell? This is very helpful, thank you. I don't know why I hadn't found that myself. As for it being a '.sys' file, I'm not sure either. I have documentation that states "After installing the REDACTED.SYS driver it is necessary to add it as a service. This need only be done once." I was just going by that documentation. Thanks again! "Shay Levi" wrote:
| ||||||||||||||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||||||||||||||
| | #6 (permalink) | ||||||||||||
| Guest | Re: Can a service be registered via Powershell? "Ross J. Micheals" <RossJMicheals@xxxxxx> wrote in message news:F428ACC1-68C5-44BB-866F-68673F469A71@xxxxxx
Advisable to check that documentation thoroughly, since if it's a driver then it's likely to require a boot or system level startup, which you can't do with New-Service. -- Jon | ||||||||||||
My System Specs![]() | |||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| when run powershell script as windows service ,powershell fail | powershell fail on winodws 2008 | PowerShell | 6 | 01-15-2008 03:20 PM |
| get-service cmdlet in powershell v2 (ctp) | RG | PowerShell | 3 | 12-14-2007 03:43 PM |
| PowerShell hangs while getting data from Web Service. Please Help. | Raj Tripathi | PowerShell | 3 | 04-05-2007 12:42 PM |
| Using PowerShell to change service descriptions | matt R | PowerShell | 1 | 03-27-2007 07:42 AM |
| Powershell Script as Windows Service | tobias.kuhn@gmail.com | PowerShell | 5 | 02-08-2007 12:00 PM |