Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Program Launches Batch File, Can I Hide DOS Window?


I have a program that builds and then launches a batch file using Shell. This obviously opens up a DOS session and executes commands in that batch file which the user can see if he/she decides to switch to that window. Is there a way I can make the DOS session invisible? Thanks.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Hide Batch Command Window In VB
i'm trying to hide a batch window that i have launched in VB. all i want to do is use a CommandButton and not have the DOS Prompt pop-up in the background. is there any way to do this?

Running A MS-DOS Batch File In Hide Mode
When I am an MS-DOS batch file with shell command like

dim tId as long
tid=shell("c:atch1.bat",vbhide) 'tId returns the taskId after successful
'execution of the batch file.

then its getting executed but my problem is as I am running batch
files continuously in Hide mode with Shell command, then after some
time the system execution is getting slower. Then if I press ctrl+alt+delete
I could see somany running applications titled 'winoldap'.

The number of 'winoldap's are equal to the no. of times I run the batch
file in hide mode through Shell command.

Please help me out in this by giving me a solution as to
how to avoid those 'winoldap's getting created and system slow down?

Note: In my batch file I am giving commands to terminate that batch file also.
When I run that batch file in DOS mode its getting automatically terminated
after the specific work been done without hassels.

Can I Run A Batch File Hiddin The DOS Window?
can i use a .vbs file to execute a batch file ..lets say
c:j.bat ,preventing the DOS window from popping up?
i mean...can the code included in the batch be executed without
any window popping up?

How To Set My Program Launches Itself?
How to set a VB program to launch itself at certain time? I want my program automaticly run every Friday night at 10:00pm.

Is it mean I have to have my PC on at that time? or we can code to turn it on at that time too?
Thanks.
Pal

Redirecting Program Launches
Greetings

I was browsing through here, and hopefully I haven't asked a question that was recently answered....

My question is, how do I redirect program execution?

For instance, if the user double clicks on notepad.exe {from Explorer or something}, how can I write a program that will launch WordPad instead?

Disabling Close Option In Command Window While Executing Batch File
Hi Friens,

I m new to VB and new member of this forum.

I am executing a batch file using the following command in VB
rc = shell(App.Path & "deletepdf.bat " & fname).
It works fine.

For executing the batch file, command window opens. I want to disable the close option(right upper corner) in the command window bcos I dont want the user to terminate batch job manually.

Could anyone please help regarding this.
Is there any option in the shell command itself to disable the close option of command window. Let me know.

Thanks,
Vishnuvardhan

Disabling Close Mark In Command Window While Executing Batch File
Hi Friens,

I m new to VB and new member of this forum.

I am executing a batch file using the following command in VB
rc = shell(App.Path & "deletepdf.bat " & fname).
It works fine.

For executing the batch file, command window opens. I want to disable the close option(right upper corner) in the command window bcos I dont want the user to terminate batch job manually.

Could anyone please help regarding this.
Is there any option in the shell command itself to disable the close option of command window. Let me know.

Thanks,
Vishnuvardhan

How To Run Batch File Using Vb Program
hi, I want to execute a batchfile using visual basic program.

Execute A Dos Batch File In A Vb Program...
How can I execute a dos batch file by clicking a button in a vb program. Thanks in advance for any help.

VB Program In DOS Batch Gets File Locked
Have a VB program that runs in a DOS batch file. Batch file is automatically run (unattended) by a workstation scheduler.
The VB program opens a file ...
Open G:DataFile for Input As #2
reads it in a Do While loop to EOF
Input #2, strDataRecord
(& does some selective extracting
& writing to another file)
after exiting loop (EOF)--closes the file
Close #2
then the END command is executed
& the VB program closes.
THE BATCH FILE THEN TRIES TO RENAME THE FILE
if exist G:DataFile REN DataFile OldData

Most of the time it works okay, but occasionally it errors
out with 'Lock violation writing device NETWORK
Abort, Retry, Fail?'
of course, since the batch is unattended, it eventually times out....but it also tends to freeze the workstation that runs it.

**Is there another way that I should be closing or
releasing the file that will free it quicker?**

Start Of Program Launches Visual Installer
Hi,

I've made a simple program that is a kind of monitor of tcp/ip traffic. On some machines it starts visual installer that wants to install some parts of office premium. I can skip that and the program still runs perfectly. I've removed all unneccesary
references and components. The components i use is listview, plain buttons, timers and winsockets. I've checked the programs dependencies and included all dll's that is needed.

Does anyone have any idea of how I can avoid the visual installer?

/Rikard

How Do I Run A VB Program From A Batch File Without Generating A Dialog Box?
I am trying to run a VB program to rename all the JPG filenames in a particular filepath, specified in a batch file, and by the nature of the scheduled batch file, it would need to be able to run unattended, thus not generating a dialog box or requiring a click on a button. Does anyone have any suggestions on how I could code this? Thanks in advance!

Jeff


"Remember, no matter where you go... there you are."
- Buckaroo Banzai

Edited by - zigwaffle on 5/12/2004 10:08:31 AM

How To Hide AVI File In My Program
i am using Visual Basic my problim is:
i want to use an AVI file in my EXE program
but i don't want this file to be used without my program
is there a way to:

1-make this AVI part of my EXE prg.

OR

2- incode this AVI file making my program the only way to  
   decode it   

Please HELP... How Do I Attach A File At Runtime When Outlook Launches?...URGENT
how do I lauch MS Outlook from vb .net? What I want to do is.. on form1 I have button called btnEmail. When they click on btnEmail, it should attach a .pdf file and then lauch outlook with .pdf already attached to it. Does anyone know how to do that? I tried using ShellExecute() but it doesn't launch outlook. Here is what I have

Code:private sub btnEmail_Click()

ShellExecute(0&, "open", "mailto:ENTER EMAIL ADDRESS HERE" & _
                         "&subject=" + rtxtSubject.Text & _
                                     "&addattachmentfile('c: emp emppdf.pdf')")", vbNullString, "C:", SW_SHOW)

end sub

Private Declare Function ShellExecute Lib _
              "shell32.dll" Alias "ShellExecuteA" _
              (ByVal hwnd As Long, _
               ByVal lpOperation As String, _
               ByVal lpFile As String, _
               ByVal lpParameters As String, _
               ByVal lpDirectory As String, _
               ByVal nShowCmd As Long) As Long

Private Const SW_SHOW = 1

Please help....

Hj007

"UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a boot partition virus." - Peter H. Coffin

"Your body is 70 percent water, so don't worry: Even if you were to drown, only 30 percent of you would die." - www.THEONION.com

Edited by - homerj07 on 3/26/2004 12:50:22 PM

How To Hide Parent Window On Display Child Window.
I have developed small cutom application.My clicking menu item on the parent window, child window displays.At the same time I want to dismiss(hide) the parent window.Again if I close the child window the parent window should display.

Any help please in VB.

Need Program To Display .txt File Contents As A Scrolling Window
It's been 15 years since I did any Basic programming, so
I was wondering if I could get some help.

I want to display the contents of a .txt file in real-time
as the file is updated. I don't want to just copy the entire
contents, but only update the scrolling window with newly
added info which I can scroll back to see previous updates.

Anybody out there willing to take on this project?

Thanks

Big Fred

P.S. OS is Windows 2000

Hide A Window
how can i hide an window

Hide Window
Is it possible to hide a form when the user takes the mouse away from it?

Hide Window
hello
is there a way in vb to hide the window and display only it's contants? (image, frame, buttons)?
for example not to see the title bar (caption bar of windows)

Hide Window
How can I make it so there is no window for the program. (the programs between the start and system tray), also so it isn't in the system tray?

Hide Window
Hey,guys wonderin if any one can show me how to hide a window what has specfic text in it say the caption is "Bla bla lol 2005 pro" and in the program if i have it to hide all windows what are open with "bla" in how could i hide it,i want to hide the windows not close thanks

Hide DOS Window
Is it possible for me to hide a DOS window? A certian switch maybe? .. The dos program cannot actually be closed, it can only be hidden. ...Any ideas would be greatly appreciated.

Hide [x] Of A Window
how to hide (or disable) the [x] (closebutton) of a window?

think with the thel of sendmessage, but i don't know the message to send along to the window.


thanx in advance
alex

Hide Window
How can i hide the dial-up connection window?

I used the following code.

Private Function HOConnect() As Boolean
Dim mlConnectionNumber As Long
Dim lngResult As Long
mlConnectionNumber = 0&
If Online Then
HOConnect = True
Else
txtStatus = "Connecting ..."
lngResult = InternetDial(Me.hwnd, dun, INTERNET_AUTODIAL_FORCE_UNATTENDED, mlConnectionNumber, 0&)
If lngResult = ERROR_SUCCESS Then
HOConnect = True
txtStatus = "On-Line"
DoEvents
Else
txtStatus = "Off-Line"
End If
End If
End Function

How can i hide the window in order to prevent the user from cancelling the command?

Thank you!

Hide Window
Hi,
    how I can hide another windows...I have a inactive window and
    I want to just hide the window not it's process....

Batch Program
In my vb program I Shell out to a batch program which does some things and ends. It retruns back to vb--Does anyone know how to tell if the Batch Program completed successfully?

Is There Any Way To Hide The Upper Bar Of A Window?
Visual basic verion:6
I would like to find a method (or something) to hide the upper bar of a window. For those who don't understand what I mean with the term "upper bar" I mean the (by default blue) bar that contains the minimize,maximize and exit buttons. (It is the one that you catch in order to move a window manually).

Hide The Window Format...
Somebody knows if i can hide the window format from a form like to initialize a program with a image without the title bar or to show a message form without this format? I don't know if it's possible... Thanks

Hide Window In Excel W/ VBA?
I'm trying to open another workbook to reference data.

Workbooks.Open Filename:="C:KPKUVGNInside SalesFBO Reps.xls"
Windows("FBO Reps.xls").Activate
Range("A1:E1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("test.xls").Activate
Range("AD1").Select
ActiveSheet.Paste

However, when the parent worksheet (test.xls) opens (FBO Reps.xls) from visual basic, the macro stops.

It doesn't give any errors or stop codes. It just stops at line 1.
Workbooks.Open Filename:="C:KPKUVGNInside SalesFBO Reps.xls"

Any help would be greatly appreciated.

Thanks!,
Kevin

How Can You Hide A Window Based On Its Exe Name?
Anyone know?
I want to hide all windows that contain 'notepad.exe' for example, how can I do this?

Hide Window Clock
Dear all,
How can I place my clock program to overlap the windows clock control?.

Hide/Show Window
Hey,how can i hide/show window by press pressin alt + 1 to show and alt + 2 to hide thanks

HIDE/SHOW Window
How would I hide/show another processes' window, similar to SW_HIDE and SW_SHOW (I think).

Example:

I want to make a program that has 2 command buttons: Hide Wordpad and Show Wordpad. Hide Wordpad hides wordpad completly, only to be seen in task
manager. Show Wordpad makes wordpad come back and appear in taskbar.

Hide Minimized Window
I downloaded some sample code for an MDI form taskbar that immitates the Windows taskbar, but when you minimize a form, it still minimizes into a little blue box. Any APIs I can use to hide it when it minimizes?

Hide/Show Window
I like to use API or send message to window and hide it. By hide i mean hide it from the screen and system-tray and TaskBar. And after hide it i like to know how to reshow it.

Thank you,
Kiron

Help Me Hide The Console (dos)window
I am writing small programs to clean up text files for import into ms access. I have been able to easily implement the programs but The issue is that when these programs run they bring up a dos window showing what it is doing. I would like to know if there is a way to supress the popup of the console window or make it run in the background some way

hope someone can help

Cory

Minimize Or Hide This DOS Window
hi,
when i run a batch file it always pop up a DOS window on my windows 2000 computer.
how can i Minimize or hide this DOS window?
thanks

Hide A Window Before It Is Created?
Does anyone know of a method to hide a window before it appears or before it is sent a window message such as WM_SHOW.

I am thinking this is going to require some message stream monitoring (hooking) and I am wondering if someone can point me in the right direction of a specific API function to use or an example that you can find on mr. google.

I have looked around many places but have never came upon an exact solution to this problem.


If anyone is curious to why I am trying to do this, basically is it to make better functions that help manipulate windows. As many of you know, sometimes you have to take the messy rounte, and perform functions by use of interaction of Sending various messages to windows: Ex: Jumping to a registry key. And other times if the task is performed in the background without taking away focus from the user, it is much cleaner and easier to use. With this said I am trying to bring up a window, and hide it before it takes focus / displays (or blinks depending on how fast you hide it).
Of course I could just use a timer to monitor for the window creation, but the window still blinks (kinda icky looking when you see a window flash and then go.)
So my goal is to try and hook a processes message stream, or the entire message stream (if possible without process injection crap) and monitor for my window I want to manipulation during it creation.

Thanks for your help =].

Hide Window In Taskbar
hai
how can i hide the application window which is to be displayed in system taskbar for my MDI form

please solve my problem

thank u

How To Hide A Console Window Thru VB
Hi all,
I am getting a problem of a console window.This window opened by some other application.Still,i could get the window handle and process id.I have tried thru showwindow options.But,i could not solve the problem.Can anyone help me,how to hide the console window.

Kind Ragards
umapathy

Hide Program In Control Alt Del Program List
Hello people,

anybody help me how to hide my visual basic program
to control-alt-del program list?

hope you can help with this... thanks

Use A Batch Program To Run A VB Macro
I have a purchased program called PAC4SWX that users can batch run printing, exporting, macros, etc. I also have a macro that does in fact work. What it does is simply uses SendKeys. The problem is that I can't get this program to successfully run this macro.

I recently batched another macro that added and filled in a custom file property to a set of files. But for some reason, the PAC4SWX program is getting hung up on this export macro.

An end note: this PAC4SWX program is only used for SolidWorks type files. Does anyone know a way to get this macro to run in the batch program? Add a delay of some kind? Should I post code? (I didn't think it would help right now.) Thanks!

Running Batch Program
I need to run a batch program from vb6. The batch program has to run another script file (.shp) to get files from our website (I can't get inet or third party software to work).

I can run the program from dos as well as windows, but, when I try to run it from vb6 I get the error "error opening script file".

Is there a trick to running another batch file from .bat in vb6?

Thanks in advance.

Delete/Hide Part Of A Window?
what message do i send to a hWnd to effectively hide a part of the window?


example: the rotating banner ad in Yahoo Messenger's remote webcam window..... i can subclass the window and get the hwnd of the box, but what do i do to actually hide/remove it?

ive tried using WM_Destroy and WM_DeleteItem even though i dont really know what they are for obviously they didnt work...

any help?

Hide/Show Window By Caption
How would i hide / show a window by a caption via API?

Cannot Hide DB Window With Custom Icon
In Access, Tools->Start... I uncheck the "Show Database Window" checkbox to hide the database window when the database opens.

When I enter an icon to be used for the program, the hide DB window utility cease to work on Windows 2000, but not on Windows XP, e.g. the DB window is shown when opening the database on a Window 2000 system.

Any suggestions on how to solve this?

How To Hide Window That Running Applications?
first, i manage to burn CD using Visual Basic but the window of CD writing wizard is on top of my form..if u could tell me how to hide the window even it's running the application..I would much appreciated..

Running Batch Files From Vb Program
I want to pass few parameters and run batch files from my vb front end. How can this be done? Any examples will be of good help.

Copyright 2005-08 www.BigResource.com, All rights reserved