I'm working on a little script to automate tasks across 12 servers, that are all on the same domain and have a similar setup. The tasks are to create a new folder, to then copy contents off the network into it, and to create a virtual directory in IIS 6 pointing to it. Ideally I'd like to log errors but that's a later concern. My approach was to write a VB Script to connect to WMI on each server in an array, then use it to run off a batch file. While the VBS works if I tell it to create a folder directly, it does not run (any part of) the batch file, nor give me any errors.[code]...
I am trying to update a table across "non" linked SQL servers using:C# or VB.net and ADO.net sqlDataAdapter.
I need to use DataTables and sqlDataAdapter.Very Important I need to use BatchUpdate and avoid looping through the DataTable The table designs in Server 1 differ from table design in Server 2.
Source Table
Server 1. Table 1
ID INT[code]....how to update table 2 on server 2 using a sqlDataAdapter, or alternative batch method?
I don't really know how to code but am pretty good at tweaking. I'm trying to set up a script that I can run to delete a single file, multiple files, a folder or multiple folders on a list of servers.I was thinking that the script could read the files to be deleted from a .txt file and apply the deletion to a list of servers in another .txt file.Example:
FilesToBeDeleted.txt: \(insert_server_name_from_list)c$Program FilesBINexample_file.rpt or
I am trying to remotely connect to servers on a network. However, an exception occurs and I can never connect. The code I am using to connect to the servers does work because I have had someone else test it. The exception is shown below. Is this a setting with VB or with my computer?
System.Runtime.InteropServices.COMException was caught ErrorCode=-2147220308 HelpLink="C:Program FilesPIPCPISDK..Helppisdk.chm" Message="The specified time is invalid "
I have this code below for a client module, to allow the client to connect to multiple servers, though a IP list. The problem is that it is connecting ok to the servers, and it is sending messages to servers, but is not receiving messages FROM servers.
I have to connect same type of remote objects on different destination using .net remoting. For example, I have a database access middle layer on a remote server and local server. But both are same type object. but the remote destination addresses are different. So how to connect it using .NET Remoting?
I would like to connect to mysql database on one of my domain.I downloaded and installed http:[url]....and when i try to connect using Vb.net 2008 using DAtasource :mysql database.i get this error unable to connect to any of the specified Mysql hosts.
I have a function that works perfectly when I attempt to add a user from the same domain into a group of the same domain.
Function AddUserToGroup(ByVal strUserDN As String, ByVal strGroupDN As String, ByVal strGRPDC As String, ByVal strUserDC As String) As Boolean Dim oUser As DirectoryEntry
[Code]....
The error is actually being thrown on the Invoke line, but as I said earlier, if the user is in the same domain, this works perfectly.
I was assigned a project to create a program of cloning two file servers. It will copy all folders (about 500, one day one folder, there are about 200 files in each day) from one file server (S1) to another file server (S2). If any error occurred while in processing, program will send an email to someone.
I am writing a code that downloads alot of information from different servers. Puts the information in an excel spreadsheet, saves the sheet, and uploads it to an FTP page for each server. The code is running into an OutOfMemoryException. Is there a way to clear the memory after each servers file is uploaded to the FTP?Or is there another way to fix the problem with out adding memory to the server the code is running on?
I have a program that I copy a file from one server to another. This has been working well if the servers are on the same domain.I now need to copy a file to a server on a different domain. If I were to do this manually it would prompt me for my username and password.
I don't see any way to put a username and password with doing an IO.File.Copy. Is there a better way to do this?IO.File.Copy(strSource, strDest)
I have a VB program that writes a batch file to allow me to run a line of the following format:java <my class file> [options]I then run the batch file using the Shell() routine in VB.When I do this it says it cannot find <my class file>. However if I run the same batch file from a dos prompt it works.why it works in a dos prompt but not in the Shell function?
i am creating an app that when a button is pressed a batch file is executed and hidden from view.I have managed to get the output of the batch file to be displayed in a text box.
My app is a fairly simple and im sure with the right knowledge this would take 2 minutes.. but sadly iv been at it for hours. So my scenario here is a huge network with 20+ file servers all with data spread out across them it can take hours to find the folder required.
Hence this app.. so it consist of a input box, progress bar and a button, using FileSystemObject I plan to interrogate a directory to see if a folder exists (folder specified by user input) however it need to check multiple directories, in my old app I used a list box which wrote to a text file allowing the user to add additional directories then using if statements proceeded through the servers.. however they have added that much that my IF's have ran out really because i know it should have been a loop
Imports System Imports System.IO Public Class Frm_main Private Const FILE_NAME As String = "C:directories.txt" Dim objReader As New System.IO.StreamReader(FILE_NAME) Dim Lines() As String = IO.File.ReadAllLines(FILE_NAME) Dim Dir As String
I have been looking all day trying to find a way to do this. I need to run a Batch file which is held on a server, the file path begins with a IP Address which DOS doesn't like. So i found the pushd command which assigns a temp drive letter from which you can run the Batch File.If i was simply running a normal program or file i would use:
Dim proc As Process proc = Process.Start("c:\BatchFile.bat") proc.WaitForExit()
I have a question. I'm deploying my VB app that performs some task VIA SCCM. The application is run with the NTAuthoritySystem account.
I would like to copy a log file to a server all domain users/computer can right to this folder. I'm trying to get a log copied to the server but since it's running as the system account it can't authenticate to the share to save the log file on XP machines.
Can somebody show me example code of how to save a file as a different user when running the program with the system account . Would this be secure to use a domain account to impersonate and save the file?
I have a file that is being generated automatically on a server in a Windows domain, say, called, "prod" and I will need to have VB.NET to transmit this file to another server in another Windows domain, say, "QA", where QA and Prod have different credentials altogether and I have to authenticate that credential every time I opened up the destination folder.Therefore, I guess the regular filecopy method would not work?
I am putting together an old post here with this new one. My main goal is to combine these two portions so that the search does not need to be ran on each and every computer.
[Code]...
I can set the path as WinNT://domain.name/username...and I get a list of something, are they files? i am not sure? Second portion of code searches the computer for the java.exe to display its version, as well as searching for any indication of a java file on that computer.
I am trying to create a program that renames files to 1 - (however many files are in the folder) and also convert .pngs to .bmps.
If RadioButton1.Checked = True Then Dim files As String() files = IO.Directory.GetFiles(TextBox1.Text) Dim filepath_new As String filepath_new = TextBox1.Text For Each filepath As String In files [Code] .....
I have an old batch file i use that I would like to convert to vb.net,
The Batch file use a .reg entry to set the cleanmgr options. abnd then calls the sagerun command to run those options
I pretty sure I know how to create the registry entries what I am not sure to do is how to call the cleanmgr with the switches /dc /sagerun:200 then display a box saying it is complete and deleting the prefetch folder of anything older then 'n' days . [code]...
I need Visual Basic to run a batch file I have placed a batch file inside my startup application directory Inside the batch file I have WUinstall /install /reboot "When I double click the batch file it works perfect" Visual Basic 2008 Command Button I Have
Dim p As Process Try 'instance a new process p = New Process
[code]....
When I click this command button all I get is CMD window just flashes. When I hold down the enter key I can faintly read something about it is not an internal command.