cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
charithas
Level 2

Services installed through Installeshield does not have the correct log on user name

Hi All,

We use Installeshied (Installshield 2020 R3 SP1) to create an installer for our desktop product.

This installer contains C#.NET services which we installed in the client machine(Windows Server 2019) along with the other executables.

The log-on account and password for the services are taken through the SdLogonUserInformation dialog and set into IS_NET_API_LOGON_USERNAME and IS_NET_API_LOGON_PASSWORD variables.

The services were originally written targeting for .NET framework 2.0 and compiled using a Perl script. All worked fine at this point.

Original Build Script for .NET 2.0

my $DEV_ENV_EXE = "\"$DEVENV_APP_PATH\\devenv.exe\"";
  
#$SYSRET = system "msdev \"$PROJECT_DIR\\$PROJECT_NAME.$PROJECT_EXT\" /MAKE \"$PROJECT_CONFIG\" $BUILD_TYPE /OUT \"$LOG_PATH\\$PROJECT_NAME.log\"";
$SYSRET = system "$DEV_ENV_EXE \"$PROJECT_DIR\\$PROJECT_NAME.$PROJECT_EXT\" $BUILD_TYPE \"$PROJECT_CONFIG\" /OUT \"$LOG_PATH\\$PROJECT_NAME.log\"";


But we recently upgraded the services to target .NET framework 4.0. And we changed the build script also to use MSBuild instead of Visual Studio exe.

Build Script for .NET 4.0

my $MS_BUILD_DOTNET_48_EXE = "\"$MS_BUILD_DOTNET_48_PATH\\MSBuild.exe\"";

my $msbuild_command = "$MS_BUILD_DOTNET_48_EXE \"$PROJECT_DIR\\$PROJECT_NAME.$PROJECT_EXT\" /t:$BUILD_TYPE /p:Configuration=$PROJECT_CONFIG > nul 2> \"$LOG_PATH\\$PROJECT_NAME.log\"";

The installer is also shipped with .NET 4.8 as a prerequisite.

Now when we install the product we can see that the log-on name in the service was not correctly set.

User name provided in the installer dialog -  MachineName\UserName
User Name configured in the Service            -  .\\UserName

Previously in the working scenario, this was set to .\UserName and it is the correct user name that should be set.
Could someone help me to understand what is happening here and probably how to fix this?

Labels (1)
0 Kudos
(0) Replies