I have a program that write a key to the HKEY_CURRENT_USER (it stores an email address there & I call it later to send to that address)
On form load a dialog opens & asks for email address.
Everything OK on testing the program, when I deploy the application the dialog doesn't open. I assume this has got to be something to do with what references I add.
I have added system & system32 but still doesn't work. The code I have is below.
Can anyone tell me what references to add & if/what to copy to output directory.
I'm using VBExpress 2008
I have added:-
Public Const c_strKeyName As String = "HKEY_CURRENT_USER\Software\TimWadSoftware\ServiceReport\"
Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load My.Settings.Reload() '------------------CREATE SERVICE REPORTS FOLDER IN C: DRIVE FOR STORING WORD DOCUMENTS-------------------- SerRepLoc = Environ$("USERPROFILE") & "\My Documents\Service Reports\" If My.Computer.FileSystem.DirectoryExists(SerRepLoc) = False Then My.Computer.FileSystem.CreateDirectory(SerRepLoc) End If '-------------------TO GET SENDERS EMAIL ADDRESS----------------------------------- MailAddress = CStr(My.Computer.Registry.GetValue(c_strKeyName, "EmailAddress", " ")) If MailAddress = " " Then frmMailAdd.ShowDialog()