Initializes the credential store. Call this subroutine once, before any of the other credential store subroutines. The credential store is not created until your program calls add_password.

This subroutine accepts the location of the credential store file. If you do not provide a credential store filename, VICredStore::init() looks in the default location.

OS Default Location
Linux $HOME/.vmware/credstore/vicredentials.xml
Windows %APPDATA%\VMware\credstore\vicredentials.xml

If no credential store exists at the default location, the initialization process performs the following actions.

  • Checks that the credstore directory exists, and creates one if it does not.
  • Creates the vicredentials.xml file and parent directory.

If you provide a non-default credential store filename to VICredStore::init(), the credential store at that location is used. If there is no credential store at that location and the directory you specify exists, the initialization process creates the file. If the directory you specify does not exist, the initialization process fails.

Parameters

Parameter Description
filename Name of credential store file.

Returns

Returns 1 if initialization is successful. Otherwise, returns 0.