Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

How to create a Service under Win Vista

Updated: 21 May 2010 | 11 comments
ResLi's picture
0 0 Votes
Login to vote
I want to create as System Admin a Service under Win Vista with Wise Script Editor (Create Service), which should execute an other EXE-File (created with Wise Script Editor too) as System Admin. In this EXE-File, executed once by the Service, an MSI should be installed.

By starting the service manually I always receive Error 1053: The service did not respond to the start or control request... and the service does not start and the MSI is not installed.

 
Any ideas how to create such a service under Win Vista?
discussion Filed Under:

Comments

VBScab's picture
30
Sep
2009
0 Votes 0
Login to vote

The arrangement you have...

...seems needlessly complicated. Why not simply use the MSI to create the service?

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

ResLi's picture
30
Sep
2009
0 Votes 0
Login to vote

Sorry, VBScab, the

Sorry, VBScab, the description was not complet enough.

There are 3 MSI's to be installed by the EXE-File, each after the other and controlled by a While-Loop regarding the correct Error-Code (0). And after the installaton of the last one, the service shoud by stopped and disabled by the EXE-File.

EdT's picture
30
Sep
2009
0 Votes 0
Login to vote

Still appears over complex

Just deploy the MSI files individually - it makes no sense to use a service to do this.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

slb's picture
30
Sep
2009
0 Votes 0
Login to vote

...Is there any good reason

...Is there any good reason behind this approach/logic?

As an alternative for the error you receive you may also try out using SC command in the command prompt to create service of your choice and check out.

Hope it helps!!

ResLi's picture
30
Sep
2009
0 Votes 0
Login to vote

The reason is...

The reason is the following: We are deploying via SMS/SCCM a VPN-Application based on Internet Explorer.

If a user is connected via active VPN e.g. IE, it is not possible to upgrade or update this application. Therefore the necessary files will be copied via SMS/SCCM on the local machine and, if VPN/IE is not active, the created service will be able (in a System Admin-Context) to install this update.

I hope, somebody has a solution for this request, Thanks anyway

VBScab's picture
30
Sep
2009
0 Votes 0
Login to vote

Does the SCCM job interact with the user?

If so, all you need is a Custom Action in the MSI (which SCCM will copy locally before executing) which checks for the IE and VPN processes. If either is active, the user gets prompted to close them. As soon as the processes are shut down, the CA progresses.

If the job isn't interactive, write to the WI log that the processes were present and that the install was therefore aborted.

If my understanding of SCCM is correct, th ejob will keep executing until it succeeds or the advertisement expires.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

ResLi's picture
30
Sep
2009
0 Votes 0
Login to vote

Yes, but...

... the VPN-Application consists of three different MSI's to be installed. I can place the Custom Action in the first MSI, which will check the active VPN/IE. But what's about the two others? Nested MSI's are not best practive, or?

The other scenario is: The user has an active VPN-Connecton and SCCM therefore only copies  the necessary files to the local hard disk. The user keeps connected, then close the connection and makes a shutdown. After the restart of the machine he will no more be able to install the files as there is no connection and therefore no SCCM available. And the user has no priviliges to install the MSI's himselve.

My "nice" idea was, that a service could do this in a System Admin-Context (e.g. after the restart, starting the service, checking VPN/IE-Connection, installing the files, stopping and disabling himselve)...

Thanks for your help
ResLi

EdT's picture
01
Oct
2009
0 Votes 0
Login to vote

Question

Do all three MSI files have to have the VPN inactive when installing?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

ResLi's picture
01
Oct
2009
0 Votes 0
Login to vote

Yes,

i think so as all 3 MSI files belong to the entire VPN-installation.

ResLi's picture
02
Oct
2009
0 Votes 0
Login to vote

Question/Problem solved...

Thanks for all advices regarding my question/problem! The best one was to use the functionality of SCCM itselves (special Thanks to VBScab...)! So I wrote a Wise Script (EXE) who installs the 3 MSI's locally. In the same script then a loop will start controlling an active Internet Explorer. If IE is not active, MSI's will be installed.
 
Now, as I mentioned, the VPN-Application is based on IE and therefore it never can be updated if the user receive this Update via SCCM over an active VPN-Connection. The loop will start and only if the VPN-Connection is closed, MSI's will begin to install with Admin rights controlled by the SCCM-Agent on the machine.
 
However, a self created Service who could do this too would be nice - especially for those who does not use SCCM...
 
EdT's picture
02
Oct
2009
0 Votes 0
Login to vote

Do you need a service at all?

To install the service, you are going to need administrator access. If you know the admin account and password, you could use the "RUNAS" wisescript from Dragonsoft (http://wisescript.dragonsoft.us/scripts_5.php) to run your install with admin privileges. The install could be triggered using the RunOnce registry key so that it gets started during bootup before the user has time to open any apps. Since the wisescript is compiled, the admin password is hidden.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.