Permissions Whilst Recursively Searching?

Nov 25, 2010

I am trying to recursively search through the entire computer, this includes: My Documents, Application Data, Windows Folder, Documents and Settings(Windows 7 misnomer/pointer?).This is for my own educational and academic purposes, I am just searching for an MD5 hash of an EICAR test file that I have made.

EDIT: This is on Windows 7 Currently. DISCLAIMER: This is not, nor ever will be an antivirus project, this is not a school assignment. This is purely for my own knowledge. this be done? With the following code, I get exceptions thrown regarding access to certain directorys (App Data, etc), even when I build and run as administrator.

[Code]...

View 1 Replies


ADVERTISEMENT

Exception Thrown Whilst Loading A Xml Doc

Aug 15, 2011

I am writing a program that saves quotes for writers to an xml file. Well I save my data to the xml file, but when I go to load the document I get this exception thrown at runtime.

System.Xml.Xsl.XslLoadException was unhandled
LineNumber=2
LinePosition=1

[Code].....

View 1 Replies

Timer To Run In The Background Whilst Other Code Is Being Processed?

Mar 11, 2010

in my program it has a log in system already done by myself and once logged in you can do whatever i have coded in if you understand my meaning . what i want to add to it is a timer that can be edited that runs as a standby timer like with what a screen saver does and logs out after inactivity for a specified time now i have no idea where to stat with this so if some one could put me in the right direction or an example would be great.so i need it to start a timer once the mouse is not moving and no keyboard keys are being pressed and terminate the timer once keyboard keys are being pressed or mouse is being moved it's for an update that i am releasing on my publishers website for my program?

View 1 Replies

Program Becoming Unresponsive Whilst Running Long Code

Jan 31, 2011

I'm currently trying to write a football simulator but am having issues with the computer becoming unresponsive. There are long lines of code (several thousand lines) that are executed over and over as one run of the code is equivalent to one second of game time. While the game is setup to be like Football Manager where you watch the game live, there will also be cases where the entire game is simulated without you watching. When doing a full sim of a game, I just have a loop which executes the code block 7200 times (games go for two hour roughly).

At the moment this takes about a minute but even when I get it down to the desired 5-10 seconds or so, I dislike the fact that the computer becomes completely unresponsive during this time. In a round there are 9 games and you'll be simulating without watching 8 of them. You're looking at 1-2 minutes of simulation time or possibly more. I can't have a loading screen that long! How can I program the game so it runs these simulations yet the game still remains responsive? It'd be fine if the user could muck around in the menus and stuff while the simulation runs.

View 10 Replies

.net - Detect Text Changed On Textbox Whilst Ignoring Databindings

Feb 28, 2011

I have some textboxes bound to a bindingsource and bindingnavigator.

I want to detect when the values have changed and prompt the users to confrim if they want to update.

When the form is first initalised and when then binding navigator moves to the next record the text_changed event fires on textbox where I have a boolean to determine if things have changed.

Is there a way to set my boolean only when valid data changes have occured or a better way to detect if things have changed

View 1 Replies

Assign User Chosen Hotkeys Whilst The Application Is Running?

May 20, 2012

I have an application which uses hotkeys which are to be defined by the user. It is a combination of 2 keys, either CTRL, ALT, SHIFT as one hotkey and the F* Function keys as the other (e.g. CTRL + F1, ALT + F2 or SHIFT + F8) As stated these are then chosen by the user before a global keyhook is put in place to listen for them and trigger an event. In my app I have all my function keys as follows:

Public Const VK_F1 = &H70
Public Const VK_F2 = &H71
Public Const VK_F3 = &H72

[code].....

View 1 Replies

Add Text In Recursively Copy?

Jan 10, 2012

I copied code from the link below. It works fine.[url]...

Now, I want to add a line to display text like:

"Copying file xxxx" for each file being copied.

I created a label and code like

label1.text = sFileInfo.fullname (added it in "for each" loop)

but this code never fire until last file.

View 2 Replies

Getting File Names Recursively?

May 6, 2011

I am trying to create a small application that will pull values from a config file (which is working) and then based on those values will search through directories recursively for files with specified extensions. In the end I would like these files deleted but I also need to have the app write a list of each file that is successfully delted to a .log file.Here is what I have so far, the values from the config file are successfully being passed to the sub routine however nothing is ever written to the .log file.

Sub activeRecursive(ByVal activeStat AsString, ByVal rootDirectory AsString, ByVal fileExtension AsString, ByVal maxAge AsInt32) IfNotDirectory.Exists(rootDirectory) Then EndIf Dim tmpFile AsString = "C:Files.log" Dim objWriter AsNewStreamWriter(tmpFile) Dim allFiles() AsFileInfo Dim dirInfo AsDirectoryInfo dirInfo = NewDirectoryInfo(rootDirectory)

[code]....

View 3 Replies

Recursively Add Child Nodes?

Apr 14, 2009

I want to make a treeview from a Listbox.The Listbox contains N number of items.Suppose the List contains:Node1Node2Node3Node4Node5I want this to appear as shown below:

[Code]...

View 7 Replies

Declare Objects Into Array Recursively?

Mar 26, 2011

I need to declare dozens of objects (Textboxes and Checkboxes mostly) into differents arrays but when i try to do this, they are added as strings and not as objects. I'd like to add them as objects to run through them recursively.

[code]...

View 6 Replies

Forms :: Add Text In Recursively Copy?

Jan 11, 2012

How do I recursively copy all files and directories? - vbCity - The .NET Developer Community

Now, I want to add a line to display text like: "Copying file xxxx" for each file being copied.

I created a label and code like

label1.text = sFileInfo.fullname (added it in "for each" loop)

but this code never fire until last file.

View 5 Replies

TreeView Control - Populate From ArrayList Recursively

Jun 13, 2010

I'm needing some help with populating a Treeview control using an ArrayList. The ArrayList contains a collection of a class called Task. The class properties contain the following:

1.) taskID (int)
2.) parentTaskID (int)
3.) taskLevel (int)
4.) subTasks (ArrayList)
5.) taskName (string)

Each Task instance can contain subtasks (which is a collection of the Task object), which can also contain subtasks, and so on. The base task starts at level 0. A subtask of the base task would be level 1. A subtask of a level 1 subtask would be a level 2, and so on.
-- The parentID would be the taskID of the parent Task. The parentID at the base task (level 0) would be -1.

[Code]...

View 1 Replies

Record User Action And Recursively Download Content?

Mar 11, 2010

I'm working on a self motivated project; basically I want to be able to navigate to a website, for example,there I want to be able to able to record my actions - for example:

Step 1) Right Click & save on celebrity photo
Step 2) highlight & save the photo's description
Step 3) Click on Next link and repeat

[code]......

View 1 Replies

Recursively Search Folder And Place That List Into A ListBox

Mar 30, 2011

I am trying to make a program where I browse for a folder and that Browse dialog displays user selection into a Text Box that part I have completed, when that user selects the folder it will recursively search all folders and subfolders in the directory the user has chosen and display that list in a ListBox here is the code I have so far. Also to note I have found a function for recursively search a folder but I have no idea how to implement it to display in the ListBox from the User selected directory.

This code is the code that lets the user select the folder and display it in the textbox

Private Sub SourceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SourceButton.Click
With SourceBrowse

[Code].....

On a side note I also want the list to display all the files in the folder as well.

View 2 Replies

Recursively Search Folder And Place That List Into A ListBox?

Mar 20, 2010

I am trying to make a program where I browse for a folder and that Browse dialog displays user selection into a Text Box that part I have completed, the part I need help with is when that user selects the folder it will recursively search all folders and subfolders in the directory the user has chosen and display that list in a ListBox here is the code I have so far. Also to note I have found a function for recursively search a folder but I have no idea how to implement it to display in the ListBox from the User selected directory.

This code is the code that lets the user select the folder and display it in the textbox

Private Sub SourceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SourceButton.Click
With SourceBrowse
If .ShowDialog = DialogResult.OK Then
SourcePath.Text = .SelectedPath

[code]....

On a side note I also want the list to display all the files in the folder as well.

View 7 Replies

TCP Messaging -application Call Center - Team Leaders Can Send A Message To Individuals Whilst They Are On The Phone

Aug 7, 2009

Im currently writing an application for our call center to use and would like it to have messaging functionality so that team leaders can send a message to the individuals whilst they are on the phone.

I have used a couple of tutorials around the web, but they differ to what i actually require. They all seem based around the whole "client must connect first" thing, is this really necessary? I just need each user to be a "server" constanly listening to any message recieve on a specific port, and display it in a popup when one is.

At the moment the code i have sort of works, but its a bit flakey and doesnt handle the initial connection/final disconnect very well.

Client program (team leaders console):

Form:

Imports System.Net
Imports System.Net.Sockets

[CODE]...

View 7 Replies

File I/O And Registry :: Recursively Edit Text Files In Sub Folders?

Jul 20, 2010

I found this code on here to open a text fille, do a find & replace then save the changes, and the code is in a loop that will do that to every file in a given folder. My question is I also have files in sub folders, and more sub folders, and i'm not sure how deep it goes. I want to recursivly go though all the sub folders and do this to all the files, not just the files directly in the main folder.

Here is the code so far:

Code:
FolderBrowserDialog1.Description = "Select Path for files to edit"
FolderBrowserDialog1.ShowDialog
OpenPathVariable = FolderBrowserDialog1.SelectedPath

[Code].....

View 2 Replies

How To Code Recursively To Find .jpg Files In Folders And Subfolders Then Copy .jpg

Mar 8, 2011

I have been trying to get a .jpg files from subfolders that get's updated and a new subfolders is created. I have been trying to figure how to code to read the folders/subfolders and to get the .jpeg files copy or move to different folder.

View 8 Replies

Visual Studio 2008 - Reflection - Iterate Object's Properties Recursively Within Own Assemblies?

Sep 11, 2009

I wonder if anyone can help me - I've not done much with reflection but understand the basic principles.What I'm trying to do:I'm in the process of developing a class that gathers a lot of information about the local system, network, etc... to be used for automated bug reporting. Instead of having to change my test harness every time I add a new property, I'd (ideally) like to be able to serialise the lot as an XML string and just display that in a textbox.

Unfortunately, the Framework won't use the default XML serializer on read-only properties (which almost all of mine are) as they wouldn't deserialize properly [Not sure I agree with the assumption that anything serialized must be de-serializable - MS says this is a feature "by design" which I suppose I can understand - Perhaps a tag to indicate that it should be serialized anyway would be advantageous?]

The initial approach was to make properties gettable and settable (with a throw exception on the setter) but the amount of work tidying this up afterwards seems a little excessive and I would want the properties to be read-only in the final version.What I need help with:My current plan is to use reflection to recursively iterate through each (public) property of my topmost gathering class. The problem is, the samples I've seen don't handle things recursively. Additionally, I only want to inspect an object's properties if it's in one of my assemblies - Otherwise just call .ToString on it.

If I don't have the inspection limited to my assembly, I assume I'll get (say) a string which then contains a Length which in turn will have .Tostring method.For the purposes of this project, I can almost guarantee no circular references within my code and as this will only be used as a development tool so I'm not too concerned about it running amok now and then.

View 2 Replies

Search For Files Recursively While Updating A Progress Bar And Returning The File List To The Application From BackgroundWorker?

Dec 10, 2011

I am currently trying to develop an application which will backup large folders to a specified destination. To find all the files in the specified 'backup' directory I am using the following code.

[Code]...

I have tried putting my GetFilesRecursive function into a separate background worker to run first so I can update the GUI however I am struggling on how to return the List of found files back to my application (I get cross-threading exception) and how to update the progress bar to show the progress of the GetFileRecursive function so the user knows it is processing the list of files and has not crashed/frozen.

View 1 Replies

Application :: Display A Message To The User Whilst The Application Is Starting Up?

Nov 4, 2010

I have recently created an application where a lot of data is loaded into objects when the application starts up, and other data as it is required. For example if the user requests the catalogue page then it will load all the top level category data into objects of type Category. This will then stay there to be used by other users (who will therefore not have to load this data into objects) and can be altered by admin if they happen to login during the same application instance. I know this is not the most efficient solution, as pointed out below, but it works and the page load, at the moment, is not too long. It is very quick if most of the required data is already loaded into objects. It is also tailored to the business' needs - unlike other techniques such as Linq-to-SQL.

View 1 Replies

Getting Gif To Run In Form Whilst Code Is Running On Another Form

Jan 4, 2010

I've got a form that opens up whilst data is being pulled from the database in another form (basically a box to say it's loading), the form opens when I want it to and the gif shows but doesn't run until the code on the other form has finished.

View 5 Replies

Set Permissions On A Directory?

Dec 24, 2010

I need to create a directory with the permissions restricted to all users but only the program can modify in it. I want the program to create new files and write text in this texts files, but nobody should see or modify the content of this files and even better if nobody could see either inside the directory itself.

View 7 Replies

Set Permissions On A Folder?

Sep 17, 2009

I created a Project, now i wanna publish it. I should copy a folder from the CD on C:ProgramsTest .... Now my problem, how can i put the permission on it:

For all Folders and Subfolders should be: Group: User Permission:

Change -- true
Read -- true
Write -- true

View 2 Replies

Adding Permissions For A Folder?

Jun 15, 2008

I have a small application that creates users in the AD. It adds the users fine, and creates them a home directory. My problem is with granting the user permission to the home directory and is two foldFirstly the code detailed below adds the user to the folder, but because the account is newly created it displays as the SID rather than the name, not such a big deal, but sometimes the code fails as the replication has not caught up and the user isnt found. I beleive the answer here is to use the SID rather than the users name to add permissions, however I am not sure how to retrieve and store this when the account is created using directory services. Secondly and more frustrating is that once the user is added to the folder ACL their permissions are all blank.

Try
Dim Dinfo As New DirectoryInfo(Directory)
Dim DS As DirectorySecurity = New DirectorySecurity()
Dim Rights As FileSystemRightsFileSystemRights = FileSystemRights.Modify

[Code]....

View 3 Replies

Adding Permissions To A Directory?

Feb 8, 2007

I have been working on creating a small application we can run that will add permissions to a folder during an installation of a new application. The application requires read/write access to the folder and all subfolders. For whatever reason I have been instructed to include this in and install package that will be pushed out using SMS. Below is a sample of the method I use to add the user to the folder and give the appropriate rights to that user:

[Code]...

This works fine adding the user account to the folder and with with appropriate rights. I need it to give rights to the folder I select and all subfolders and files, This is where I am stuck. Does anyone know how to grant permission to a selected directory and all subfolders and files?

View 4 Replies

Admin Permissions In Vista?

May 18, 2009

With Vista we are having a permission denied error when an application tries to change properties of a file in Program Data folder... before replacing with a newer version of the file.Changing of security permissions for a standard user is not an option. Is there a way we can grant the premissions for an application developed in VB .net to give permission only to change properties of this file.

View 4 Replies

C# - SQL Explicit And Implicit Permissions?

Mar 14, 2012

If default 'sa' account has sys_admin permissions for the whole SQL instance and all its databases. On the database itself, if I don't have db_datareader permission enabled, I would assume it doesn't need it as it is implied but I was wondering in .net, is there way to check if db_datareader has explicitly been enabled and not just implied from the 'sa' being a sys_admin.

View 1 Replies

Directory.CreateDirectory With Permissions?

Apr 22, 2010

I would like to SET ALL permissions to True for all users of a computer, while using Directory.CreateDirectory

View 1 Replies

Elevated Permissions, VB, VS2008?

Aug 25, 2009

I have a project that I am testing with Windows 7, its almost complete but doesnt function without elevating the users permissions, I've tried a few of the sample codes I've found online and they don't seem to work... This has been tested on a admin account, but still requires elevated privaliges... I believe becuase it directly effects critical and non-critical windows services (starting, stopping, retreiving the status, enabling or disabling them)

[Code]...

I understand the UAC could be used to implement this "admin only" restriction, but as I havent even tried using the UAC Settings area yet. As I said, a link to helpful content would be cool, an example would be great.Running Visual Studio 2005 under a Visual Basic Environment.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved