Register DLL/OCX in InnoSetup - dll

I have a DLL and OCX pack then I've decided to make an installer.
This is what I have:
ArchitecturesInstallIn64BitMode=x64
[Files]
Source: {syswow64}\*; DestDir: {syswow64}; Flags: onlyifdoesntexist
Source: {sys}\*; DestDir: {sys}; Flags: onlyifdoesntexist
[Run]
Filename: regsvr32.exe; Parameters: """{sys}\zlib1.dll"" /S"; StatusMsg: Registrando: zlib1.dll; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\actskin4.ocx"" /S"; StatusMsg: Registrando: actskin4.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Bassmod.dll"" /S"; StatusMsg: Registrando: Bassmod.dll; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\ChamaleonButton.ocx"" /S"; StatusMsg: Registrando: ChamaleonButton.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Calendar.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.Calendar.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Codejock.TaskPanel.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.Codejock.TaskPanel.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.CommandBars.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.CommandBars.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Controls.Unicode.v13.2.1.ocx"" /S"; StatusMsg: Registrando: Codejock.Controls.Unicode.v13.2.1.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Controls.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.Controls.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.DockingPane.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.DockingPane.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Markup.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.Markup.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.PropertyGrid.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.PropertyGrid.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.ReportControl.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.ReportControl.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.ShortcutBar.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.ShortcutBar.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.SkinFramework.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.SkinFramework.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.SyntaxEdit.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.SyntaxEdit.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\HookMenu.ocx"" /S"; StatusMsg: Registrando: HookMenu.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\MSCOMCTL.OCX"" /S"; StatusMsg: Registrando: MSCOMCTL.OCX; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\MSCOMCTL32.OCX"" /S"; StatusMsg: Registrando: MSCOMCTL32.OCX; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Msvbvm50.dll"" /S"; StatusMsg: Registrando: Msvbvm50.dll; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\msvcr71.dll"" /S"; StatusMsg: Registrando: msvcr71.dll; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\zlib1.dll"" /S"; StatusMsg: Registrando: zlib1.dll; Flags: RunHidden WaitUntilTerminated
I've seen the regserver parametter but I'm not sure how it works (I've readed the parametter documentation), I need to know if I can simplify the things by doing only this without needing all the [RUN] section?:
[Files]
Source: {syswow64}\*; DestDir: {syswow64}; Flags: onlyifdoesntexist regserver
Source: {sys}\*; DestDir: {sys}; Flags: onlyifdoesntexist regserver
And also If I do that then I still need to specify the "ArchitecturesInstallIn64BitMode"? for the correct registration of the first x64 dll?
UPDATE:
Maybe this is a better equivalent of the [RUN] section:
[Files]
Source: {syswow64}\*; DestDir: {syswow64}; Flags: onlyifdoesntexist regserver 32bit
Source: {sys}\*; DestDir: {sys}; Flags: onlyifdoesntexist regserver 64bit

The more correct approach would be:
[Files]
Source: C:\yourdlls\x86\*; DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit
Source: C:\yourdlls\x64\*; DestDir: {sys}; Flags: onlyifdoesntexist regserver 64bit; Check: IsWin64
Note that I've changed the Source dir. That is because it is an amazingly bad idea to source files from your own Windows folder, and even worse to do so with wildcards. You're just asking for something that will completely destroy someone else's Windows installation if you attempt that.
(Also note that you should never install to {syswow64}, especially when using regserver. The lines above will have the same effect of installing into two separate folders but they will actually register things correctly, unlike what you had.)

It looks like some of the files you are trying to install are from Visual Basic 6. The Inno Setup Knowledge Base has/had a special page about how to correctly install VB6 DLLs and OCXs. As of the time of this writing the web page won't load, but you can easily find it in the Wayback machine at this link:
http://web.archive.org/web/20210516171924/https://jrsoftware.org/iskb.php?vb
Here's an excerpt from my own *.iss file showing how to install some DLLs and OCXs. Notice how the files are installed/registered differently in each section:
; begin VB6 system files
Source: "stdole2.tlb"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regtypelib
Source: "msvbvm60.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "oleaut32.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "olepro32.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "asycfilt.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile
Source: "comcat.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
; end VB6 system files
; OCX files the application uses (look at *.vbp file to see which ones are needed):
Source: "ComDlg32.OCX"; DestDir: "{sys}"; Flags: restartreplace sharedfile regserver
Source: "mscomctl.OCX"; DestDir: "{sys}"; Flags: restartreplace sharedfile regserver
; remaining application files:
Source: "..\RSSelect.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\RSSelect.dll"; DestDir: "{app}"; Flags: ignoreversion regserver 32bit
As a final note, a common issue online is "where to get" the VB6 required files. If you don't actually have VB6 installed on your PC, search online to try to find a software package that someone developed in VB6, and install it. You don't even have to run/use the software; just the mere process of installing puts the DLLs on your PC.

Related

couldn't query a file from azure blob storage (DBT)

here is the detail config for yml files
-- the profiles.yml config---
default: dbt_project
dbt_project:
target: dev
outputs:
dev:
type: synapse #synapse #type: Azuresynapse
driver: 'ODBC Driver 17 for SQL Server' # (The ODBC Driver installed on your system)
server: XXXXXXX
database: XXXXXXX
port: 1433
schema: XXXXXXX
#authentication: sqlpassword
user: XXXXXXX
password: XXXXXXX
azure_blob:
type: azure_blob
account_name: XXXXXXX
account_key: XXXXXXX
container: data-platform-archive #research-container/Bronze/Freedom/ABS_VESSEL/
prefix: abc/FGr1/fox/
--------------- dbt_project.yml-------------------------
name or the intended use of these models
name: 'dbt_project'
version: '1.0.0'
config-version: 2
This setting configures which "profile" dbt uses for this project.
profile: 'dbt_project'
m
odel-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target"
clean-targets:
- "target"
- "dbt_packages"
models:
dbt_project:
staging:
+materialized: table
utilities:
+materialized: view
azure_Blob:
staging:
+materialized: view
model
{{ config(
materialized='view',
connection='azure_blob'
) }}
select *
from {{ source('data-platform-archive/abc/FGr1/fox/', 'abc.parquet') }}
Compilation Error in model dbt_stg_DL_abs_acm_users
Model 'model.dbt_project.dbt_stg_DL_abs_acm_users' 'abc.parquet' which was not found

How to interpret #abc(01) in dynamic symbol name of an .so ELF formatted file?

I have two very similar .so files. Using readelf --syms --wide on them I receive...
... for the first:
631: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __cxa_guard_acquire#CXXABI_1.3 (18)
666: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __cxa_pure_virtual#CXXABI_1.3 (18)
... for the second:
671: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __cxa_guard_acquire#CXXABI_1.3 (21)
706: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __cxa_pure_virtual#CXXABI_1.3 (21)
What does the (18) and (21) mean, respectively?
What does the (18) and (21) mean, respectively?
It's the value of .vd_version from corresponding version definition (ElfXX_Verdef in elf.h). For example:
readelf -Ws /bin/date | egrep ' (setenv|clock_gettime)'
14: 0000000000000000 0 FUNC GLOBAL DEFAULT UND clock_gettime#GLIBC_2.17 (5)
15: 0000000000000000 0 FUNC GLOBAL DEFAULT UND setenv#GLIBC_2.2.5 (3)
readelf -V /bin/date
...
Version needs section '.gnu.version_r' contains 1 entry:
Addr: 0x0000000000000fd8 Offset: 0x000fd8 Link: 6 (.dynstr)
000000: Version: 1 File: libc.so.6 Cnt: 6
0x0010: Name: GLIBC_2.14 Flags: none Version: 7
0x0020: Name: GLIBC_2.4 Flags: none Version: 6
0x0030: Name: GLIBC_2.17 Flags: none Version: 5
0x0040: Name: GLIBC_2.3.4 Flags: none Version: 4
0x0050: Name: GLIBC_2.2.5 Flags: none Version: 3
0x0060: Name: GLIBC_2.3 Flags: none Version: 2
Note that GLIBC_2.2.5 has Version: 3 and GLIBC_2.17 has Version: 5.

Unable to deploy application on EC2 instance using AWS CloudFormation template through cfn-init and UserData script

I am trying to deploy sample.war application on EC2 instance at the time of launch. That is when an instance is launched the application should be deployed automatically on it using cfn-init and Metadata. I added a user with policy and authentication with no luck. If I wget with the S3 path, the file is being downloaded. Below is my script. What am I missing in this, or is there any other way to do this?
---
AWSTemplateFormatVersion: 2010-09-09
Description: Test QA Template
Resources:
MyInstance:
Type: AWS::EC2::Instance
Properties:
ImageId: !Ref AMIIdParam
InstanceType: !Ref InstanceType
Metadata:
AWS::CloudFormation::Init:
config:
packages:
yum:
java-1.8.0-openjdk.x86_64: []
tomcat: []
httpd.x86_64: []
services:
sysvinit:
httpd:
enabled: true
ensureRunning: true
files:
/usr/share/tomcat/webapps/sample.zip:
source: https://s3.amazonaws.com/mybucket/sample.zip
mode: '000500'
owner: tomcat
group: tomcat
authentication: S3AccessCreds
AWS::CloudFormation::Authentication:
S3AccessCreds:
type: 'S3'
accessKeyId: !Ref HostKeys
secretKey: Fn::GetAtt:
- HostKeys
- SecretAccessKey
buckets: !Ref BucketName
CfnUser:
Type: AWS::IAM::User
Properties:
Path: '/'
Policies:
- PolicyName: 'S3Access'
PolicyDocument:
Statement:
- Effect: 'Allow'
Action: s3:*
Resource: '*'
HostKeys:
Type: AWS::IAM::AccessKey
Properties:
UserName: !Ref CfnUser
I was unable to reproduce this using the following template:
---
AWSTemplateFormatVersion: 2010-09-09
Description: Test QA Template
Resources:
MyInstance:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-08589eca6dcc9b39c
InstanceType: t2.micro
KeyName: default
UserData:
Fn::Base64: !Sub |
#!/bin/bash -xe
/opt/aws/bin/cfn-init -s ${AWS::StackId} --resource MyInstance --region ${AWS::Region}
Metadata:
AWS::CloudFormation::Init:
config:
packages:
yum:
java-1.8.0-openjdk.x86_64: []
tomcat: []
httpd.x86_64: []
services:
sysvinit:
httpd:
enabled: true
ensureRunning: true
files:
/usr/share/tomcat/webapps/sample.zip:
source: https://s3.amazonaws.com/mybucket/sample.zip
mode: '000500'
owner: tomcat
group: tomcat
(In other words, use of the above template allowed me to install a sample.zip file using cfn-init.)
Thus there is something permissions-related in the way you're accessing the S3 bucket.
Suffice to say it is a bad practice to use Access Keys. Have a look at this document on best practices of assigning an IAM Role to an EC2 instance and then adding a Bucket Policy that grants appropriate access to that Role.

Unrecognized field with Symfony 3.4 and flex

I just started a new Symfony 3.4 project with Flex.
I followed the official documentation of FOSOAuthBundle but when I want to create a token /oauth/v2/token I have this error:" Unrecognized field: randomId "
Here are my configuration files:
#config/packages/fos_oauth_server.yaml
fos_oauth_server:
db_driver: orm
client_class: App\Entity\Client
access_token_class: App\Entity\AccessToken
refresh_token_class: App\Entity\RefreshToken
auth_code_class: App\Entity\AuthCode
service:
user_provider: fos_user.user_provider.username
options:
supported_scopes: user
#config/packages/security.yaml
security:
providers:
user_provider:
id: fos_user.user_provider.username
firewalls:
oauth_token:
pattern: ^/oauth/v2/token
security: false
oauth_authorize:
pattern: ^/oauth/v2/auth
security: false
# Add your favorite authentication process here
main:
pattern: ^/
fos_oauth: true
stateless: true
anonymous: false # can be omitted as its default value
access_control:
- { path: ^/, roles: [ IS_AUTHENTICATED_FULLY ] }
#config/packages/doctrine.yaml
parameters:
env(DATABASE_URL): ''
doctrine:
dbal:
# configure these for your database server
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
# With Symfony 3.3, remove the `resolve:` prefix
url: '%env(resolve:DATABASE_URL)%'
orm:
auto_generate_proxy_classes: '%kernel.debug%'
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
Do you have an idea?

Inno setup cannot launch exe

I have created windows vb application running on 32bit machine and packaged through Inno Setup Compiler 5.4.2. Once i install the application in the machine successfully, it doesn't launch the application and log file shows all dependencies are installed successfully.
Can anyone help me to sort out this issue?
Please go through the Inno script
[Setup]
AppId={{32558ED7-C211-4AB1-9D3F-9F36F214531E}
AppName=MyApplication
AppVerName=MyApplication
DefaultDirName={pf}\MyApplication
DefaultGroupName=MyApplication
LicenseFile=F:\README.TXT
OutputDir=F:\setUp
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: "MyApp4.0.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "XXX.DLL"; DestDir: "{app}\components"; Flags: ignoreversion
Source: "App.ocx"; DestDir: "{app}\components"; Flags: regserver restartreplace sharedfile
Source: "MSCOMCTL.OCX"; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: "ui.swf"; DestDir: "{app}\ui\"; Flags: ignoreversion
[Icons]
Name: "{group}\MyApplication"; Filename: "{app}\MyApp4.0.exe"
Name: "{commondesktop}\MyApplication"; Filename: "{app}\MyApp4.0.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\MyApp4.0.exe"; Description: "{cm:LaunchProgram,MyApplication}";
Change your [Run] section to the following:
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Where #MyAppExeName is the name of your .exe file.