# Batch Files and Visual Basic Programs



## aaronmcgowan (Oct 18, 2004)

Hey,

I have wrote a batch file. I was wondering, how to intergrate the batch file with a visual basic program!   Could someone please help me.


----------



## Mithrilhall (Mar 28, 2001)

Something like this? Google.....


RetVal = shell(environ("COMSPEC") & " /k c:\temp\test.bat",vbHide)


----------



## aaronmcgowan (Oct 18, 2004)

Hey,

Thank you. Now my question is, for this line of coding ::
RetVal = shell(environ("COMSPEC") & " /k c:\temp\test.bat",vbHide)

Dont you have to have the Batch file on your box. Yes I think you do, but how do I get the batch file into the visual basic program? So that All I need is to have just the VB Program.

Or ... here is the coding to my Batch file :

```
@echo off
REM Batch file to remove Proxy Settings from Internet Explorer.
REM ----------------------------------
rem echo %OS%
if Windows_NT == %OS% goto WINNT
echo You are running a Microsoft Operating System 
goto END

:WINNT
echo You are running a Microsoft Operating System
goto END

:END
REM Change proxy settings to null
regedit.exe /s ProxyOff.reg

REM pause
```
How could I take that coding in the batch file (see above) and put it into the VB Language so that it will be executed when a button is pushed?

Edited by: aaronmcgowan


----------



## MustBNuts (Aug 21, 2003)

...call me jaded and suspicious, but a batch file changing Proxy settings in someone's registry and phrases like "You are running Microsucks Operating System // brought to you by =cipher=" don't leave me with warm and fuzzies that what you are doing is completely above board....

Just my two cents,

MBN


----------



## aaronmcgowan (Oct 18, 2004)

Hey,

My friend wrote the batch file. And he wants me to put it into a VB program. Could u help me out and tell me how to add the batch file into the VB program so all I need is the VB program and or to just have the coding changed into the VB Language so its easier. Could u please help me. Thanks,


----------



## MustBNuts (Aug 21, 2003)

...call me jaded and suspicious, but a batch file changing Proxy settings in someone's registry and phrases like "You are running Microsucks Operating System // brought to you by =cipher=" don't leave me with warm and fuzzies that what you are doing is completely above board....

Just my two cents,

MBN


----------



## aaronmcgowan (Oct 18, 2004)

Stop POSTING THAT! I would like some help.


----------



## MustBNuts (Aug 21, 2003)

Two posts regarding how to quietly change registry settings, and other posts asking how to crack BESS.... like I said:

...call me jaded and suspicious, but a batch file changing Proxy settings in someone's registry and phrases like "You are running Microsucks Operating System // brought to you by =cipher=" don't leave me with warm and fuzzies that what you are doing is completely above board....

Just my two cents,

MBN


----------



## bassetman (Jun 7, 2001)

What is the purpose of this file you wanted embedded?


----------



## aaronmcgowan (Oct 18, 2004)

Hey,

What I would like is so that when I push a button in a visual basic program I am writing, the button executes the exact same thing as the registry file and or the batch file would but using visual basic language. 

Can someone please help me! 

And MustBNuts... I what is so bad? Its not illegal!


----------



## bassetman (Jun 7, 2001)

aaronmcgowan said:


> Hey,
> 
> What I would like is so that when I push a button in a visual basic program I am writing, the button executes the exact same thing as the registry file and or the batch file would but using visual basic language.
> 
> ...


I'm still not clear on what you want the end result of running this file to be.


----------



## aaronmcgowan (Oct 18, 2004)

Hey,

The end result after pushing the button is to disable proxyservers and or ... to change the proxyserver registry files to null.  Please help!


----------



## bassetman (Jun 7, 2001)

I'm going to lock this thread for now, if another Mod believes what you are trying to do I'll let them re-oopen it.


----------



## JohnWill (Oct 19, 2002)

I think you're right on target bassetman, this doesn't appear to be the kind of activity we allow here.


----------



## dvk01 (Dec 14, 2002)

aaronmcgowan

If you make ONE more post asking for ways or trying to get round the restriction the school has put on it's computer network

You will be BANNED and NOT just for a temp period

This site is about computer help not hacking and ways round legal restrictions


----------



## bassetman (Jun 7, 2001)

Thanks!


----------

