You are here

HowTo: Add batch files to the PortableApps.com Platform

9 posts / 0 new
Last post
sar3th
sar3th's picture
Offline
Last seen: 7 years 10 months ago
Joined: 2009-02-13 03:57
HowTo: Add batch files to the PortableApps.com Platform

This is sar3th's Guide on adding batch files to the PortableApps.com Platform with screenshots. Anyone who reads through this and follows these simple steps should be able to add any batch file to his/her PortableApps.com Platform Smile
Note: depending on your operating system and your settings, your system might look a bit different than mine. This shouldn't be a problem though, since you will find all the required things in your system at the same place.

Jumplist

Requirements

For the optional advanced steps, you will need IcoFX. You can also use IcoFX Portable.

Basic step-by-step guide

  1. Open the installation folder of your PortableApps.com Platform [Screenshot]
  2. Navigate into the PortableApps folder [Screenshot]
  3. Create a new subfolder. Name it anything you like, but do not use spaces! In my example, i will call my folder ExampleApplicationPortable [Screenshot]
  4. Navigate into your new subfolder. Now, copy your batch file(s) and all required files into it. My batch files are called example1.bat and example2.cmd. They don't require any other files, so i don't need to copy anything else. [Screenshot]
  5. Create a new subfolder. Call it App. [Screenshot]
  6. Go into your new App folder. Creae another new subfolder and call it appinfo. [Screenshot]
  7. Now, open Notepad. To do this, click on Start, then point to Programs, Accessories and then, click on Notepad. [Screenshot]
  8. Paste the following code into your notepad window. Details about its function can be found at this site.
    [Format]
    Type=PortableApps.comFormat
    Version=2.0
    
    [Details]
    Name=ExampleApplication Portable
    AppId=ExampleApplicationPortable
    Publisher=sar3th
    Homepage=PortableApps.com/node/21757
    Category=Utilities
    Description=ExampleApplication Portable is an ExampleApplication for this guide.
    Language=English
    
    [License]
    Shareable=true
    OpenSource=true
    Freeware=false
    CommercialUse=true
    
    [Version]
    PackageVersion=1.0.0.1
    DisplayVersion=1.0 Release 1
    
    [Control]
    Icons=2
    Start=example1.bat
    Start1=example1.bat
    Name1=ExampleApplication Example 1
    Start2=example2.cmd
    Name2=ExampleApplication Example 2

    Now go ahead and change the settings to match your needs.
    Important notes:

    • If you want more icons, change the number of Icons accordingly and add new StartX= entries, where X is the number of the icon
    • If you only want one icon to be shown, change
      Icons=2

      to

      Icons=1

      and remove

      Start1=example1.bat
      Name1=ExampleApplication Example 1
      Start2=example2.cmd
      Name2=ExampleApplication Example 2
    • More information can be obtained here.

    [Screenshot] (outdated)

  9. Choose File->Save As. Now navigate to your appinfo folder. Use "appinfo.ini" as file name. [Screenshot]
  10. Close Notepad. Restart your PortableApps.com Platform. Your new icons will show up. [Screenshot]

Advanced steps (optional)
You can easily change the icons of your newly created entries. To do that, you will either need an ico file or two PNGs with the dimensions of 32x32 and 16x16. You can easily generate them from any icon yourself using IcoFX. In this example, i will show you how to save the Images as ico file.

  1. Open IcoFX. Close the Tip of the day if it appears by clicking its close button. [Screenshot]
  2. Open your desired icon. [Screenshot]
  3. Click File, Save As. Navigate to your appinfo folder, and name the file appicon [Screenshot]
  4. If you have multiple icons, make sure you name them appicon1.ico, appicon2.ico, ... [Screenshot]
  5. Restart your PortableApps Platform Smile [Screenshot]

Changelog

  • 06.12.2009 Initial post
  • 07.11.2011 Updated to PAF 2.0

Questions? Suggestions? Improvements?
Leave a comment!

solanus
solanus's picture
Offline
Last seen: 7 years 1 month ago
Joined: 2006-01-21 19:12
Nice explanation!

There's a lot you can do with the new ini-based format.

Two similar posts that show other variations...

Creating shortcuts to folders:
https://portableapps.com/node/20498
Creating shortcuts to executables in subfolders:
https://portableapps.com/node/20906

I made this half-pony, half-monkey monster to please you.

jsierra
Offline
Last seen: 11 years 11 months ago
Joined: 2007-11-16 14:47
Add Batch Files with Convert to Exe

I put together a little utility that you can use to convert batch files to EXE. It builds a self-extracting archive with VBScript and batch file wrappers to launch whatever file you provide. It's not just limited to batch files, you can use it to launch any kind of file you want (VBScript, txt files, etc.). You can also build an exe wrapper for any command if you use the /launch parameter. It will prompt you for a command you want to run, and it builds the exe file for that command.

solanus
solanus's picture
Offline
Last seen: 7 years 1 month ago
Joined: 2006-01-21 19:12
Here's the thing

With the current version of PAM, you aren't limited to exe's anyway.
If you read the OP's post, he's shows you exactly that.
Of course, your app is great if you don't use PAM.

I made this half-pony, half-monkey monster to please you.

jsierra
Offline
Last seen: 11 years 11 months ago
Joined: 2007-11-16 14:47
My Tool Hides cmd Windows Also

This is true. One thing I forgot to mention is that my exe generator will also run in a hidden cmd window, which I like. You could add a .bat to the menu w/ OP's instructions, but you still see the ugly cmd window when it launches. The VBScript wrapper that I generate in the exe will launch in a hidden cmd window, which makes it a bit more seamless.

wduncan
Offline
Last seen: 3 days 10 hours ago
Joined: 2009-08-31 13:52
Great instructions

Even I can understand them! Thanks for the post.

I used to sign here, but the ink keeps smudging on my screen.

gluxon
gluxon's picture
Offline
Last seen: 1 year 2 months ago
Developer
Joined: 2008-06-21 19:26
O_O That's what I said on the

Shock

That's what I said on the IRC and NOBODY was listening :/

José Pedro Arvela
Offline
Last seen: 2 years 11 months ago
Joined: 2007-07-10 07:29
But...

After you left we gout ourselves finally organized, and sar3th said to Tim it was possible, that he tested it, and it worked, and helped the user with all the steps that were necessary. Then we asked sar3th then to make a tutorial.

Sorry gluxon Blum

Blue is everything.

Paderman
Offline
Last seen: 2 months 2 weeks ago
Joined: 2021-09-18 10:13
After 11 years...

After 11 years, all pictures to this topic are gone linked to ImageShack ;-)

Regards/Gruß
Paderman

Log in or register to post comments