|
#1
|
|||
|
|||
|
Check if allowed to update using ASP and Trueupdate
Hello All,
We are evaluating True update and are impressed so far! We have one issue that we require help with if possible. OK, so.... We have an application, that stores a registration key in the users registry. We want to send this key to a site using ASP, and get a TRUE / FALSE statement back. If the statement is True (the software is licenced), then I need to let the update continue. If it is False, then the update should display a dialog with a message and a close button. This may sound simple to some here, but I am not a programmer, and I am trying to convince the programmers to get this software. If someone can give specific details on how this is done (preferably on the Trueupdate and ASP side), I will be given the go ahead to get the package. Thanks in advance. Nick Whittome. |
|
#2
|
|||
|
|||
|
Re: Check if allowed to update using ASP and Trueupdate
This is actually quite simple. While I am just starting with TU, I have completed a few Setup Factory projects that use the very process you are describing.
To accomplish the task, use the Submit to Web option to submit data to your ASP page. The tricky part is the ASP code must handle the ASP delimeters ("<%" & "%>") a little special. The best way I have found is to fool ASP by concatenating two strings together, i.e. "<" & "%" to make the return info work correctly. The its very simple to examine the returned value or values - and install if ok. Somewhere under the Setup Factory Forum, I had listed some sample ASP code that might help. I'm not sure how to link to it, but if you can't find it, let me know. |
|
#3
|
|||
|
|||
|
Re: Check if allowed to update using ASP and Trueupdate
Hi Greenace...
Yes, I found your posts.... Thanks... However, I could not find any demo ASP code that returns the results to Trueupdate. (I am not a programmer - LOL). Maybe you could give more detail if you have time. |
|
#4
|
|||
|
|||
|
Re: Check if allowed to update using ASP and Trueupdate
Here is my ASP Code that returns a value.
<html> <head> <title><%=sTitle%></title> </head> <body> <% 'Incoming Data From SetupFactory 'UserName map to AFUsername 'Password map to Password 'PName map to ProductName 'PVersion map to ProductVersion 'RegOwner map to RegOwner 'RegOrg map to RegOrganization 'OS map to OpSystem 'Domain map to LANDomain 'IP map to LANIP 'NIC map to LANNIC 'User map to LANUser 'InstallId map to InstallId 'Action map to Action ClientsIP = Request.ServerVariables("Remote_Addr") dim oktoinstall,returntext,edate,p1,p2,p3,p4,p5,CurDat e,InstallKey,Id,CIP Set conn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") sql = "SELECT * FROM users WHERE AfUsername ='" & request("username") & "'" Conn.Open dsn sql1 = "INSERT INTO installs(AFUsername, Action, ProductName, ProductVersion, RegOwner, RegOrganization, OPSystem, LANDomain, LANIP, LANNIC, LANUser, InstallId, ClientIP) Values('" & request("Username") & "', '" & request("Action") & "', '" & request("PName") & "', '" & request("PVersion") & "', '" & request("RegOwner") & "', '" & request("RegOrg") & "', '" & request("OS") & "', '" & request("Domain") & "', '" & request("IP") & "', '" & request("NIC") & "', '" & request("User") & "', '" & request("InstallId") & "', '" & CIP & "')" conn.execute(sql1) rs.open sql, conn If NOT rs.EOF Then CIP = ClientsIP If trim(request("password")) = trim(rs("password")) Then Select Case rs("activation") Case"0" oktoinstall = false returntext = "The Margin Master Account has not been activated" Case"1" edate = cdate(rs("expiration")) CurDate = cdate(Date()) if CurDate > edate then oktoinstall = false returntext = "The Margin Master Account has expired" else oktoinstall = true returntext = "Valid Username Password and Activation" Id = request("InstallID") InstallKey = Mid(Id,7,1)+Mid(Id,1,1)+Mid(Id,6,1)+"-"+Mid(Id,2,1)+Mid(Id,5,1)+Mid(Id,3,1) end if Case"2" oktoinstall = false returntext = "The Margin Master Account has expired" Case else End Select else response.write request("password") response.write rs("password") oktoinstall = false returntext = "The Password is invalid" end if Else oktoinstall = false returntext = "The UserName is invalid" End If rs.close set rs = nothing conn.close set conn = nothing p1 = "<SUF60>"+"%OKtoinstall%,%ReturnText%,%expdate%,%W ebKey%</SUF60>" p2 = "<"+"%OKtoinstall%"+">" & oktoinstall & "</%OKtoinstall%"+">" p3 = "<"+"%ReturnText%"+">" & returntext & "</%ReturnText%"+">" p4 = "<"+"%expdate%"+">" & edate & "</%expdate%"+">" p5 = "<"+"%WebKey%"+">" & InstallKey & "</%WebKey%"+">" response.write p1 response.write p2 response.write p3 response.write p4 response.write p5 %> </body> </html> |
|
#5
|
|||
|
|||
|
Re: Check if allowed to update using ASP and Trueupdate
Thanks Greenace...
Well, I was on the phone with Mark at Indigorose today, and between this and that we have it working! THANKYOU! I will post a new message with the solution to this forum soon. |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 05:31 AM.






Linear Mode
