Execute AS / 400 System Commands Through VB

Jan 20, 2009

I need to execute AS/400 System Commands thru VB. What would be the way to perform this?

View 4 Replies


ADVERTISEMENT

Execute Two Commands At Once?

Dec 31, 2009

catch statements - it works well just checking my disk drive for a file, if an error is thrown then I open the disk tray and ask them to put the disk in, click OK on the message box and it performs another check for the file, if this fails the button that starts all this is disabled on my main form (the code is shown below).

Okay, so my problem is I'd like to have the message box pop up and the have the drive open up (using an API which I have) either at the same time or in the order of: message box then drive open. I can see two ways to do this: Have the commands happen at the same time (Can you even do this?) OR Have the message box appear and then open the disk drive (but how I could achieve this I don't know as the message box waits for the user to click OK... I originally though of starting a timer just before and getting it to open the disk drive tray in the tick event,

Code:

Public Class Form1
'open cd-rom tray API
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal _

[Code].....

View 5 Replies

Execute Commands In CMD From Progra 2010?

Feb 26, 2012

I am new to VB and am trying to write a program that will open cmd and execute commands when a button is clicked.[code]...

View 14 Replies

Execute Commands Inside Another Program?

Jun 29, 2009

I want to make a program with a button and a textbox. When i click the button the program (don't know how) writes the text from the textbox in a process called test.exe. Test.exe is a cmd like window, there is only one place to write on it. How can i make it happen?

View 4 Replies

Execute Commands Like In Command Prompt?

Sep 20, 2009

I know of the Shell method to run files, but how can I execute normal command prompt commands like nslookup, and capture the output as a string?

View 1 Replies

Execute Commands Stored In String?

Jun 6, 2011

I trying to figure out how to execute commands stored in string, let's say i have string called "command" and a textbox, so i want vb to run command that i typed in textbox, e.g. i type in textbox "label1.text = "bla bla"", and then type like "msgbox.show". Is that even possible?

View 12 Replies

Execute Remote Powershell Commands Using C#?

Feb 25, 2012

I'm evaluating the best approach to implement the following periodic task:

Get some users from SQL Server (2008) and then for each user enable licences in the Cloud (Office 365) using PowerShell.

My first thought was a console-based app in C# or VB.net but now that I realize that running a PS Script remotely using C# can be quite a challenge I'm starting to think in alternatives like perform all the stuff using PowerShell, I guess this is a better approach but I'd like to hear your thoughts on this.

View 2 Replies

Execute Shell-commands With Parameters?

Mar 2, 2010

I cant understand why this works (Start a service "test" on a remote computer):

Dim rCommand As String
rCommand = "c:pstoolspsservice \computer -u admin -p blabla start test"
Shell("cmd.exe /c" & rCommand)

[Code]....

The above code that doesnt work starts a virtual machine on VmWare Server. I have the exact same line in a .bat file and if i call the batfile from VB it starts the batfile and execute the commmand. I cant understand why this doesnt work without the batfil when i have no problem executing the PsTools command from VB-code.

View 2 Replies

Execute Some Commands In Cmd Prompt In Vs 2008?

Feb 2, 2010

i'm tring to execute some commands in cmd prompt in vs 2008. (with out using BATCH FILE)

[Code]...

View 4 Replies

How To Execute DB2 Commands Programatically For Backup

Sep 1, 2009

How to execute the DB2 commands programatically for Backup..Here are the commands that need to be executed for DB2 Backup.I am using IBM.Data.DB2 namespace, And as soon as we connect to Dbase in step 2 it crashes to QUIESCE.

1.CONNECT TO <DataBase Name>
2.QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;The Exception Message I am getting [code]
3.CONNECT RESET;
4.BACKUP DATABASE <DataBase Name> TO "C:\" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 COMPRESS WITHOUT PROMPTING;
5.CONNECT TO <DataBase Name>;
6.UNQUIESCE DATABASE;
7.CONNECT RESET;

View 1 Replies

Multiple AT(ATtention) Commands Execute Using C# Or .net?

Oct 9, 2011

I need a coding to execute multiple at commands simultaneously. when first command execute and get the response from the port and then the second command will be executed. how to write the coding. it is possible. i am using siemens gsm modem.

[Code]...

when i execute this coding i can't get the correct result because the port response will take some times.how can i identify the time delay. when i use thread.sleep(300) means this is also not correct for my solution. Because the port response will take more than 300 milliseconds?

View 1 Replies

Start A Run Window And Execute Commands In It?

Nov 18, 2009

I need to start a "Run" window(The one that opens when you press Windows+R or Start->Run) and run few commands in it from a VB.NET program.

View 5 Replies

Forms :: Execute Raw Commands Typed In A Textbox?

Sep 11, 2010

I am working on a "de-bugging" back-end sorta thingy for my program, and I have a "dll" that executes most of the work for the program. For the ease of tech-support, I plan on trying to impliment a hidden back-door into the engine that is password protected and activated by a key-press. What I want to do is:when the enter key is pressed, have the dll run the sub that is listed in the enter key, for example:

In the dll:
Public Sub msg(ByVal text as string)
MsgBox(text)

[code]....

View 2 Replies

Execute 3 Commands (SQL Statements) To 3 Different Oracle Tables At One Shot?

Apr 24, 2012

I'm implementing an application using vb.net 2005 with oracle 10g and I came across a functionality that should Select/Insert/Update/Delete data from three different tables in oracle.So I`m wondering if there is a way to prepare all the 3 commands (SQL Statements) separately and then execute them in one shot to the oracle, so in this way I can guarantee that all of them are successfully executed or all are failed to execute, and also I could gain more performance which is critical in my case.Thus I`m looking for a syntax in vb.net that helps me execute more than one OracleCommand in one shot to the oracle.

View 1 Replies

Execute Commands In Cmd.exe Just A Simple Net Stop [service] And Get A Error 5?

Nov 22, 2010

Just trying to execute commands in cmd.exe just a simple Net Stop [service] and get a error 5. I want it to run cmd in administrator mode. One way I have seen that you can by holding down ctrl & shift while clicking cmd.exe?

View 26 Replies

Unable To Run Unix Commands To Execute Processes On A Unix Server?

Jul 6, 2011

I was recently assigned to do some research on how to approach a project. Right now we have an old program written in tcl. From this tcl program ( running on VMS client computer), we are able to run unix commands to execute processes on a unix server. This is done via tcpip. Now, we are thinking of making upgrades to this system . We are wondering if this kind of thing was possible with Visual Basic. Are we able to run a VB program on windows computer to run UNIX commands on a server? If so, what issues might be brought up. If anyone has even the briefest guideline or tip on this,

View 3 Replies

Create Commands System?

Apr 13, 2012

I want to create a system commands,but I do not know what the right way to do it and how exactly (with regex?)

/ShowWindows
IsNewWindow 10

/ = Signifies that is a command[code].....

View 6 Replies

Execute Button - "sender As System.Object - E As System.EventArgs"

Apr 30, 2009

How do I execute "Button1_Click" when click "Button2" like "Button1.Click(######)"? When I try to write Button1.Click() then that keep asking me "sender As System.Object,e As System.EventArgs". What value that I have to have "sender As System.Object, e As System.EventArgs"

[Code]...

View 2 Replies

Execute Some Code While System Is Locked And Relogin?

Mar 16, 2012

I have an application where i run a code when user logoff using below code

AddHandler SystemEvents.SessionEnding, AddressOf ClosingApplication.Where CloseApplication is procedure that is called.same way i want to add handler on system lock and relogin

View 4 Replies

Execute Some Code While System Is Switched User?

Apr 6, 2012

How can i execute a code when there occurs a system switch user event.

View 8 Replies

Modify Class For Permissions Determination, Which Fails To Execute A System.web Statement

May 1, 2009

I have found the class code below which should be activated to show the result for the selected option

Dim pc as new CheckPerm
pc.Permission = "Modify"
if pc.CheckPerm("C:WIndowsSystem32") then

[Code].....

View 1 Replies

Error - "Collection Was Modified; Enumeration Operation May Not Execute" In A Client System

Nov 1, 2011

I have a logout menu option in my MDI application. On log out I want to close all open forms. currently i am using following code snippet to achieve this;

For Each f As Form In My.Application.OpenForms
If f.Name = Me.Name Then
For Each child As Form In f.MdiChildren

[code]....

It is working perfect in my test environment, even though I expected For Each loop will throw "Collection was modified; enumeration operation may not execute" exception. since on each child form Close() calls, f.MdiChidren collection get modified, that surprised me a lot. Can anybody tell me why it's not throwing that exception?However it throws "Collection was modified; enumeration operation may not execute" in a client system.

View 1 Replies

Execute Scalar Vs Execute Reader?

Feb 25, 2010

[Code]...

how can i get this code to return all values instead of just the first value ?

View 30 Replies

Between And Before Commands

Jun 23, 2010

ok with this is going be realy hard to explain i just wanta learn this commands so lets say you have a combolistbox

[Code]...

View 4 Replies

How To Use AT Commands

Apr 24, 2007

i have to make a project in vb.net to connect with nokia phone using AT commands. There are so many articles on it but i hvae found nothing complete.

View 4 Replies

More Commands On One Row?

Dec 27, 2011

why this code doesn�t work:

If CheckBox9.Checked = True Then CheckBox10.Checked = True : If CheckBox8.Checked = True Then CheckBox9.Checked = True

View 4 Replies

AT Commands For SMS Messages

Feb 19, 2011

I'm trying to use a cell phone modem to send an sms message but i'm not sure whats wrong with my code?? Also i'm getting en error with _ContsSMS = False .. but i have no idea what that line is ? (Also are AT commands not used for Windows 7, is this why it wont work?)

Using COM7 As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort("COM7")
'set command message format to text mode(1)

[Code].....

View 2 Replies

Cannot Input CMD Commands?

Feb 15, 2012

I'm fairly new here and based on the help that i've seen people give I though this would be a great place to ask! Basically, I'm new with coding, so I decided to work with Minecraft - specific a Minecraft Server Starter. It has a built in text box to display all the stuff that the console would normally display and an input tetbox to use commands.I have it so you can either use the Normal Minecraft Server or a Bukkit server. Basically, when I run minecraft.jar it works perfectly, I get the Output from the console and I can input commands.When I use craftbukkit.jar (bukkit) I get the Output of the console fine, but I can't input any commands... I can't figure out why it's doing this!

[Code]...

View 1 Replies

Commands Not Being Added?

Aug 1, 2011

So I have this page as such:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ViewContacts.aspx.vb" Inherits="ViewContacts" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

[code]....

and the commands are not being added to the buttons to add, edit or delete contacts....

View 2 Replies

Ftp With Custom Commands?

Oct 20, 2010

I wrote a program that read a text file, find some specific text and eventually replace it with other. This works fine but after the file creation I have to ftp MANUALLY to my AS400, putting the file and finally run a specific command.

Here's the question, I saw that I can use FtpWebRequest but it only permits to download, upload and so on, I need to run a custom command (passing a string).in other words here's what I need:

user = "me"
pass = "you"
host = "as400"

ftp.Credentials = New System.Net.NetworkCredential(user.Text, pass.Text)'now the connection is opened put my file send custom command

View 1 Replies







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