Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Install problem when face UAC

Posted on 2009-07-08
2
Medium Priority
?
428 Views
Last Modified: 2013-11-26
Hi

I'm an application developer, the program that I design was in .Net Framework 2.0 and I was using WS 2005 for VB and SQL Express to develop my application. My application will base on application start up path to attach the database and get some application setting and it was run perfect on XP and WIN server 2003 but recently I have few client that use Vista (All Edition) or WIN Server 2008 (All edition) was unable to run my application.

The problem was occur under UAC setting, one they turn on the UAC, the application that install under C:\Program Files\My Application\ will also create under Users\User\AppData\Local\VirtualStore\Program Files\My Application and window will always point to Users folder to get the database file and setting which my default was select the database file on application startup patch.

Can any one help on me on this issue?

Thank
0
Comment
Question by:leezone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Author Comment

by:leezone
ID: 24810220
bottom is how i connect to database
If is local user the connection string will be
 
strConnection = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|MyApplication.mdf;Integrated Security=True;Connect Timeout=30;User Instance=false"
 
If is network then connection string will be
 
            Dim dtServer As New DataTable
            Dim lDataset As New DataSet
            Dim ExportPath As String = Application.StartupPath & "\FMerge_Info.lic"
            Dim fs As New FileStream(ExportPath, FileMode.Open)
 
            gf_LoadNetworkConnectionbutton = True
            'Read import data from xml
            lDataset.ReadXml(fs)
            fs.Close()
 
            dtServer = lDataset.Tables(lDataset.Tables.IndexOf("M_FinmergeServer"))
            If dtServer.Rows.Count > 0 Then
                With dtServer.Rows(0)
                    myServer.IsNetwork = .Item(0)
                    myServer.ServerName = .Item(1).ToString
                    myServer.UserId = .Item(2).ToString
                    myServer.UserPassword = .Item(3).ToString
                End With
 
                If myServer.ServerName <> "" Then
                    strConnection = "Data Source=" & myServer.ServerName & ";Initial Catalog=" & strDbFilename & _
                                    ";User ID=" & myServer.UserId & ";Password=" & myServer.UserPassword
 
                    If CheckConnectionString(strConnection) = False Then
                        gf_LoadNetworkConnectionbutton = False
                        gclsError.gf_ErrorHandler("TestConnectionFailed", Windows.Forms.MessageBoxButtons.OK, Windows.Forms.MessageBoxIcon.Error, False)
                    End If
                Else
                    gf_LoadNetworkConnectionbutton = False
                End If
            End If

Open in new window

0
 

Accepted Solution

by:
leezone earned 0 total points
ID: 24821604
Hi all I already found out the solution which is just don't install the application under Program Files then UAC will not move the program under the Users folder.

But

The next problem will come out which is when attach the DB if you install the application under Root folder with UAC is turn on, you were unable to attach the DB because the permission for Full control was not tick

Soluation give the full permission for Authetication User then you were able to attach the DB if you run from script or If you run from SSME just run as admistrators then you will able to attach the DB
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question