Networks

General discussion

Installing Services from a Batch File

I have recently installed Timeserv.exe on our PDC and I am looking to automate the installation of timeserv as a service onto our user's pc's via a batch file. Normally the service is installed by opening RUN and typing timeserv -automatic. Is there a command that I can type into a batch file that will do the same for me?? I understand their may be a problem with admin privileges but that can be worked around.Thanks in advance

to install the program as a service, but then you would need to write a batch file in the same way as you would to run the "timeserv -automatic" command anyway. I presume you're copying the timeserv.ini file too, at the same time as delivering the timeserv.exe program; could you use a simple batch file that copies the files and then runs timeserv -automatic too??

You could even do an

if not exist %SYSTEMROOT%\System32\Timeserv.ini call [installit.bat]

to look and see if the app is already installed; this way it could become part of the user login script.

Installing Services from a Batch File

Jason, thanks for the prompt answer. I am new to writing batch files so I do not know what commands to use. I have got the batch file to copy timeserv.ini, .exe and .ddl, and I have tried to use 'start timeserv -automatic' to install it as a service followed by net start timeserv however it does not install the service.Do I have to be logged on as administrator or am i using an incorrect command? I am at my wits end as i cannot find the specific help i need.

Installing Services from a Batch File

The users must be able write timeserv.exe to %SYSTEMROOT%\System32 and timeserv.ini to %SYSTEMROOT%. This means that assuming the user is running this as part of their Login Script, they'll need to have write permissions (Local Admin Rights?) to the target directories. One way of avoiding this would be to use your admin rights and put the files directly on to the users' pc.

Logged on as an Administrator, you should be able to put the files on to the local workstations remotely.Try a "net use t: \\workstation-name\c$" in a command prompt from your workstation; this should map t: to the remote c: drive. You can then copy the files manually.("net use t: /d" to delete the mapping afterwards!)

You've still got the problem of installing the service now that the files are on the local HDD; Normal users won't have permissions to write in the services section of the local registry.

If you're just trying to sync client PC times, why not try out what the MS Article below says; leave the PDC to TimeSync with whatever it's currently talking to, and follow these instructions for setting up the PDC.

Start or search

Create a new discussion

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

Post type

Subject title

Topic Tags

Select up to 3 tags (1 tag required)

Cloud

Piracy

Security

Apple

Microsoft

IT Employment

Google

Open Source

Mobility

Social Enterprise

Community

Smartphones

Operating Systems

Windows

Mac

Malware

Tablets

Networking

Browser

Hardware

Software

Web Developerment

Linux

Off Topic

Message Body

Track this discussion and email me when there are updates

Please note: Do not post advertisements, offensive material, profanity, or personal attacks. Please remember to be considerate of other members. If you're new to the TechRepublic Forums, please read our TechRepublic Forums FAQ. All submitted content is subject to our Terms Of Use.