Login  
Search All Forums
Dart Home | PowerTCP FTP for ActiveX | Custom Development Reply | PowerTCP FTP for ActiveX Topics | Forums   
AuthorForum: PowerTCP FTP for ActiveX
Topic: How do add license to console app
timoct
timo@ctcommunitycare.org

From: Bristol, CT USA
Posts: 7
Member Since: 05/13/03
posted January 24, 2012 5:35 PM

I have an app that must be re written to be totally non interactive. I've had this code working for years on my company's Windows XP machines. 

The problem is, app runs as a scheduled task, and now that we have just purchased all new Windows 7 machines, the app is failing because the Win7 task scheduler does not allow interactive programs.

How to I get the add the registration key to the app in Visual Basic 2010? All I had to do when I had a window to work with was drop a control on it and I was done. This app isn't even working when I use an invisible window...
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted January 25, 2012 8:37 AM

Hello,

Have you tried following the steps outlined in the 'Dotnet/COM Interop and Licensing' help topic under 'PowerTCP within the .NET Framework' in the help documentation? The latest help documentation may be found here: http://www.dart.com/help/powertcp.zip

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

timoct
timo@ctcommunitycare.org

From: Bristol, CT USA
Posts: 7
Member Since: 05/13/03
posted January 26, 2012 10:38 AM

Tanks for the tip. I've got it working as shown below:

Module AutoReceive
  
Public WithEvents AxFtp1 As New AxDartFtp.AxFtp
Public Const SERIAL_NUMBER As String = "xxxx-x-xxxx-xxxxxx:xxxxxxxx"

Sub Main()
Dim fieldInfo As System.Reflection.FieldInfo
fieldInfo = GetType(System.Windows.Forms.AxHost).GetField("licenseKey", Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Instance)
fieldInfo.SetValue(AxFtp1, SERIAL_NUMBER)
AxFtp1.CreateControl()
......

I used the serial number I found in the registry and it appears to be working. I notice it is a little longer than the one in the license app, which has he format xxxx-x-xxxx-xxxxxx. Theserial number is the same but does not have ethe semicolon followed by the additional 8 digits at the end.

I've successfully run this on several machines now, can I e sure I won't have any issues with the license?? Would it have given an error already if it was incorrect?
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted January 26, 2012 10:58 AM

Hello,

Yes, you would have received a messagebox indicating no license was found. If you're able to use the executable on a machine that does not have a license installed for the component, then you shouldn't have any problems with the license.

The additional 8 digits are a unique identifier that validates the license, and should be left in.

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

Reply | PowerTCP FTP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX