Jump to content

how to save the txt file into cmd format?


Recommended Posts


Okay...let's say you are using Notepad to work with the file. Get it all ready, then go to file and then save...when the dialog box pops ups enter in the file name you want to save it as. file.cmd for instance...now the trick is to enclose that with " " like this:

"file.cmd"

If you have that in the name spot it will save it as whatever is in the quotes. Of course, if you save a file as a bat file and it's not correct syntax then you're still not gonna get it working.

As for where to save it...what are you doing with it? Need more info as to what the batch is gonna accomplish.

Edited by InTheWayBoy
Link to comment
Share on other sites

You can do it either way.

The GuiRunOnce section can accept multiple commands, or just one. It's usually better to use just one just in case something causes it to skip the other ones for whatever reason.

If you need to track down what is and what is not installing, just use commands like:

ECHO Now installing PROGRAM ...
RUN INSTALLER
ECHO PROGRAM installed.
ECHO.
ECHO Now installing PROGRAM 2 ...
; etc.

Edited by Asin
Link to comment
Share on other sites

another way:

Control Panel > Folder Options > "View Tab" > uncheck "Hide extensions for known filetypes.

Then just rename you "something.txt" to "something.cmd"

True, but that doesn't help you in the Save dialog.

Not unless you select All Files in the drop down menu instead of Text Files. But if you do that, then it doesn't matter if extensions for known filetypes are hidden or not. If you use All Files, you won't need the quotes either.

Link to comment
Share on other sites

thanks to all

now what name should i give the file and where to replace it i mean i which folder

and do i have to write pragram 1 and 2 and the software name or what?

thank you

Edited by sha6sho6
Link to comment
Share on other sites

You can put it anywhere that you want. Although, if you wish to use the GuiRunOnce section to run this file after the first login, it would be better to have some file on the hard drive first. That is, you need to put this in the $OEM$\$1 or $OEM$\$$ folder on your CD. The $1 folder is preferable since $$ means your Windows root directory.

In this file, you can have it call two other batch files, or just put all the commands in the one file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...