I didn't know that Any CPU had 2 different views of the registry, and calling programs like DSIM.
So I got that part working now for file execution and registry, but even elevating the UAC didn't allow me to edit that value and add a key.
This works great, for all the grids that the edit control showing event is subscribed too, but while tracing another problem I have noticed that when I am getting the row out of the combo box's datasource which is a bindinglist and reading the information to pass back to the database. with the following simplified event below. Each property that I read then fires the selected index event of the combobox.
privatevoid dg_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
DataGridView dgB = sender as DataGridView;
if (dgB.CurrentRow.IsNewRow == true)
LogManager.Instance.Logger("Policy SI").Info("New Row ");
if (e.ColumnIndex == 0)
LogManager.Instance.Logger("Policy SI").Info("Validating Col 1");
string newDescription = string.Empty;
newDescription = e.FormattedValue.ToString();
quoteTemplate = valuablesBinding.FirstOrDefault(p => p.Description == originalDescription || p.Description == policySumInsured.Description);
//Attempted here to deepclone the object from the valuables bindinglist
//quoteTemplate = quoteTemplateNewDescription.DeepClone();
//Here with these 3 lines it will then fire the selectedindexchanged
//event that is on the combobox
policySumInsured.ItemNo = (int)quoteTemplate.ItemNo;
policySumInsured.Description = quoteTemplate.Description;
policySumInsured.Section = quoteTemplate.Section;
if (e.ColumnIndex == 1)
//Other validation routine here
Hopefully this all makes and sense and someone could possibley shed some light on why it keeps firing the cb_selectedIndexChanged event.
Every day, thousands of innocent plants are killed by vegetarians.
So basically, you want us to write your code for you? If we provide assistance, shouldn't you be able to do that by yourself?
There are many ways, and they all depend on what you are trying to achieve. You could use FTP. You can use shared paths to copy to (a really bad idea). You can use something like TCP with a client/server infrastructure. Without knowing more about what you are trying to copy and what the constraints are, it's hard to be any more specific than that.
With some assistance I will be able to do it myself.
With this below Line of code(in vb.net) I am able to copy files from one server to another.The issue is that this copy all Files that are in the source directory folder to destination folder while i just want specific files with extension .txt
below is the code am using
My.Computer.FileSystem.CopyDirectory("\\184.108.40.206\c$\Txxx\", "\\220.127.116.11\D$\d", True)
Is there a way I can be able to just copy only text files and after copying I move the files copied to a backup folder and then delete them
You'd effectively need two operations. The first one is to use Directory.GetFiles[^] to get all the files in a particular directory (or directory structure) that have the .txt extension. Then you would need to iterate over each filename and use File.Copy[^] to copy the files over.