VS 2010 Setting Permissions On CommonAppDataFolder
Feb 15, 2011
My app needs a config file that can be written to by the user. I've got the Setup project to install it to [CommonAppDataFolder][Manufacturer]][Product] but that folder is then read only to normal users (which defeats the point really!).
I've read various articles on the internet on how to solve this, ranging from making the app a Full Trust ClickOnce app to running a separate app post install to change the permissions.
I'm trying to set ACL's on a folder using Directory.SetAccessControl. More specifically, I want to grant "Users" full control on a folder. AddFileSecurity works perfectly. AddFolderSecurity does not. It's result is that "Users" will get added to the folder's ACL but "Full Control" is not checked off (nor are any other permissions). Here is the code I am using which is basically taken right from MSDN documentation [URL]
I want to grant read access to a file in a server folder for the group servernameusers. This code works fine to set it for a specific user account, [URL], but I want everyone (all users) to get the right to read the file.
I am trying to change the permisions of the following registry key from within VB.net:- HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSLicensing Basically need to change users to full control. I need to change permissions for the "users" group.
I can seem to find is vbs code for retrieving remote share permissions using WMI.I've tried to convert this code to run on vb.net but don't seem to be getting anywhere.should I try to convert the below code or are there other methods I can use to retrieve the permissions. I can easily get the list of remote shares using win32_share but not the permissions
I've search tons of .net pages and all I can seem to find is vbs code for retrieving remote share permissions using WMI.I've tried to convert this code to run on vb.net but don't seem to be getting anywhere.hould I try to convert the below code or are there other methods I can use to retrieve the permissions. I can easily get the list of remote shares using win32_share but not the
Just tried to create a new Data Source in VB 2010, apparently I don't have permission to connect to the 'Login.mdf' file I recently created in SQL 2008. Does anyone here have any knowledge of how to surpass this problem? I'm the Administrator of my PC and have full permissions and UAC is turned off so that shouldn't be the problem either
I've been struggling for hours now to get some working code to list the share permissions of a remote share. I've got WMI code which uses win32_share which lists the shares and path and it works great. I"m now trying to add in a routine to get the share permissions as well.
I've searched just about every site for some sample code and can only find some C# (I think) code.
my program read and writes into registry and has been working fine, until today when i tested it on a new server i got this error request for the permission of type system.security.permissions. registryPermissions, mscorlib,version=2.0.0.0. i checked the registry permission and made sure all allows are ticked.
In my vb.net winforms application using Visual Studio 2010, I'm trying to work something out and my brain just isn't working today. I'm rewriting this application to make it more efficient and trying to minimize the sql calls.
Currently it works like this.User logs in to the app, it loads the main form, where the user can open up different forms to access different client data. Each time a record is loaded in one of these new forms it also loads that specific users permissions from a Sql Server 2005 table.
What I want to do is when my main form loads after the user logs in, is load a public dataset or datatable, or any other suggestion, storing that users permissions so I can access them locally without hitting the sql server every time the user opens a client record.
I am not going to explain my whole project or why I want it do this...Ok... so for example my myfile.txt file would contain the word "hello"ashuming this would work (which it didnt):dim myfile as String = application.startuppath("/myfile.txt")on form1 load: textbox1.text = myfileunfortunately instead of it sending the value of the file it sends to file location.
I'm working on my own project management software and I'm having trouble linking the database with the interface and then coding it so that the components interact with the database. Can anyone refer me to a good tutorial. I tried the MSDN and found that to be a little too over my head.
I'm using VB2010 (10.0.40219.1 SP1Rel) and .NET 4 (4.0.30319 SP1Rel) on Windows 7, when I press F1 for a VB item I get help for VB 2008 and .NET 3.5; how do I set those to the correct values? I have run "Check for updates online" under "Manage help settings", and rebooted; no change.
The Window Layout setting seems to have gone away in VS 2010. I'd rather my environment default to Multiple Documents. I really can't stand Tabbed. Tabs are good for browsers and cell phones, but not so good for a programming IDE.
I have a problem setting the checked state of checkboxes in a listview programmatically.
Background: I have a Windows Form Application which uses CheckedListBox�s. The names/labels for each CheckBox in the list are imported for a database. Also in the database is a field which defines whether the CheckBox should be Checked or Unchecked. The program works fine.
Problem: My requirement is to add a tooltip to each item in the list of checkboxes. I have read that the best/easiest way to do this is to use a ListView instead of the CheckedListBox. I have setup a ListView with CheckBoxes = True and View = Details. I have populated the ListView with the items from my database. The ListView now looks exactly like the CheckedListBox and the tooltips work fine.
My problem is that I can�t seem to find a way of setting the CheckBox�s to Checked programmatically. Is there a way to do this, or is there a better way of achieving what I am trying to do?
I have an existing zip file. I would like to set a password to my existing zip file. I know how to zip, unzip using SharpZipLib. I am wondering, Is there a way to set a password without extracting and re-creating the zip file with password?
This is in a RichTextBox. I'm making a string of sports stats and I need to have them aligned neatly in the RichTextBox. Here is an example: str = "12/24 (tab) 225 yards (tab) 2 TDs (tab) 2 INTs" When I use the vbTab constant in place of (tab) I run into problems as the size of the text in each column can be different which makes the tab not balance out correctly.
In my Windows application I have 2 forms, Form1 & Form2 in Form1 there is a Button so now I want to place the form2 exactly bottom of the Button when I click.
I'm trying to set hotkeys for all my favorite websites. When one of these hotkeys are pressed, I want it to load the assigned website in internet explorer, but I want internet explorer to load on my SECONDARY monitor. I've already set out the hotkeys to load internet explorer, but it loads on the wrong screen. How to check if an instance of IE is already running. To be a bit more specific: the secondary monitor is set to the LEFT of the primary one. And the resolution is at 1440 x 900. So basically, I want to programmatically set IE's position to (-1440, 0) from within my application itself.
I didn't understand something about DateTimePicker control, on one of the site i found the Private Property Hour() as integer this property was used. And inside it was:
To make this short and simple, I'm developing a program that goes full screen but cannot allow the user to close or Alt-Tab out of it. The program is responsible for giving out tests that teachers create for various students and, to deter cheating, I was going to have the program block attempts to close it (I have that figured out already) and stop Alt-Tabbing out of it.
I looked up SetWindowsHookEx, but I was never good with PInvoke's and my attempts to get it to work have resulted in nothing.
This is my current
<DllImport("user32.dll", SetLastError:=True)> _ Private Shared Function SetWindowsHookEx(ByVal hookType As HookType, ByVal lpfn As HookProc, ByVal hMod As IntPtr, ByVal dwThreadId As UInteger) As IntPtr
I am developing a point of sale for a buddy.The system it will be on will be running nothing but this application. The system SHOULD always stay at 1024, 768 but i like to plan for problems.What I would like to do is on form_load change to 1024, 768. On exit, (for learning sake on my end) I would like to have it set back to the default.
I got a form, another form, another form, another form, etc.And I got a quit form (Msgbox is not pretty)So, there starts a problem.I have two quit forms now, so that the user can pick the best one.The problem is that I don't know how the user can pick it. I have a quit button in Form3. I want SettingsForm have one label that says "Use the new quit dialog:" and two RadioButtons (which it has.) The Yes Radiobutton = Uses the new form, the no button uses the old one.Settings save the selection for the next session, etc.
RadioButton2 = Yes RadioButton1 = No Label = Use the new quit dialog ButtonQuit = The Quit Button