Can Windows Service Startup Type and Service Account Name be specified as the (string) value of a variable in...












0















We have a situation where a given Windows service's StartupType and Service Account Name can depend on the Environment, or Role, or Target in various cases.



FIRST ISSUE: STARTUP TYPE

For example, the Startup Type should "Automatic (delayed)" on one of our Prod App servers, but "Manual" on the other server.

So, I thought that I would create a Project variable for this. For the first value of the variable I entered its value as the text "Automatic (delayed)" and gave it a Scope of the Target "PRDAPPSVR01" (which is a Target we have defined).
For the second value of the variable I entered its value as the text "Manual" and gave it a Scope of the Target "PRDAPPSVR02" (which is a Target we have defined).
I know that the Windows Service Template Process Step has a dropdown for "Start Mode" which includes these values: Automatic, Automatic (delayed), Manual, Disabled, Unchanged.
My basic question is: Will my variable values, WHICH ARE STRING VALUES, be seen by Octopus as valid values? In other words, are the values in Octopus's "Start Mode" dropdown ALSO string values? My fear is that the values in Octopus's dropdown are some sort of object that doesn't exactly compare with a string value; in which case, Octopus might reject my values.



SECOND ISSUE: SERVICE ACCOUNT

Basically, the same issue: If I have a Project variable for the Service Account Name that I want to have different values for different deployments (eg, "Local Service" for non-Prod and one of my organization's user accounts for Prod),
can I give the variable the (STRING) value of "Local Service" and expect that Octopus will see it as a valid value? As with Start Mode, Octopus provides a dropdown for "Service Account" which includes the option of Local Service, so I'm wondering the same thing as with Start Mode: Can my STRING value of "Local Service" be seen by Octopus as corresponding to its dropdown value of Local Service?










share|improve this question


















  • 1





    Please can you specify which type of step you are using, otherwise this question is worthless. Octopus is pretty dynamic: Have you tried it yourself? You could probably try it yourself faster than you will get an answer.

    – Richardissimo
    Dec 7 '18 at 7:01
















0















We have a situation where a given Windows service's StartupType and Service Account Name can depend on the Environment, or Role, or Target in various cases.



FIRST ISSUE: STARTUP TYPE

For example, the Startup Type should "Automatic (delayed)" on one of our Prod App servers, but "Manual" on the other server.

So, I thought that I would create a Project variable for this. For the first value of the variable I entered its value as the text "Automatic (delayed)" and gave it a Scope of the Target "PRDAPPSVR01" (which is a Target we have defined).
For the second value of the variable I entered its value as the text "Manual" and gave it a Scope of the Target "PRDAPPSVR02" (which is a Target we have defined).
I know that the Windows Service Template Process Step has a dropdown for "Start Mode" which includes these values: Automatic, Automatic (delayed), Manual, Disabled, Unchanged.
My basic question is: Will my variable values, WHICH ARE STRING VALUES, be seen by Octopus as valid values? In other words, are the values in Octopus's "Start Mode" dropdown ALSO string values? My fear is that the values in Octopus's dropdown are some sort of object that doesn't exactly compare with a string value; in which case, Octopus might reject my values.



SECOND ISSUE: SERVICE ACCOUNT

Basically, the same issue: If I have a Project variable for the Service Account Name that I want to have different values for different deployments (eg, "Local Service" for non-Prod and one of my organization's user accounts for Prod),
can I give the variable the (STRING) value of "Local Service" and expect that Octopus will see it as a valid value? As with Start Mode, Octopus provides a dropdown for "Service Account" which includes the option of Local Service, so I'm wondering the same thing as with Start Mode: Can my STRING value of "Local Service" be seen by Octopus as corresponding to its dropdown value of Local Service?










share|improve this question


















  • 1





    Please can you specify which type of step you are using, otherwise this question is worthless. Octopus is pretty dynamic: Have you tried it yourself? You could probably try it yourself faster than you will get an answer.

    – Richardissimo
    Dec 7 '18 at 7:01














0












0








0








We have a situation where a given Windows service's StartupType and Service Account Name can depend on the Environment, or Role, or Target in various cases.



FIRST ISSUE: STARTUP TYPE

For example, the Startup Type should "Automatic (delayed)" on one of our Prod App servers, but "Manual" on the other server.

So, I thought that I would create a Project variable for this. For the first value of the variable I entered its value as the text "Automatic (delayed)" and gave it a Scope of the Target "PRDAPPSVR01" (which is a Target we have defined).
For the second value of the variable I entered its value as the text "Manual" and gave it a Scope of the Target "PRDAPPSVR02" (which is a Target we have defined).
I know that the Windows Service Template Process Step has a dropdown for "Start Mode" which includes these values: Automatic, Automatic (delayed), Manual, Disabled, Unchanged.
My basic question is: Will my variable values, WHICH ARE STRING VALUES, be seen by Octopus as valid values? In other words, are the values in Octopus's "Start Mode" dropdown ALSO string values? My fear is that the values in Octopus's dropdown are some sort of object that doesn't exactly compare with a string value; in which case, Octopus might reject my values.



SECOND ISSUE: SERVICE ACCOUNT

Basically, the same issue: If I have a Project variable for the Service Account Name that I want to have different values for different deployments (eg, "Local Service" for non-Prod and one of my organization's user accounts for Prod),
can I give the variable the (STRING) value of "Local Service" and expect that Octopus will see it as a valid value? As with Start Mode, Octopus provides a dropdown for "Service Account" which includes the option of Local Service, so I'm wondering the same thing as with Start Mode: Can my STRING value of "Local Service" be seen by Octopus as corresponding to its dropdown value of Local Service?










share|improve this question














We have a situation where a given Windows service's StartupType and Service Account Name can depend on the Environment, or Role, or Target in various cases.



FIRST ISSUE: STARTUP TYPE

For example, the Startup Type should "Automatic (delayed)" on one of our Prod App servers, but "Manual" on the other server.

So, I thought that I would create a Project variable for this. For the first value of the variable I entered its value as the text "Automatic (delayed)" and gave it a Scope of the Target "PRDAPPSVR01" (which is a Target we have defined).
For the second value of the variable I entered its value as the text "Manual" and gave it a Scope of the Target "PRDAPPSVR02" (which is a Target we have defined).
I know that the Windows Service Template Process Step has a dropdown for "Start Mode" which includes these values: Automatic, Automatic (delayed), Manual, Disabled, Unchanged.
My basic question is: Will my variable values, WHICH ARE STRING VALUES, be seen by Octopus as valid values? In other words, are the values in Octopus's "Start Mode" dropdown ALSO string values? My fear is that the values in Octopus's dropdown are some sort of object that doesn't exactly compare with a string value; in which case, Octopus might reject my values.



SECOND ISSUE: SERVICE ACCOUNT

Basically, the same issue: If I have a Project variable for the Service Account Name that I want to have different values for different deployments (eg, "Local Service" for non-Prod and one of my organization's user accounts for Prod),
can I give the variable the (STRING) value of "Local Service" and expect that Octopus will see it as a valid value? As with Start Mode, Octopus provides a dropdown for "Service Account" which includes the option of Local Service, so I'm wondering the same thing as with Start Mode: Can my STRING value of "Local Service" be seen by Octopus as corresponding to its dropdown value of Local Service?







octopus-deploy






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 25 '18 at 19:38









user3390380user3390380

63




63








  • 1





    Please can you specify which type of step you are using, otherwise this question is worthless. Octopus is pretty dynamic: Have you tried it yourself? You could probably try it yourself faster than you will get an answer.

    – Richardissimo
    Dec 7 '18 at 7:01














  • 1





    Please can you specify which type of step you are using, otherwise this question is worthless. Octopus is pretty dynamic: Have you tried it yourself? You could probably try it yourself faster than you will get an answer.

    – Richardissimo
    Dec 7 '18 at 7:01








1




1





Please can you specify which type of step you are using, otherwise this question is worthless. Octopus is pretty dynamic: Have you tried it yourself? You could probably try it yourself faster than you will get an answer.

– Richardissimo
Dec 7 '18 at 7:01





Please can you specify which type of step you are using, otherwise this question is worthless. Octopus is pretty dynamic: Have you tried it yourself? You could probably try it yourself faster than you will get an answer.

– Richardissimo
Dec 7 '18 at 7:01












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53471148%2fcan-windows-service-startup-type-and-service-account-name-be-specified-as-the-s%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53471148%2fcan-windows-service-startup-type-and-service-account-name-be-specified-as-the-s%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)