I'm writing a WPF .NET application (fwk 4.0) which references log4Net and must be installed in the 'Program Files(x86)' directory on a Windows 7/8/10 64bits OS.
The application logs created by the application are .txt files created in the installation sub-directory of the 'Program Files(x86)'
This application also uses on the SQL Server CE 4.0 in the same subdirectory.
C:\Program Files(x86)\MYAPP\APP1\APP1.txt
C:\Program Files(x86)\MYAPP\APP1\CEDatabase.sdf
The application is installed by a local administrator.
To start the application, a standard user is prompted by UAC to start with an elevated acess token (admin privileges) to run the application because it won't start otherwise (I think ACL not granted to create and write logs).
The WPF application build holds no application manifest.
My client is frustrated by the fact that a standard user can not start the application without the UAC elevation. Moreover, it wants to keep on installing in the 'Program Files (x86)'.
What can I do to manage this situation?
I'd strongly suggest not writing the log files to the same location as you install your application, but instead to one of the standard public locations, which you can access by environment variables.
See this link for more details on how to set this in Log4Net : How to specify common application data folder for log4net?
The two common locations to log to which avoid UAC restrictions are:
CommonApplicationData (https://msdn.microsoft.com/en-us/library/windows/desktop/aa367992(v=vs.85).aspx) which is a location where all users can write to, so you might want to use this if you want a common logging location regardless of who is logged on to Windows and running your application.
LocalAppData (https://msdn.microsoft.com/en-us/library/windows/desktop/aa369768(v=vs.85).aspx) which is a location specified to your currently logged on user. This would allow you to keep your log files from different Windows users separate from each other.
I'm not sure off the top of my head whether you'd have the same issue with writes to the SQL Server CE database. The pattern I've followed in the past to work with UAC is to install all static files under Program Files, then all data under one of the above 2 mentioned folders depending on whether the application data and logging was per-user or per-installation.
Related
On my domain server 2012r2I am trying to deploying office 2007 but not all of the office I need to install only excel and word
I found an .msi file within the dvd installation and found many .msi packages
called ExcelMUI.msiand WordMUI.msi at directory
...\English\Excel.en-us\ExcelMUI.msi
...\English\Excel.en-us\WordMUI.msi
can I use them to deploy only excel and word through domain server 2012r2?
are they valid as .msi packages installer ?
Best Guess: I wonder if those MUI-setups are Multilingual User Interface setups. I think you should get on a virtual machine and try to run the setup.exe instead (if there is one) and then go to "Custom" or equivalent to see if you get a feature selection dialog. Then you should select Word and Excel to install fully and you can disable most other features (don't disable the shared features, just the other apps would be my suggestion - Outlook, PowerPoint, etc...). It is possible that those MSI files you mention can be used directly. You could try to run them - but only on a virtual of course. Or on a computer which does not matter - test computer of some sort. Look for a custom option and a feature dialog there too. Sorry, all I can suggest without installation media access.
Sure?: With all that said, Office on a domain server? Do you mean domain controller? (hope not). Sounds like a very dangerous move if you ask me - with all the security holes Office contains. At least make sure to run Windows Update or Office Update or whatever mechanism you have to deploy security fixes. Can I be curious and ask why the server needs Office? Is it for automation only?
Viewer for MSI Files: You can open and inspect MSI files using the free tools Orca, SuperOrca or InstEd (links towards bottom). I have an old answer on superuser showing how MSI features can be seen inside the MSI file.
I been working on installing Oracle 12c database on my windows machine. I downloaded the Microsoft Windows x64 (64-bit 2.8GB) file here.
Then I extracted the zip file into a folder in my Desktop and run the setup.exe
But I keep on getting this error and am unable to move forth.
[INS-30131] Initial setup required for the execution of installer validations failed._______________________________________________________________Cause - Failed to access the temporary location. Action - Ensure that the current user has required permissions to access the temporary location. Additional Information:
- PRVG-1901 : failed to setup CVU remote execution framework directory "C:\Users\Taro\AppData\Local\Temp\CVU_12.2.0.1.0_Taro\" on nodes "nayantara-jeyaraj" - Cause: An operation requiring remote execution could not complete because
the attempt to set up the Cluster Verification Utility remote
execution framework failed on the indicated nodes at the
indicated directory location because the CVU remote execution
framework version did not match the CVU java verification
framework version. The accompanying message provides detailed
failure information. - Action: Ensure that the directory indicated exists or can be created and
the user executing the checks has sufficient permission to
overwrite the contents of this directory. Also review the
accompanying error messages and respond to them. Summary of the failed nodes nayantara-jeyaraj - Version of exectask could not be retrieved from node "nayantara-jeyaraj" - Cause: Cause Of Problem Not Available - Action: User Action Not Available - Version of exectask could not be retrieved from node "nayantara-jeyaraj" - Cause: Cause Of Problem Not Available - Action: User Action Not Available
According to the error, I checked the C:\Users\Taro\AppData\Local\Temp folder permissions under its properties panel's security tab. All the users have full access permissions.
This helped me:
setup.exe -ignorePrereq -J"-Doracle.install.db.validate.supportedOSCheck=false"
I also
run the console as administrator
checked whether a REG DWORD named AutoShareWks (in registry Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters) exists. It did not. But if it would, make sure that the value is set to “1” and restart.
Stopped the OracleRemExecServiceV2 service
I am trying to configure CI using Visual Studio Online. I've configured GIT and made the build. It is automatically building with every push I make. I want to automatically publish my changes to my database (stored on my server). I've created publish config for that, made the connection string there and put the password in that config. It is working great however is there any way to store the password (other than plain text)?
It is a problem I have tried to fix myself (how do I have an open source project and still have builds with credentials in). The reality is that you can't store credentials in a public place and used by a public server without making them public.
You need to decide whether you trust VSO or not, if you do then you can give it your credentials and if you don't then you can't.
Normal things that you would do such as running the CI process under a service account or giving the account a certificate won't work for VSO because each build happens (seemingly from my testing) on a clean machine each time so you can't pre-configure security settings.
The best that you can really do is to only allow access to your database from known locations i.e. vso and whatever accesses the database rather than everywhere.
ed
I need to copy my SQL Server DBs to a folder. The files are attached to SQL Server, which I have detached using my code. When I try to copy these files using
My.Computer.FileSystem.CopyFile(filePathToCopyFrom1, targetFilePath1)
It returns error:
"Access to the folder D:\MyDbs is denied"
When I manually coped these files, it asked "You need Administror permission to copy these files" I clicked continue and it worked but how to fix this using my vb.net code?
I have given Full Control to administrator from Windows but still it did not work.
Thanks
Seems that the detaching process went well. You can copy through windows explorer, but not from you application. The key difference here is that the files are protected to be accessed by the administrator user only.
Then, you need to run your application using an administrator windows account so that the application inherits the permissions of the user to be able to perform this operation.
Remember, if you are using Windows Vista+ (which I assume you do) the root folder is almost off limits. You can run the App as Administrator, or copy it to a folder in the root. The other point is that where you copy from. If the DB is currently in Program files, it is very possible that you will get this problem as well, and then you will have to run the application as Administrator.
Right click on the application, and select Run as Administrator, or select properties and in Compatibility check the box that the program should be running as Administrator. If you use the latter, then a box will pop up every time you run it, unless you change the User Account Control settings.
I am having trouble sorting through all the information / various options in regards to Access 2007 used in a multi-user environment. Here is a brief description of my current situation. At work there is the "Business LAN" which I can log on and use to monitor two other servers via remote desktop. The business LAN is strictly controlled by our IT department and no one is permitted to install any software or drivers without their consent. I do have administrative privileges on both servers though.
The two servers that I log on to using RD are used for essentially the same task, which is to monitor and control the heat to different process lines. Each server runs a different program to accomplish this task but both programs use SQL Server as a back end.
I created two access databases (one on each server because they are currently behind seperate firewalls) in order to query information from the backend SQL side of these programs and combine it with relative information I have compiled in tables in order to add more detail to the data the programs are collecting. My program is still in the debug stage but ultimately this information can then be accessed by field techs / maintenance in order to make their job easier. Maintenance staff can also add even more information based on the status of repairs etc....Last, I have created reports which can be run by Managers / Engineers who are looking for an overall status of their area.
Both access db's are split so that the back ends are seperate from the forms, queries, etc... I use an ODBC data source to import a link to SQL. I am using vba for user authentication, user logging record updates, and user / group access control. Everything works the way I intended except the fact I everyone who logs on the server will be trying to run the same copy of the front end. For example, I had a co-worker log on to the server via RD to test the program and I logged on from my desk. After logging in I could see the forms he had open. Access was already running. Without being able to install access locally (or even runtime, due to IT restrictions) on to each individuals workstation, I'm not sure what approach to take to resolve this.
Additional info, Server 1
One of the servers is considered to be the "master server" in which a number of client stations "slave servers" all communicate with. The only way to access folders on themaster server is log on to the client station and run RD.
Server 2
This server is considered to be the "historian". It communicates with a terminal server in which users log on using RD and run applications which use SQL backend which resides on the historian. I have been able to set up shares so that certain folders are visible on the historian from the terminal server.
Can anyone tell me what my best option is?
Thanks in advance.
CTN
It's really crazy the way some IT departments do everything possible to make it hard to do your job well.
You allude to users logging on via Terminal Server. If so, perhaps you can store the front ends in the user profiles of their Terminal Server logons? This assumes they're not just using the two default admininstrative Terminal Server logons, of course.
The other thing that's not clear to me is why you need a back end at all in Access/Jet/ACE -- why not just link via ODBC to the SQL Server and use that data directly? The only reason to have an independent Jet/ACE file with data tables in it in that scenario is if there is data you're storing for your Access application that is not stored in the SQL Server. You might also have temp tables (e.g., for staging complicated reports, etc.), but those should be in a temp database on a per-user basis, not in a shared back end.
Here is a suggestion how to implement what David Fenton wrote: write a simple batch script which copies your frontend from the installation path to %TEMP% (the temporary folder of the current user session) and runs the frontend from there. Something along the lines of
rem make sure current directory is where the script is
cd /d %~d0%~p0
rem assume frontend.mdb is in the same folder as the script
copy /y frontend.mdb %temp%
start %temp%\frontend.mdb
Tell your users not to run the frontend directly, only via the batch script, then everyone should get his own copy of the frontend. Or, give your frontend a different suffix in the installation path and rename it to "frontend.mdb" when copying to %temp%.