Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7554561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:22:06+00:00 2026-05-30T11:22:06+00:00

I have an InstallShield project that invokes an EXE written in C#, passing it

  • 0

I have an InstallShield project that invokes an EXE written in C#, passing it some parameters, like so:

MyProcess.exe [serverName] [dbName]

Internally, this process opens a SQL connection, using the following connection string:

Data Source=[serverName];Initial Catalog=[dbName];Integrated Security=True

where [serverName] and [dbName] are the values passed in from the command line.

When I run MyProcess.exe directly from my own command line, passing serverName=localhost and dbName=myDB, it works perfectly. But when I invoke this exe from my InstallShield script with the same parameters, I get an error:

Cannot open database “myDB” requested by the login. The login failed.
Login failed for user ‘MYDOMAIN\myusername’.

But MYDOMAIN\myusername is a freakin’ admin on the local database! I’ve even put a log line in MyProcess.exe to verify that the connection string is, in fact:

Data Source=localhost;Initial Catalog=myDB;Integrated Security=True

So the big mystery is: why does it work when I run the command line directly, but not when the same command line is run from InstallShield (run by the same Windows user)? And how to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:22:07+00:00Added an answer on May 30, 2026 at 11:22 am

    OK, I’ve worked it out.

    The previous step in the installation was to do a restart of the SQL Server service. We never noticed a problem before, because the databases we were working on before were relatively small – but now the database I’m upgrading using this InstallShield script is a Big Mama of around 20GB.

    So – it seems that when restarting a SQL Server, larger databases take a longer time to come back online. This also explains why MyProcess.exe ran perfectly with the same parameters later – because by then the DB was back online!

    Solution: in the try-catch of the connection to the DB, let it try again (up to n times) after a Thread.Sleep().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an InstallScript project written from scratch in InstallShield 2010. It contains, amongst
I have an Installshield 2010 Basic MSI. It installs a windows exe that runs
Using Installshield 2010 with a Basic MSI project. I have several config files that
I have this installation file setup.exe that was created with installShield wizard. as part
I'm using InstallShield 2010 Premiere. I have a basic MSI project that install an
I have an InstallShield MSI project. When I pass an MSIHANDLE from an InstallScript
I have a problem concerning folder structure of a built InstallShield suite project. I
My InstallShield 2009 basic MSI project installs pretty slowly. We have a 65MB .msi
I have an InstallScript project in IS2010. It has a handful of services that
Is it possible to build msi file using installshield, so that I have one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.