Running SumatraPDF from windows service

I can use Sumatra to print PDF from a windows service but the printer must be installed for the user the service is running as. If the user running the service does not have access to the printer, nothing will print.
 
To test you may log into the machine and go browse to the printer on the network, double click it to install the printer, now start the Sumatra service again, it will now print.
 
Dim printer_name As String = $"""{oPick.GetPickPDFPrinterName()}"""
Dim startInfo As System.Diagnostics.ProcessStartInfo = New ProcessStartInfo()
startInfo.FileName = IO.Path.Combine(My.Application.Info.DirectoryPath, "SumatraPDF.exe")
startInfo.Arguments = $"-print-to {printer_name} {FilenameToPrint} -exit-on-print -silent"

startInfo.RedirectStandardError = True
startInfo.RedirectStandardOutput = True
startInfo.UseShellExecute = False

startInfo.CreateNoWindow = True
startInfo.WindowStyle = ProcessWindowStyle.Hidden
Using proc As System.Diagnostics.Process = Process.Start(startInfo)
Dim soutput As String = proc.StandardOutput.ReadToEnd()
Dim eoutput As String = proc.StandardError.ReadToEnd()

Dim ReturnCode As Integer = 0
If proc.WaitForExit(15000) Then
If proc.ExitCode = 0 Then
oPick.MarkPickPDFAsPrinted(PickListVersion)
Else
Throw New Exception($"SumatraPDF.exe returned a non-zero return code,…
End If
Else
Debug.Write($"Sending pick PDF to printer possibly failed,SumatraPDF.exe timed out..
End If
End Using

Prevent “Service has been marked for deletion” while installing windows services

A reminder, if the above message is encountered when installing a windows service after removing a previous version, then

  • Close all instances of Event Log viewer
  • Close all instances of Services MMC (Microsoft Management Console) for all users on server
  • Use task manager to ensure the old service process is not running

 

  • Sign other users out of server if above fails

Since understanding the above the message no longer haunts me.

 

Stackoverflow post: How to solve “The specified service has been marked for deletion” error

Dynamics GP Conferences–which should I attend?– updated 2017

GPConference2

No matter how you interact with Dynamics GP, as a consultant, end user or software vendor, attending conferences is a vital element to keeping engaged with the product, alerting you to chances, what is possible and hearing from others’ experiences, good or bad. Visiting conferences allows you to network with peers, users, meet partners, domain experts, product vendors. Conference also offers exceptional learning opportunities for what is possible with your ERP solution by attending the conference sessions (usually presented as lectures or workshops). The networking opportunities at these events are incalculable in value, often offering opportunities to talk to the developers or program managers that create or shape the product, you really can get your voice heard! The expo halls at conferences also lets you discover products you never realised existed that may benefit your own or your customers’ businesses.

Maybe you are wondering what Dynamics GP conferences exist and which you should attend… read on…

First lets introduce some terms used, for those of you less familiar:

ISV Independent software vendor – companies who make solutions that integrate or work with Dynamics GP to enhance or extend its functionality
Partner Microsoft Partner – paid up companies in the Dynamics GP sales channel that have paid partner fees to Microsoft and have passed the partner criteria. They resell GP and/or offer consultancy around existing installations
End users People who purchased and use Microsoft Dynamics GP to run their companies

 

Amplify Amplify Conference Logo
Organisers Dynamic Communities & Microsoft
Location & Month USA March (3days) – Previously; California

Next - CHICAGO

 

Cost $699  (member discounts, partner rates & early bird discounts available)
Early booked flights  & accommodation from UK, approximately, £1100
Recommended
audience
Partners
Summary This conference is dedicated to Dynamics GP and thus is smaller than GPUG Summit that has parallel conferences for other Dynamics products at the same time. This lets it be focused on GP without the size and bustle of the larger Summit. It had less Dynamics product sellers in the expo floor vs summit due to the event scale. The event welcomes Microsoft Partners, Microsoft leaders, and business leaders. It is mostly focused on marketing and sales channel support for partners.

Microsoft supported so strong presence and support by Microsoft employees

 

 

GP Tech Conference Dynamics GP Tech Conference 
Organisers  Dynamic Communities & Microsoft
Location & Month USA Aug/Sept (4 days) – always Fargo ND
Cost $790-$1000 (early bird discounts available)
Early booked flights  & accommodation from UK, approximately, £1200
Recommended
audience

Previously was a partners ONLY event I think end users and ISVs may attend now (check to see if this has changed). This is much more technical in nature than the others. A MUST for

  • developers
  • BI specialists
  • infrastructure specialists
  • system architects

Expect lots of code and SQL scripts to be on screen most of the time!

Summary Small but intense conference held at the home of Dynamics GP, Fargo North Dakota, as a result there are outstanding opportunities to talk to the Microsoft team. The conference is much more in depth, being very technical in nature.
I’d say this is a MUST attend if you develop Dynamics GP extension add-ins or develop products for GP. If you have a company that has a GP consultancy arm, send your technical people to Fargo.

 

 

GPUG Summit  GPUG Summit 2017 logo
Organisers

Dynamic Communities & Microsoft

Location & Month USA October (4days) – previously Tampa FL USA, Nashville TN USA – Next Phoenix AZ USA
Cost $1000-$1900 (member discounts, partner rates & early bird discounts available)
Early booked flights  & accommodation from UK, approximately, £1100
Recommended
audience

End users from;

  • Customer end users
  • IT departments
  • ISVs (opportunities to sell or acquire sales leads via exhibitor hall)
  • Partners (chances to connect with your customers and update your consultants too)
Summary A large conference held simultaneously with NAV, CRM and AX conferences, thus benefiting from a strong presence by companies that service the Microsoft Dynamics market, as they can hit the entire market for the various Dynamics products in one venue! This is a big conference that gets busy. Ran by Dynamics Communities on behalf of the user groups and aimed at end users, power users and some developer content. Good selection of sessions on lots of subjects and a large exhibition floor of Dynamics ISV solution vendors. Generally well attended by the Microsoft MVPs.
Microsoft supported so some presence by Microsoft employees who will present some content.
If you are an end user, this is the MUST attend event for you.

Why are they in the USA?

USA

You notice that these conferences are all in the US, GP has its biggest market share in the US, and originates there, so this is not such a big surprise. If you are outside the US, don’t let this put you off, you should also look for local Microsoft Partner customer conferences, for example in the UK, m-hance have in the past had Errol from Microsoft and some of the Microsoft development team presenting, supplemented with staff from m-hance. Some strong content has been presented at these customer conferences in the past. As another example, MVP Ian Grieve has also presented some strong content at customer days for Perfect Image, another UK partner. These days are often free and usually open to anyone and can offer some valuable learning from a day out the office. Many of the other UK partners such as Advantage also offer such days.

The Dynamics conference scene experienced some seismic changes in 2016 where the Dynamic Communities took on much of the responsibility for supporting the product specific conferences, still supported by Microsoft. It seems that the upheaval has resulted in a reinvigorated conference schedule with Microsoft thankfully keeping involved by supplying the strategic vision and collaborating on the messaging.