Users Guide‎ > ‎

Command Line

Summary
PicasaStarter can be started from a shortcut or the command line using command line arguments to control it's operation. When PicasaStarter is executed, the command line is parsed and if keywords are found, the operation is accomplished without starting the PicasaStarter GUI.
 
In addition, for advanced operations, PicasaStarter sets some environmental variables and executes a batch file just before Picasa is started and just after Picasa ends. These features allow the advanced user to write batch files to control the environment before running Picasa, and restoring it after Picasa is closed.
 
Command Line Arguments
PicasaStarter can be started from a shortcut or the command line using command line arguements to control it's operation. When PicasaStarter is executed, the command line is parsed and if keywords are found, the operation is accomplished without starting the PicasaStarter GUI.
 
Command Line: PicasaStarter.exe [/autorun | /backup] [ "Database Name" | Personal | AskUser ]
 
First Argument: Action To Be Taken:
/autorun
The /Autorun argument tells PicasaStarter to run Picasa using the database name specified in the second argument.
Example:  PicasaStarter.exe /autorun "P Database" tells PicasaStarter to run Picasa using the database called "P Database"  as defined in the PicasaStarter database list.
/backup
The /backup argument tells PicasaStarter to do a backup on the database name specified in the second argument.
Example: PicasaStarter.exe /backup "P Database" tells PicasaStarter to run the backup task defined for the database called "P Database" as defined in the PicasaStarter database list. The backup will only be performed if  the backup is being requested from the computer  defined in the backup settings.
Second Argument: Database Name:
"Database Name"
The  Database Name is the name of the database as specified in the Picasa Databases list in PicasaStarter. If there are spaces in the database name it must be enclosed in quotes (").
Example: PicasaStarter.exe /autorun "P Database" runs Picasa using the database called "P Database" .
Personal
The  Personal database is always the users' local Personal Database and is the default database automatically defined at the top of the Picasa Databases list in PicasaStarter. The name can be enclosed in quotes (") but it is not required.
Example: PicasaStarter.exe /autorun  Personal  runs Picasa using the standard Picasa database .
 
AskUser
AskUser  displays a selection box allowing the user to choose the database to be used from the Picasa Databases list in PicasaStarter. AskUser can be enclosed in quotes (") but it is not required.
Example: PicasaStarter.exe /autorun  AskUser  displays the following dialog box allowing the user to select the database to be used in running Picasa, or to Quit without doing the operation.
 
 
 
 
Batch Files: Pre_RunPicasa.Bat and Post_RunPicasa.Bat
When PicasaStarter Is going to run Picasa, the Pre_RunPicasa.Bat file is called after the environment is set up, just before Picasa is actually started. After Picasa exits, and before the environment is taken down, the Post_RunPicasa.Bat file is called. These two Batch Files are called if they exist in the PicasaStarter Settings directory as defined by PicasaStarter.
The advanced user can use Pre_RunPicasa.Bat file to do anything required before Picasa can be run. Examples of uses include logging onto a network, mapping drives, setting up environmental variables, or copying or moving files. After Picasa ends, the Post_RunPicasa.Bat can reverse the actions as required.

Simple Example of a Pre_RunPicasa.Bat File:

The example batch file below does nothing but list the Environmental Variables starting with "PS_" and wait for the user to press any key.

@echo off
TITLE %~DP0 %*
echo.
echo %~DP0 %*
echo.
set | find "PS_"
echo.
pause

 
 
Environmental Variables: PS_PicasaDBGoogleDir and  PS_SettingsDir
When PicasaStarter Is going to run Picasa, the  environmental Variables PS_PicasaDBGoogleDir, and PS_SettingsDir are set just before Pre_RunPicasa.Bat file is called. They are deleted just after Picasa exits, and after the Post_RunPicasa.Bat file is called. These environmental variables provide the batch files with information on the location of the selected database Google Directory path, and the PicasaStarter Settings directory path. These Environmental Variables only exist in the Local Picasa Environment.
 

PS_PicasaDBGoogleDir

The  PS_PicasaDBGoogleDir is the Path to the folder containing the Google Directory which contains the Picasa database
Example: If the database was in the path P:\PicasaPFolder\PDatabase\Google\Picasa2... then the PS_PicasaDBGoogleDir variable would be set to  P:\PicasaPFolder\PDatabase which is the directory containing the Google Directory.

PS_SettingsDir

The PS_SettingsDir is the Path to the folder containing the PicasaStarter Settings file (PicasaStarterSettings.xml). This is also the folder containing the above batch files, and the drive is the Relative Path Source drive when a virtual drive is defined.
Example: If the settings file was P:\PicasaPFolder\PicasaStarter\PicasaStarterSettings.xml then the PS_SettingsDir variable would be set to P:\PicasaPFolderPicasaStarter.