install sqlxml windows azure with startup task - azure

I have a startup task to install sql xml 3.0 sp3 but this not work.
In my project i have a folder "setup" which contains two files, setup.cmd and sqlxml.msi. In setup.cmd i have the following script:
start /w msiexec /i sqlxml.msi /qn
And in my servicedefinition:
<Task commandLine="setup\setup.cmd" executionContext="elevated" taskType="simple" />

Make sure the files are actually being deployed. In Visual Studio, open their properties and make sure Copy to Output Directory is set to "Copy always". If in doubt, extract your deployment package to a directory (it is a ZIP file) and see if the files are there.
When setup.cmd runs, the current directory will be your web application's bin folder so make sure to use a CD setup command inside setup.cmd.
Follow the debugging tips mentioned in Windows Azure Startup Tasks: Tips, Tricks, and Gotchas.

Related

How to install msi file in silent mode inside an InstallShield project

I have an InstallShield project which consists of two files and several folders,
MainSoftware.exe
AuxSoftware.msi
FolderA
FolderB
etc...
The main purpose of the project is just copying all of these files in the path specified by the user. It is very simple. However, after copying AuxSoftware.msi in the destination path, I need that a silent installation begins with this file. I know that a silent installation can be run by the following command:
msiexec /i AuxSoftware.msi /qn
But I don't know how to tell InstallShield that this command must be executed in the destination path after copying AuxSoftware.msi.
Could you please help me?
Thanks in advance
You can only execute one installer at a time once it is in the InstallExecuteSequence. Stein has a very good, brief explanation in the answer here.
I would suggest using a bootstrapper (setup.exe) that can install them in sequence.
Thanks for your suggestions. I found a way. They call it "nested installations". I created a Custom Action having the second .msi or .exe installer I want to run after a specific point in the process of the main installation.

Nuget package install using Azure App service editor

My application is hosted on Azure and I using the App Service editor to do my changes and build on the cloud itself without using Visual Studio locally.
Now I would like to install a Nuget package to the project. So I tried the console option from the App Service editor. But it does not work as the console window does not recognize Nuget commands.
So after looking through the help command on App Service editor console I found these options-
cd Directory navigation
copy
del
dir
exit Closes the console
git Git source control commanding
help List of available commands
mkdir
move
msbuild MSBuild commanding
node Node.js commanding
npm Node package manager
nuget NuGet commanding
open Open file in editor
ps PowerShell commanding
rd
rename
rmdir
touch Touch a file if it exists or create it otherwise
unzip Unzip archives
Native windows commands (append /? for help):
copy Copy files
del Delete a file
move Move files
rename Rename files
dir Directory browsing
mkdir Create a directory
rmdir Delete a directory
So there seems to be nuget command but when I use it the console window is just stuck and stays like that.
Am I using the command correctly or there seems to be some problem?
I know I can download and do this locally but I am looking for a way to do this simply using the App Service editor. Any help on this please?
Try
dotnet add package RestSharp --version 106.2.2
You could check:
Usage: dotnet add <PROJECT> package [options] <PACKAGE_NAME>
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
<PACKAGE_NAME> The package reference to add.
Options:
-h, --help Show help information.
-v, --version <VERSION> Version for the package to be added.
-f, --framework <FRAMEWORK> Adds reference only when targeting a specific framework.
-n, --no-restore Adds reference without performing restore preview and compatibility check.
-s, --source <SOURCE> Specifies NuGet package sources to use during the restore.
--package-directory <PACKAGE_DIRECTORY> Restores the packages to the specified directory.

Hot deploy of JSF pages in NetBeans to JBoss standalone

Background
Here's the set up:
Multi-developer environment using Subversion
NetBeans 8.0.2
JDK 1.7
Java EE6
JBoss 6.2 EAP running standalone
We may not change the tools; we may use neither Maven nor JRebel. Hardware upgrades are also not in scope.
Code Organisation
The source code, including web-related files, are checked out into:
C:\Apps\07-Work\Project\Project-Admin\Project-Admin-User-war\
This directory includes a common development structure (bold are checked out from the repository):
build - compiled files
dist - .war file
nbproject - project files
src - Java source code
web - JSF pages, WEB-INF directory, CSS files, etc.
build.xml - Ant script
JBoss Installation
The web application server is installed into:
C:\Apps\04-Tools\jboss-eap-6.2
Problem
The develop - deploy - test cycle is painfully slow. It can take upwards of 30 seconds to test a single change to a web page. Here's the current flow:
Edit file in NetBeans.
Save file.
Shift+F11 (Run >> Clean and Build).
Switch to browser tab (http://localhost:9990/console/App.html#deployments).
Click Replace.
Click Choose File.
Select Project-Admin-User-war.war file.
Click Open.
Click Next.
Click Save.
Switch to browser tab (http://localhost:8080/admin/users/).
F5 to reload the page.
The build (step 3) takes about 26 seconds; manual deployment adds to that.
Here's the ideal development cycle:
Change a JSF page in NetBeans (note: this is a file checked out from repository).
Save the JSF page.
Alt+Tab to a browser window.
F5 to reload the page.
It isn't as important to have hot deploy on Java source changes, as code development time tends to take much longer than simple web page layout changes.
Editing the exploded contents would mean developers are no longer editing files checked out from the repository and would therefore incur additional steps, or scripts, or possible loss of work.
Others have suggested the Deploy on save feature, which is disabled:
Another suggestion (as per the screen shot) is to run the application in debug mode, but selecting Debug >> Project (Ctrl+F5) didn't show page updates after changes.
Question
Is hot deploy of JSF pages possible using the given tools and constraints? If so, what are the exact steps required to achieve the ideal development cycle?
Standalone Configuration
The README.txt file shows that it is possible to "live deploy" content:
H) Manual mode only: Live replace portions of currently deployed unzipped content without redeploying:
cp -r target/example.war/foo.html $AS/standalone/deployments/example.war
Where the cp command on Windows translates to:
xcopy /e /s /y src dest
This leads to:
Open a command prompt.
Change directory: cd C:\Apps\04-Tools\jboss-eap-6.2\standalone\deployments
Create skipdeploy to prevent deployment while copying is in progress: type nul >> Project-Admin-User-war.war.skipdeploy
Copy files to create a directory containing the files that have changed:
xcopy /i /y /e /s C:\Apps\07-Work\Project\Project-Admin\Project-Admin-User-war\web Project-Admin-User-war.war
Next:
Delete skipdeploy: rm Project-Admin-User-war.war.skipdeploy
Create dodeploy: type nul >> Project-Admin-User-war.war.dodeploy
Return to the browser.
Press F5 to refresh.
The result is that a resource bundle has gone missing:
Related
Is it possible to deploy an exploded war file (unzipped war) in JBoss AS 7
How can I get JBoss to explode a deployed WAR file?
Jboss step by step set hot deploy
https://jasonmarley.wordpress.com/2014/09/11/how-to-deploy-exploded-archives-jboss-eap-6/
Here is a description of a Ant script change from 2009 found on http://wiki.netbeans.org. Maybe it is useful still.
http://wiki.netbeans.org/TaT_DeployOnBuildUsingJBoss
And another script solution:
How to setup JBoss server with Netbeans?
Overview
Achieving hot deploy using JBoss 6.2 EAP running in standalone mode is accomplished in three parts: configuration, exploding, and hot deployment.
Configuration
Ensure that a deployment scanner is configured as shown:
Ensure the web subsystem and system properties are configured:
Stop JBoss.
Edit %JBOSS_HOME%\standalone\configuration\standalone.xml.
Immediately after </extensions> (before <management>), disable caching:
<system-properties>
<property name="java.net.preferIPv4Stack" value="true"/>
<property name="org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY" value="true"/>
</system-properties>
Find the web subsystem (e.g., xmlns="urn:jboss:domain:web...).
Append the following element:
<configuration>
<jsp-configuration development="true"/>
</configuration>
Save the file.
Start JBoss.
Exploding
Exploding requires extracting the full contents of a WAR file with contents that will be deployed in the (very near) future.
Clean and build the application (Shift+F11 in NetBeans).
Change to the JBoss standalone deployments directory.
Create a skip deploy file.
Create the WAR directory.
Extract the WAR file.
Delete the skip deploy file.
Create the do deploy file.
This resembles the following (on Windows platforms; substitute paths for %JBOSS_HOME% and %PROJECT_HOME% as required):
cd %JBOSS_HOME%\standalone\deployments
type nul >> Project-Admin-User-war.war.skipdeploy
mkdir Project-Admin-User-war.war
cd Project-Admin-User-war.war
jar -xvf %PROJECT_HOME%\dist\Project-Admin-User-war.war
cd ..
del *skipdeploy
type nul >> Project-Admin-User-war.war.dodeploy
Hot Deployment
Create a batch file that contains the following:
cd %JBOSS_HOME%\standalone\deployments
type nul >> Project-Admin-User-war.war.skipdeploy
xcopy /i /y /e /s %PROJECT_HOME%\web Project-Admin-User-war.war
del *skipdeploy
type nul >> Project-Admin-User-war.war.dodeploy
Web Development
The ideal development cycle has almost been achieved:
Edit file in NetBeans.
Save file.
Run batch file.
Alt+Tab to browser.
F5 to refresh.
Ant has an OnSaveTask that can likely be coerced to run the batch, or even substitute for the batch file completely. Left as an exercise for the reader.

Azure Web Job Processing

I am creating a on demand web job which launches an executable in a directory off my FTP tree, but I can't find the directory on the cd command or the executable since the cd failed.
My batch file looks like this:
cd exedir\w32
file.exe
Note: I am FTPing all the files up there for this application, so Visual Studio is not involved.
How can I set up this batch file so it runs correctly?
cd %WEBROOT_PATH% got me to the wwwroot directory and from there it was just a matter of ..\;.\ ok now I know where I am good to go.

How to create log file for a launched setup.exe

I have inherited some InstallShield InstallScript projects.
I am currently using InstallShield 2009.
I cannot seem to create a log file when I run the setup.exe.
What command line options do I need to specify?
InstallShield has a method for creating a log file for the Setup.exe and Update.exe bootstrappers. You can simply use the /debuglog parameter from the command line when you run Setup.exe. This command line parameter can be used with the Setup launcher for Basic MSI, InstallScript MSI, and Web projects.
Here it is:
Setup.exe /debuglog
You will notice that a file called InstallShield.log has been created in the same folder as Setup.exe.
For more read >> http://www.installationdeveloper.com/686/using-log-files-in-installshield/
There is no such feature in InstallScript project types. The really good logging is in MSI project types. InstallScript really only has the ability to record a response file and generate a very terse logfile as part of a silent install. (/s /f1 /f2 arguments)
Setup.exe Command-Line Parameters
You can add registry settings which will tell Windows Installer to log your installation.
The registry settings you'll need are:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer]
"Logging"="voicewarmup"
"Debug"=dword:00000007
Once you run the installation, navigate to %temp% inside windows explorer and there will be .LOG files with a naming scheme of MSI#####.LOG.
NOTE: This should log all installations on your machine, so you may want to delete these registry settings when you're done.

Resources