How to create a service with WMIC?











up vote
1
down vote

favorite












I wrote a service program with WinAPI functions with c++ And I want to create that by wmic.exe in service manager with bellow command :



service create name="test" where path = "C:UsersmsiDesktopSampleService.exe"


But it give me the error :




Invalid format.
Hint: <assignlist> = <propertyname>=<propertyvalue> [, <assignlist>].



How can i create a service with wmic.exe tool?










share|improve this question






















  • why not use sc.exe from normal commandline? is wmic requirement?
    – Drako
    1 hour ago










  • @Drako I know sc.exe but i have to use of wmic.
    – Mohammadreza Panahi
    1 hour ago















up vote
1
down vote

favorite












I wrote a service program with WinAPI functions with c++ And I want to create that by wmic.exe in service manager with bellow command :



service create name="test" where path = "C:UsersmsiDesktopSampleService.exe"


But it give me the error :




Invalid format.
Hint: <assignlist> = <propertyname>=<propertyvalue> [, <assignlist>].



How can i create a service with wmic.exe tool?










share|improve this question






















  • why not use sc.exe from normal commandline? is wmic requirement?
    – Drako
    1 hour ago










  • @Drako I know sc.exe but i have to use of wmic.
    – Mohammadreza Panahi
    1 hour ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I wrote a service program with WinAPI functions with c++ And I want to create that by wmic.exe in service manager with bellow command :



service create name="test" where path = "C:UsersmsiDesktopSampleService.exe"


But it give me the error :




Invalid format.
Hint: <assignlist> = <propertyname>=<propertyvalue> [, <assignlist>].



How can i create a service with wmic.exe tool?










share|improve this question













I wrote a service program with WinAPI functions with c++ And I want to create that by wmic.exe in service manager with bellow command :



service create name="test" where path = "C:UsersmsiDesktopSampleService.exe"


But it give me the error :




Invalid format.
Hint: <assignlist> = <propertyname>=<propertyvalue> [, <assignlist>].



How can i create a service with wmic.exe tool?







services wmic






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









Mohammadreza Panahi

1157




1157












  • why not use sc.exe from normal commandline? is wmic requirement?
    – Drako
    1 hour ago










  • @Drako I know sc.exe but i have to use of wmic.
    – Mohammadreza Panahi
    1 hour ago


















  • why not use sc.exe from normal commandline? is wmic requirement?
    – Drako
    1 hour ago










  • @Drako I know sc.exe but i have to use of wmic.
    – Mohammadreza Panahi
    1 hour ago
















why not use sc.exe from normal commandline? is wmic requirement?
– Drako
1 hour ago




why not use sc.exe from normal commandline? is wmic requirement?
– Drako
1 hour ago












@Drako I know sc.exe but i have to use of wmic.
– Mohammadreza Panahi
1 hour ago




@Drako I know sc.exe but i have to use of wmic.
– Mohammadreza Panahi
1 hour ago















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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',
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%2fsuperuser.com%2fquestions%2f1374968%2fhow-to-create-a-service-with-wmic%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1374968%2fhow-to-create-a-service-with-wmic%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Terni

A new problem with tex4ht and tikz

Sun Ra