inno setup installing sql server 2005 and after updating database - sql-server-2005

I want to use silent install of sql server 2005 express and after I want to update database. I used inno setup script wizard and I selected SQLEXPR.exe as installing application and the sql file which I want to update database after installing the sql server 2005 express."emin.sql" is a file that I want to update database after installing sql server.
Here is my code which is generated by wizard;
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "SQLEXPR.EXE"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{B6B8AFF5-6C3D-4673-8179-EE9C5C0A5072}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\SQL Server 2005 Express\SQLEXPR.EXE"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\emin.sql"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

Related

"__built-in-schema.yml (Line: 2012, Col: 24): Expected a mapping" after V2-V3 pipeline converstion

UPDATE: Here's the contents of azure_pipelines.yml:
resources:
repositories:
- repository: pf
type: git
name: _
ref: refs/tags/3.6.6
trigger: none
stages:
- template: __
parameters:
project:
- name: "__" # Must be unique within the list of projects
type: "msbuild" # Used with Publish/Deploy. Options: adla, dacpac, dotnet, egg, maven, msbuild, node, nuget, python, sap, ssis
path: "__" # Project Path
file: "__.csproj" # Project file
toolset: "msbuild" # Used with Build/Package. Options: adla, dotnet, maven, msbuild, node, python, sap, ssis
playbook: "___.yml"
sonarqube:
name: scan
scan: true
sqExclusions: ""
additionalProperties: "" #|
# sonar.branch.name=master
# sonar.branch.target=master
fortify:
fortifyApp: "_______"
fortifyVersion: "____"
sast: true
dast: false
buildConfiguration: $(BuildConfiguration) #release, debug
buildPlatform: $(BuildPlatform) #any cpu, x86, x64
- name: "__" # Must be unique within the list of projects
type: "msbuild" # Used with Publish/Deploy. Options: adla, dacpac, dotnet, egg, maven, msbuild, node, nuget, python, sap, ssis
path: "___" # Project Path
file: "___.csproj" # Project file
toolset: "msbuild" # Used with Build/Package. Options: adla, dotnet, maven, msbuild, node, python, sap, ssis
playbook: "_.yml"
sonarqube:
name: scan
scan: true
sqExclusions: ""
additionalProperties: "" #|
# sonar.branch.name=master
# sonar.branch.target=master
fortify:
fortifyApp: "______"
fortifyVersion: "__"
sast: true
dast: false
buildConfiguration: $(BuildConfiguration) #release, debug
buildPlatform: $(BuildPlatform) #any cpu, x86, x64
I'm attempting to run the ADO pipeline for a .NET Framework 4.7 app that has undergone the V2 to V3 pipeline conversion. I get the following error message, and the build doesn't even try to run:
__built-in-schema.yml: Maximum object depth exceeded
__built-in-schema.yml (Line: 2012, Col: 24): Expected a mapping
__built-in-schema.yml: Maximum object depth exceeded
That's using the msbuild toolset. I have an API project and a web app project in the solution, so if I removed either of them and then run the pipeline, it progresses past this stage, but gets hung on another error. (Not really necessary to go into detail about that error though, because it's directly related to me having removed the other project).
With the dotnet toolset, it runs, but then complains about a missing reference:
> D:\a\1\s\___\___.csproj(350,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\3.1.101\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\3.1.101\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk.
0 Warning(s)
I've tried commenting out the reference to Microsoft.WebApplication.targets in the .csproj files for the app, but it just adds them back in when I run the build locally or via the pipeline.
I've also tried changing the build pool to VS 2017 and Hosted Windows 2019 with VS2019, thinking the VS targets would be available in those pools, but no luck.
I also tried installing MSBuild.Microsoft.VisualStudio.Web.targets via NuGet, but end up with the same results.
What am I missing here?
“__built-in-schema.yml (Line: 2012, Col: 24): Expected a mapping” after V2-V3 pipeline converstion
According to the error log:
error MSB4019: The imported project "C:\Program
Files\dotnet\sdk\3.1.101\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets"
was not found
We could to know the Microsoft.WebApplication.targets invoked from dotnet SDK instead of MSBuild. The correct path for Microsoft.WebApplication.targets should be:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets
So, we need use MSBuild toolset instead of the dotnet toolset. And since it use the MSBuild 16.0, we need use the build agent pool Hosted Windows 2019 with VS2019 to build the project.
For the error Maximum object depth exceeded, it seems your yaml file has too deep file path, please try to shortening the file path to see if this resolves the issue.
If above info not help you, please share more info about you issue, like what is your project type, is python project? And share your build pipeline (yaml).
Hope this helps.

How to connect a database in Atom Editor?

I want to connect my database in atom and execute directly from the editor. How can I do that?
Install a package "data-atom" Reference. You can do it in two ways :
1.Through command line (windows) :
apm install data-atom
make sure you have ssl false, if not then type
apm config set strict-ssl false
before "apm install"
2.Open atom and go to settings and click on "+Install" and look for "data-atom" package.
Once you downloaded, restart atom and do "alt+shift+r" to open database window. Fill in the configuration and you are good to go.
Hope this helps
Install data-atom as recommended already by Sdembla. But beware, the recommended commands in the documentation for these packages do not work, until you first use "Edit connections", to create a connections file for it to work with.
Interestingly this also applied to the "data-ace" Atom package.
The exact steps (assuming you've installed the data-atom package, and restarted Atom) are...
click Packages > Data Atom > Edit connections
replace the generic file contents ("[ ]") with a connection config, like that shown in guzman's question here:
[
{
name: "WindowsAuthentication"
protocol: "sqlserver"
user: "username"
password: "password"
server: "apphost/Username"
database: "master"
options: ""
}
{
name: "SQLServerAuthentication"
protocol: "sqlserver"
user: "userlogin"
password: "password"
server: "apphost/sqlexpress"
database: "master"
options: ""
}
]
the other commands (eg ctrl-shift-R) should now work 😎
it's important you Save this connections file, otherwise the commands will stop working again.

install ioncube on windows server 2008 with plesk

I have a problem install ioncube on windows plesk control panel.
I used the thread-safe version of PHP and download Windows VC9 (x86) ioncube.
I Put the Loader files in C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext
I do Edit the file C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\php.ini and before any other zend_extension_ts lines ensure that the following is included:
zend_extension_ts = "C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\ioncube_loader_win_5.2.dll"
and Restart the IIS server software.
but not run ioncube. :(
Additional Information:
Loader is at: C:\Program Files
(x86)\Parallels\Plesk\Additional\PleskPHP5\ext\ioncube_loader_win_5.2.dll
Loader OS code: win
Loader architecture: x86
Loader word size: 32
Loader PHP version: 5.2
Loader thread safety: Yes
Loader compiler: VC6
Loader version: 4.0r7
File size is: 475136 bytes.
MD5 sum is: a82aa4dc4ce18ff62ea8faaca97a31be
Loader file: Download loader file
Loader found in ini file: Yes
OS extra security: None
PHPRC is: EMPTY
INI DIR is: EMPTY
Additional INI files: (none)
Server type is: LOCAL
PHP uname: Windows NT EASYSOFT 6.1 build 7600
Server word size is: 32
Disabled functions: EMPTY
Writeable loader locations: C:\inetpub\vhosts\E-touch.ir\httpdocs,
C:\inetpub\vhosts\E-touch.ir\cgi-bin
Find Solve
I do upgrade Plesk and running php in command line mode
php -c "C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\php.ini" -v
I using the cammand found Problem in php.ini.
When the problem was resolved. ioncube was Run. :D

Use Inno Setup just to launch MSI with no GUI of its own

I use Wix to create 2 installers for my application, one for x86 and one for x64. I want to use InnoSetup to create one setup.exe that will conditionally launch the appropriate .msi file. It's failry straightforward to get Inno to launch the appropriate .msi:
[Files]
Source: "App.x86.msi"; DestDir: "{tmp}"; Check: not Is64BitInstallMode
Source: "App.x64.msi"; DestDir: "{tmp}"; Check: Is64BitInstallMode
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\App.x86.msi"""; Description: "MyApp"; Check: not Is64BitInstallMode
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\App.x64.msi"""; Description: "MyApp"; Check: Is64BitInstallMode
But my problem is with the Inno GUI wizard. Namely, I don't want it. I want Inno to silently start, choose the .msi, launch it, and go away. No Inno-generated wizard. Is this possible? Is there a better tool to use to accomplish my end goal?
The InnoSetup FAQ details that since it could be abused it's not planned as a feature This example will have one dialog shown with the install button.
[Setup]
AppName=example
AppVersion=1
DefaultDirName=example
DisableStartupPrompt=Yes
DisableDirPage=Yes
DisableProgramGroupPage=Yes
DisableReadyPage=Yes
DisableFinishedPage=Yes
DisableWelcomePage=Yes
[Files]
Source: test.txt; DestDir: C:\;
[Run]
Filename: notepad.exe; Parameters: "C:\test.txt"; Description: MyApp;
If you have the files already uncompressed you could have an install.cmd file that called InnoSetup with the /silent command line parameter.
Or you could create an install.cmd that picks the correct OS based on the environment variable PROCESSOR_ARCHITECTURE.
IF %PROCESSOR_ARCHITECTURE%==x86 then (
notepad test.txt
) else (
notepad test2.txt
)

Unattended Install of SQL Server 2005 Express with LOCAL Server InstanceName

I'm creating an install package using InnoSetup and installing SQL Server 2005 Express. Here's the code below that appears in my RUN section:
Filename: "{app}\SQL Server 2005 Express\SQLEXPR.exe" ; Parameters: "-q /norebootchk /qn reboot=ReallySuppress addlocal=all INSTANCENAME=(LOCAL) SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Version:0 ERRORREPORTING=2 SQLAUTOSTART=1 SAPWD=passwordhere SECURITYMODE=SQL"; WorkingDir: {app}\SQL Server 2005 Express; StatusMsg: Installing Microsoft SQL Server 2005 Express... Please Wait...;Check:SQLVerifyInstall
What I'm trying to accomplish is have the SQL Server package install but only have the instance name itself reference the name of the machine name and nothing more. What I'm receiving instead is a named instance instead of local such as MachineName\SQLEXPRESS which is not what I want to receive.
I need a local instance instead of a named instance due to the way my code is written to be able to install and talk with the databases in question. I would change it, trust me, were it not the fact that this install package is a replacement to a previous package that used the MSDE installer. I have to be able to support both through code. Any suggestions are welcome but a clear and concise method to get the installer to quietly install using only the machine name is my main goal. Thanks for the help and support!
Here's a sample for setting the InstanceName in code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4D044938-6185-4729-8EB9-33CFA5D51993}
AppName=My Program
AppVerName=My Program 1.5
AppPublisher=My Company, Inc.
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputBaseFilename = setup
Compression = lzma
SolidCompression = yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "SQLEXPR.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Run]
Filename: "{app}\SQLEXPR.exe" ; Parameters: "INSTANCENAME={code:MyInstanceName|'SQLEXPRESS'}";
[Code]
function MyInstanceName(Param: String): String;
begin
//This sets the value to \MSSQLSERVER.
Result := ExpandConstant('{computername}') + '\MSSQLSERVER';
end;
However, from what I've seen on the net the instance name should be MSSQLSERVER if you want it to be the default instance on the machine.