how to make a bat file autostart in win system - batch-file

I have a bat file (in fact it is a tomcat startup bat), this is the very simple content:
c:/tomcat/catalina.bat run
Now I want it to autostart at system startup, any ideas?

To clarify more what #Oskar said. The autostart is the startup folder in your Program Files folder.
Any executable files placed in that folder are launched on windows startup.

if you want to start it when you are logged in then put it in start list, just create shortcut to bat file in startup folder start->programs->startup

Related

Write a batch file that installs EXE shortcut on computer remotely

I am writing a script to install a program remotely on requested computers. Only problem is that the file we invoke to install the application is actually a shortcut that points to an .exe and an .ini so it can install with specific parameters. Is there a way I can run the shortcut from the batch file so that it points to both file and installs on the users computer with parameters already set?
Is this what you are looking for?
xcopy "source" "destination" Example: xcopy E:\fileC:\Users\user\destination

Include file in console application

similar to this -> Create a standalone .exe file
however I am not sure about the responses posted there.
I have a console application and i want to launch and execute a batch file.
build everything works fine, but when i move the compiled .exe file, it says file not found.
How do I ship test.bat with my .exe, I do not want to create an installer, rather a standalone exe. Not comfortable with ClickOnce.
Update Currently I add that batch file as a resource, read its contents and re-create the file in a temp location. Then execute that batch file from there. Any other suggestions ?

.bat start command opening .exe but not loading info file

i am trying to start up a series of .exe's (minecraft console client)
with only 1 click but when i setup an .bat file it opens it in the folder where the .bat is placed not where the .exe is and all the info files are where the .exe is, i would just move them but all the info files are called the same things with diffrent info and the .exe is encrypted (so nobody can take code, i think its called encrypted idk).
How I want it to load: http://gyazo.com/a451735cb34262bf1bfc0709e7d6a11c
How it actually loads: http://gyazo.com/4ed35f560c41370d9d33f865fc67fccf
The .bat: START C:\Users\Fergal\Desktop\ConsoleClient\Vortex\Pinshi_Bwub\MinecraftClient.exe -Would have used another gyazo but don't have enough rep :(
Try the following batch file:
cd C:\Users\Fergal\Desktop\ConsoleClient\Vortex\Pinshi_Bwub
start MinecraftClient.exe

How to keep any program on Windows Startup with batch command

I want to run batch file on windows startup working with Windows 7, Windows 8 or Windows 8.1 which will start automatically on Windows Startup from any location of PC so that whenever PC start it will run automatically. Is there have any way to do that ?
you can use the task scheduler for that,
Action: Start a program
Program/script: path to your batch file : "c:\my\batch.bat"
Add arguments (optional): add here start parameters
Start in parameter (optional): Fullpath of your bat file location (needed if librarys are attached)
alternatively there is C:\Windows\System32\gpedit.msc
There you can easily navigate to adminstrative templates --> logon and add your script
A third method (and possibly the easiest) is to copy your files into the GP machine scripts startup folder.
C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup
C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown
Also works from the $OEM$ folder in case any readers are doing fresh installations.

How to customize shortcut in compressed file to run exe from current directory?

How to customize shortcut in compressed file to run exe from current directory? For example, i want to put compress two file inside winrar first is program.exe and the second is shortcut to that program, if i compress that in rar extension, and copy compressed file in other directory and open with winrar and run shortcut, i get nothing. So my question is what code to put in shortcut to run program.exe regardless in which directory will be compressed file extract?
You get nothing because there is no program to run. A compressed file isn't a filestore from which files can be run. When you "run" a file from a compressed file, the OS is actually extracting that file to a temp folder and then running it. When you tru and run the shortcut, its being extracted, but the temp folder in which it was extracted doesn't contain the actual .exe you're trying to launch, so nothing happens.
As to how you achieve what you want, I have no idea, but would not be suprised if it was not possible. If you're running the exe from a compressed file, why do you need the shortcut? Why not just click the .exe?

Resources