Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Authenticating Server Info


3 replies to this topic

briggsy

briggsy
  • Members
  • 4 posts

Posted 13 February 2004 - 23:15

Hi everyone,

I'm new here. I'm a .NET programmer, and I've recently been asked to fix a few things in the setup program for our application. (We're using Wise for Windows Installer Standard edition.)

What I need to do is take the servername/username/password for a Microsoft SQL server (entered into textboxes by the user) and make sure that they're valid (i.e. I need to make sure I can actually connect to the server and have permissions to "do things' on it with the given username and password).

I've only been using Wise (and Windows Installer) for about 3 days now, so I'm completely lost and clueless unsure.gif If anyone could point me in the right direction, I'd appreciate it.

Thanks!
~ clueless when it comes to setup programs smile.gif

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 February 2004 - 12:10

You would have to create a custom action that does "something" (e.g. call a DLL function or a VBScript) to validate the data. What this "something" would be has to answered by someone with good SQL Server knowledge. The problem is not doing it in Windows Installer, but knowing what SQL Server functions to call for that purpose.

briggsy

briggsy
  • Members
  • 4 posts

Posted 16 February 2004 - 20:10

Okay - I've create a small C++ dll that just returns 1 for right now, to see if I can hook it up to the Setup properly. When I run Setup and click the button that's supposed to launch the CustomAction, I get this message: "Error in CustomAction. The function AuthenticateServerInformation could not be located in the library ........" and then it gives this long location string C:\WINNT\......WiseCustomCalla9.dll.

I don't know what I'm doing wrong here - I've never done anything like this before sad.gif Am I not exporting the function correctly, or not hooking up the Setup button correctly, or what?

I used the standard

long __stdcall AuthenticateServerInformation(){}, which I thought was how to export the function.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 February 2004 - 20:25

I guess the function name get mangled. You may need to use a .def file.
Take a look at this sample:
http://codeproject.c...ustomaction.asp