cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
james_decosta
Level 9

hi i am starting an application server and i use the execute launch browser

hi,
right now in the post installation task,i use the script command and i start the application server say jboss and i execute the launch browser action of installanywhere.
But as the refreshenvironment custom code is not working on my system
ie windows xp,hence i am going to ask the end user that he needs to restart the system for the installation to complete.
Then my question is whether through some way of installanywhere ,can
i start the application server say jboss and execute the launch browser action after system restart.
Is there any hook by which we can start the application server after system restart.
regards,
james.
Labels (1)
0 Kudos
(1) Reply
MarkEarle
Level 6

Hey James,

I don't know much about InstallAnywhere but this is how I did it in installScript. You may be able to convert it.

///////////////////////////////////////////////////////////////////////////////
//
// Function: _SetStartupEntry
//
// Purpose: Sets/Deletes the application sent in to the Startup folder in the Start Menu.
//
///////////////////////////////////////////////////////////////////////////////
function _SetStartupEntry( szShortCutName, szCommandLine, szWorkingDir, szIconPath, nIcon, szShortCutKey, nFlag, bCreateEntry )
begin
// Not Logging so is is up to me to remove this setting if uninstalling or aborting
Disable( LOGGING );
if( !bCreateEntry ) then
DeleteFolderIcon( FOLDER_STARTUP, szShortCutName );
else
// Adding to the current user's Startup folder in the Start menu
if( AddFolderIcon( FOLDER_STARTUP, szShortCutName, szCommandLine,
szWorkingDir, szIconPath, nIcon, szShortCutKey, nFlag ) < 0 )then
Sprintf( gsvLogMsg, "WARNING! Unable to submit %s to the Startup Folder. After rebooting run this command manually: %s", szShortCutName, szCommandLine );
_WriteLog( gsvLogMsg );
else
Sprintf( gsvLogMsg, "INFORMATION! %s submitted to the Startup Folder.", szShortCutName );
_WriteLog( gsvLogMsg );
endif;
endif;
Enable( LOGGING );
end;


or


///////////////////////////////////////////////////////////////////////////////
//
// Function: _SetStartupRegistryEntry
//
// Purpose: Sets/Deletes the application sent in to the Run key in the registry.
//
///////////////////////////////////////////////////////////////////////////////
function _SetStartupRegistryEntry( szKeyName, szValueName, nType, szPath, bCreateEntry )
begin
// Not Logging so is is up to me to remove this setting if uninstalling or aborting
// The Configuration Wizard is dependant on this.
Disable( LOGGING );
if( !bCreateEntry ) then
RegDBDeleteValue( szKeyName, szValueName );
else
LongPathToQuote( szPath, TRUE );
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
RegDBSetKeyValueEx( szKeyName, szValueName, nType, szPath, -1 );
endif;
Enable( LOGGING );
end;


A good friend of mine came up with the code and I have used it ever since. The first is for creating a startup shortcut and the next is for creating a startup registry value in the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run or HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce keys. If you use the Run key you have to delete it after the application runs. The RunOnce key is purged after the application is launched.

Hope it helps,

ME
0 Kudos