How do I embed a batch file in a vb program? [closed] - vb.net

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to make a simple VB program. I just want it to embed into it a running batch program. I'm asking if there is a way to do that.
So to break it down could i take a batch file and embed it into the program.
So it would kind of be like this except its not two windows: http://gyazo.com/72652af4dfc04cd379ee11ed0de165e2

1) It's probably silly to have a separate .bat file if you can do everything you want directly in the VB program. Have you considered just incorporating the functionality directly in VB?
2) To run a separate .bat file from VB.Net, perhaps the easiest way is to use Process.start().
EXAMPLE: System.Diagnostics.Process.Start("c:\path\to\myfile.bat")
3) Finally, you can always a) create a text file (with a .bat suffix and your .bat commands) on the fly, then call "Process.Start()" on your dynamically-created .bat file.
PS:
I assume by "VB" you probably mean "VB.Net". If you mean "VB6", the API would be "Shell()". For example: Shell("c:\path\to\myfile.bat", vbHide).

Related

How to decompile a access database without starting/opening it? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In our deployment chain we compress the access-database before sending it to the user.
As there where some troubles we want to decompile it too.
But unfortunately decompiling (as described here: How does one decompile and recompile a database application? ) seems to require to start/open the database.
As we deploy very frequently, I am searching for a way to decompile the database without opening/starting it.
Don't believe that you can de-compile without launching the application. (even from command line). The only possible approach would be to create a blank database and import everything. This I suppose could be automated, and the result would be a database that not been compiled. So, a import of all objects into a new blank database is a "possible" solution, but it would involve code to transfer objects into that new blank database. Not likely worth the effort, but is a possible. And one could also consider the save-as text to export all objects into a text file, and then re-build a new solution based on those text files (this is how source code control works with access, and thus even building from a GIT repository is possible).

Importing CSV files to access using VB or Batch [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a bunch of excel files that need to imported into MS access tables everyday. I was looking for a way to automate this using Batch or VB. Is this possible using batch only? If not, how do i come about doing this with vb, i have no experience with vb and have no clue where to start. Can vb scripts be written on access only or requires any other programs?
Regards,
VBA will best suited for this task. Every MS Offfice program have developer section on the ribbon (but you have to enable it), where you can enter VBA editor and wirte scripts there.

Does Zerobrane provide an "include" mechanism? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
To Zerobrane users, since this is not a question on lua :
I use Zerobrane for editing lua programs that are to be used with LuaLatex. Very nice !
I make all tests there before using the developments in LuaLatex. So, at the beginning, the programs are run there. I need to tidy up this part, on ZeroBrane, by making files hierarchical, with a master file and slave files around.
Once again, it is a question about ZeroBrane, not about how I use the file within LuaLatex (I know enough about doFile, luaexec and co)
Does this exist ?
I saw PaulK passing by, if he could drop a line, it would be appreciated ...
An "include mechanism" as you call it is usually a language feature, not some feature of an IDE.
Lua provides various functions for running code from other files.
dofile, load, loadfile, require, ...
The most convenient and common is require which will find a file by its name in a given set of directories and execute its contents.
Read this:
https://www.lua.org/manual/5.3/manual.html#6.3
https://www.lua.org/pil/8.1.html
https://www.tutorialspoint.com/lua/lua_modules.htm

How to create a new file by Mikrotik routers' scripting [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How to create a new file by script on Mikrotik Routerboard (Router OS 6.30)?
UPDATE:
This solutions also does not work well. It seems to be impossible to create a file and edit (/file set) it during one script call. I have no idea why, but only working solution is to run special create script two times (first creates a file and second edits it).
This easy task took me long time to solve. There is no official way, only some ugly workarounds. The main idea is create a file using some export operation (or fetch from network operation) and then flush created file.
Another problem is that multiple commands in one script file somehow cannot use created file's identifier. So instead of:
/file print file=newFile; /file set newFile contents=""
you must use:
/file print file=newFile; /file set [find name="newFile"] contents=""
Notice that first command just exports list of all files and second one flushes its content.

What is the difference between My.Computer.FileSystem.MoveFile and File.Move [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
The question says it all really.
What are the differences between these two methods that appear to carry out exactly the same function?
Is there guidance to say which should be used or are there conditions when you may use either?
The FileSystem.MoveFile has some more options than File.Move, like for example optionally showing a progress dialog, and creating the destination folder if it doesn't exist.
If you just want to move or rename a file, the File.Move method will be called in the end whichever you use, so calling it directly means slightly less overhead.
I believe they have near-identical functionality. Most people I've seen would prefer to use the latter, because "MyComputer." is a VB.NET-only construct, whereas File.Move is used in both C# and VB.NET. This makes it easier to get help, and easier for C# coders to read the VB.NET code and vice-versa.
I haven't checked My.Computer.FileSystem.MoveFile, but you can state if they are differences moving html files with associated images directories., because File.Move just move the file, but doesn't move the associated directory