PS – Register service

$destination = "D:\Publish\Snatch"
$filename = "Lottery.Automation.Services.Snatch.exe"
$servicename = "Snatch.Keno.Korea"
$description = "Snatch keno for korea market"


New-Service -Name $servicename -DisplayName $servicename -Description $description -BinaryPathName "$destination\$filename" -StartupType Automatic


# This is to delete the services
#(Get-WmiObject win32_service -filter "name='$servicename'").delete()
# This is to delete the services
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s