Use Cluster Generic Script To Run A Batch Job?
Aug 31, 2009
I need the cluster member to auto run a batch job when the cluster resources are fail over to it from another member. I use the vbscript below:
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
Function Online()
[Code]...
The problem is I can't bring it online in cluster administrator, and can't trigger the batch job. It show an error code and I think i miss something in the code.
View 2 Replies
ADVERTISEMENT
Mar 5, 2012
I have a Sql Server 2008 R2 Failover cluster running an active and passive node talking to a shared disk.
I have developed a vb.net windows service which needs to run on each node under clustering conditions.
I need to understand what I need to do to the service to make it cluster aware.
There are a few heavy classes in the service which under failover conditions need to understand where they are in terms of what data is in them so that when the passive node kicks in and the service starts it picks up on node 2 where it left off on node 1.There is near little documentation on this subject I can find on the net and with companies becoming failover happy this needs to change.
View 2 Replies
Dec 16, 2009
We have migrated our Vb6 application to VB.NET using a third party tool. Now we are in a process of Refactoring and introducing object oriented concepts in the application.
In VB6, we were using structures in many places. As a part of introducing object oriented programming,
1. is it a good idea of changing all Structures to Classes? or Is there a concept of "Generic Structure" similar to Generic collections, Generic classes?
2. Can some one guide me any source containing guide lines or best practices for applications that are migrated to VB.NET from VB6 and implementing object oriented programmaing.
View 3 Replies
Apr 13, 2012
Consider:
Public MustInherit Class Column
Public ReadOnly Property ReturnSomethingUseful() As Object
Get
'return something useful
[code]....
But this gives the following error:
Public Overrides Function ParseValue(sValue As String) As Boolean'
cannot override 'Public Overridable Function ParseValue(sValue As String) As Object'
because they differ by their return types.
I accept that you can't do this, but I'd like to be able to preserve the semantics of what I'm. trying to do, which is to have an untyped version that deals with Object, but a typed version in derived classes that knows about the specific type T.
View 2 Replies
Aug 14, 2010
I have a Journal that records entries for different types: Journal(Of ParentT)
[Code]....
View 2 Replies
Nov 25, 2011
I am trying to construct a generic interface class with generic functions. My goal was to use this to implement multiple worker classes for database interaction that have the same basic functionality. Each class will deal with different object for example, category, product or supplier but unless the the functions in the interface are generic that this won't work.This is the interface code that I have but I don't know if I have done it correctly. [code]
View 2 Replies
Jun 30, 2011
I am trying to create a list of a generic type in vb.net 2.0 framework.
This is the generic type definition:
Public Class GenericParamMap(Of T)
Public Sub New(ByVal pParamName As String, ByVal pPropValue As T)
mParamName = pParamName
[Code]....
The compiler does not allow a "T" in the method's parameter because it's not defined, but I'm not sure how or where to define it. I thought it was okay to have a generic method definition.
View 2 Replies
Feb 8, 2012
I am trying to write a generic method, to avoid code duplication, which will create or activate a Form as an MDI children, based on its type. But I have to lines in error (see comments).
[Code]...
View 4 Replies
Jun 19, 2012
If i have an object that implements an interface (and don't know the exact object) i can call a sub (DoSomething) by going:
vb
Dim iObj = trycast(something, iInterface)
if iObj isnot nothing then
iObj.DoSomething()
end if
How can I do this for a Generic? such as...
vb
Public Class TestClass(of T)
Public sub DoSomething()
....
end class
View 2 Replies
Oct 7, 2010
I have been using a pretty slick generic invoke method for UI updating from background threads. I forget where I copied it from (converted it to VB.NET from C#), but here it is: Public Sub InvokeControl(Of T As Control)(ByVal Control As t, ByVal Action As Action(Of t))
[Code]....
View 1 Replies
Jan 21, 2010
I can do this without problem.
Class A
End Class
Class B : Inherit A
End Class
Dim Obj1 As A = New B
View 4 Replies
Feb 27, 2012
Is there any tools or DLL that can put a password in the PDF?Example I have 1,000 PDF files I want to put a password on each PDF? The password will be differ
View 2 Replies
Jun 21, 2011
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()
[code].....
View 3 Replies
Mar 17, 2011
I've been thinking of a new possible project, and I was wondering if it is possible to run BATCH or CMD commands straight through my VB program.I don't want to run a seperate .bat file either, I just want to run it from my code...I looked else where on the internet and they say to do things such as:
shell("cmd.exe")
sendkeys.send(" (put anything you want between the quotes) ")
View 1 Replies
May 17, 2012
I am busy writing a application that i can set up a list of files to copy from one location to a remote network drive.
THe program has a list of "jobs" in a datagrid that it loops through and executes in sequence. What i have now is a background worker that reports the status of which job it is on (File 1 of 5) but i would like something that shows the status of the current copying file as sometimes large files can look like it's stopped on the network
I am using the System.io.file.copy structure, but have also tried the my.computer.filesystem.copyfile (which shows the status in a "windows" copy box)
So, what i would like is some guidance on how to create a function that will copy the file but also report back progress periodicly. I don't want to read and write byte for byte as im worried this will be too slow.
Also, is there a better way/function to use to copy files? Looking for best speed
View 2 Replies
Dec 30, 2010
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] .....
View 7 Replies
Oct 17, 2011
I have been asked to develop a solution which send to the default printer a list of files stored in a directory in file name sequence. These files maybe of any type - such as pdf or Office documents.
I have seen suggestions to using a process class (such as [URL]..However, the process would run largely unmonitored so I have concerns with regards to being able to control the submission of the numerous jobs to the printer and, for example, stopping the print should there be a failureerror in the print queue.
View 3 Replies
Nov 9, 2009
how to convert batch file to exe using vb.net [Code] after i read the batch file but how can i save it as exe.
View 6 Replies
Sep 2, 2009
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]...
View 7 Replies
Apr 19, 2010
I need help creating a batch of Grand Totals each time enter my value and click Calculate.The code below gives me my Grand Total, now I would like to enter a new set of values and store the previous amount(s) until I'm ready to populate them in a Message Box.
Dim sum As Decimal = 0
For Each total As Decimal In totals
sum += total[code]....
View 2 Replies
Oct 24, 2010
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.
View 14 Replies
Dec 30, 2011
PDF shell - batch opener
View 3 Replies
Feb 15, 2012
I have a batch file that loads into a form containing 20 IT related incidents. I have managed to upload the batch file into a form. However I have an algorithm that reads an incident and manages to classify into its topic: See Below the data imported form the file:
1) Need to install jet direct to printers and connect users
2) Remove ms project software from PC 04384 and re install on 07882
3) install needed for 2 vectra software for Finance department PC assest 9875 and 8711
4) Supply PC 500 SITA Rest Area phone 2268 Asset and S/N
5) Add printer Epson label printer in ISD2
6) Remove Jetdirect and network printer via port PPSS PC add printer
7) Credentials for user UK15428 not logging onto the network
8) Install CD RW and unsupported software for UKX3395
9) Need Entire software installing on asset 5530, and access to password for use.
10) phone handset not functioning for UK10529, new phone required.
11) install card reader and software following PC move
12) New user group UKG0345 no mail just printers on PC00856 and PC02427
13) Update outlook remove project from PC D0186 in Prod Control per Tony Campbell install on Alisons PC in NDS
14) Unable to log onto the network, profile will need recreating
15) Remove spent toner cartridge
16) The printer doesnt appear to be printing, it looks like there could be a paper jam of some sort
17) Set up laptop and use local admin password to gain access to backup files
18) Remove image grabber card from PC and install on PC in paint shop have explained to user they will have to contact optivision
19) Cannot get onto network as I have forgotten my password, can you reset for UK15617
20) User cannot access voicemails, need mac address to edit on TOIP software
For example number 1) would be classified as a printer problem. I want the algorithm to be able to read each number, not the whole lot and classify the whole block of text, I want it to classify each incident individually, so there are 20 incidents to be classified.
View 16 Replies
Feb 1, 2010
How can I run a batch from from within vb.net?
View 4 Replies
Mar 3, 2012
if I press a button then it send keys to a opened batch file ...
I open batch file with this
Dim proces As String = folder.Text + "process.bat"
Process.Start(proces)
I want to send "stop" to process.bat. How I can do this ?
Or:
How I can close the process.bat when it is running ? I try with:
Public Sub KillProcess(ByVal processName As String)
On Error GoTo ErrHandler
Dim oWMI
[Code]....
View 1 Replies
Aug 5, 2010
I have written a simple folder backup program which, if started with a /s switch (argument), will run "silently" and perform an unattended backup. The obvious way to start the program with the /s switch is from a batch file, which then runs as a Windows Scheduled Task. I would like to create the batch file from the program itself, when it first runs, as it can then write the value of "Application.ExecutablePath" into the batch file follwed by the /s switch.
So, the question is, where best to save the batch file without running into Vista/Windows 7 permission problems? Is the local application data folder suitable?
Bear in mind there are three parts to this: my vb.net app needs first to create a batch file somewhere without permission issues, that batch file needs to be accessible to Windows Task Scheduler and then, when the batch file is run, it needs to start an .exe which is most likely in the "program files" folder.
View 3 Replies
Feb 1, 2011
I have a web site that includes code to move data between databases, generate Office documents, etc. I also have a need to duplicate some of this work in batch. Where they overlap, I've had to code things two different ways -- one for the web site (using server-side vb.net) and one for batch (using vbscript). I know you can run batch from vb.net. I'd like to do the opposite -- from batch I'd like to access some code that I've already written using vb.net classes, web.config, and Office interop assemblies. I tried some of this in PowerShell, but it took 45 minutes to generate a report that runs in 20 seconds through the web interface.
View 1 Replies
Nov 12, 2010
I have applications that need run many times. Currently I use dos batch file to run .exe file generate by vb.net or c#, but to be honestly, I hate dos command/batch. How can I avoid it?Saying a simple example "Hello World!" I need run it 10 times.
View 5 Replies
Jul 14, 2011
It am trying to launch this code that would normally run from a batch file
Batch file code:
@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
"%ProgramFiles%Javajre6injava.exe" -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
PAUSE
[code]....
When I run the code cmd.exe opens but then nothing happens?
View 2 Replies
Feb 28, 2009
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.
View 6 Replies