Click here to Skip to main content
15,850,103 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C language exercise - beginner Pin
Bram van Kampen15-Oct-21 14:29
Bram van Kampen15-Oct-21 14:29 
Questiondata structure Pin
User 153459235-Oct-21 16:05
User 153459235-Oct-21 16:05 
AnswerRe: data structure PinPopular
Dave Kreskowiak5-Oct-21 18:11
mveDave Kreskowiak5-Oct-21 18:11 
AnswerRe: data structure Pin
Maximilien6-Oct-21 13:44
Maximilien6-Oct-21 13:44 
AnswerRe: data structure Pin
Bram van Kampen15-Oct-21 13:50
Bram van Kampen15-Oct-21 13:50 
QuestionRun powershell in C# Pin
jwradhe23-Sep-21 1:43
jwradhe23-Sep-21 1:43 
AnswerRe: Run powershell in C# Pin
Richard MacCutchan23-Sep-21 1:49
mveRichard MacCutchan23-Sep-21 1:49 
AnswerRe: Run powershell in C# Pin
Richard Deeming23-Sep-21 2:14
mveRichard Deeming23-Sep-21 2:14 
As the other Richard said, you've posted this in the wrong forum.

But you don't need to invoke Powershell in order to create and use a COM object. You can do that directly from C#:
C#
Type t = Type.GetTypeFromProgID("Microsoft.Update.AutoUpdate");
dynamic a = Activator.CreateInstance(t);
DateTime lastSuccessfulUpdate = a.Results.LastInstallationSuccessDate;
text_LastWinUpd.Text = lastSuccessfulUpdate.ToString();




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Run powershell in C# Pin
jwradhe23-Sep-21 2:48
jwradhe23-Sep-21 2:48 
GeneralRe: Run powershell in C# Pin
Richard Deeming23-Sep-21 3:43
mveRichard Deeming23-Sep-21 3:43 
GeneralRe: Run powershell in C# Pin
jwradhe23-Sep-21 3:49
jwradhe23-Sep-21 3:49 
GeneralRe: Run powershell in C# Pin
Richard Deeming23-Sep-21 4:21
mveRichard Deeming23-Sep-21 4:21 
GeneralRe: Run powershell in C# Pin
Dave Kreskowiak23-Sep-21 4:29
mveDave Kreskowiak23-Sep-21 4:29 
QuestionExample C code to use API "GetProcessIoCounters" Pin
Narasimha Moorthy20-Sep-21 2:01
Narasimha Moorthy20-Sep-21 2:01 
AnswerRe: Example C code to use API "GetProcessIoCounters" Pin
Richard MacCutchan20-Sep-21 2:11
mveRichard MacCutchan20-Sep-21 2:11 
GeneralRe: Example C code to use API "GetProcessIoCounters" Pin
Narasimha Moorthy20-Sep-21 20:14
Narasimha Moorthy20-Sep-21 20:14 
GeneralRe: Example C code to use API "GetProcessIoCounters" Pin
Richard MacCutchan20-Sep-21 22:19
mveRichard MacCutchan20-Sep-21 22:19 
GeneralRe: Example C code to use API "GetProcessIoCounters" Pin
Victor Nijegorodov20-Sep-21 22:21
Victor Nijegorodov20-Sep-21 22:21 
QuestionConnect to bluetooth service watch and read HR data Pin
Wim Van den Borre20-Sep-21 0:18
Wim Van den Borre20-Sep-21 0:18 
AnswerRe: Connect to bluetooth service watch and read HR data Pin
Richard MacCutchan20-Sep-21 0:20
mveRichard MacCutchan20-Sep-21 0:20 
GeneralRe: Connect to bluetooth service watch and read HR data Pin
Wim Van den Borre20-Sep-21 2:01
Wim Van den Borre20-Sep-21 2:01 
GeneralRe: Connect to bluetooth service watch and read HR data Pin
Richard MacCutchan20-Sep-21 2:09
mveRichard MacCutchan20-Sep-21 2:09 
GeneralRe: Connect to bluetooth service watch and read HR data Pin
Wim Van den Borre20-Sep-21 6:56
Wim Van den Borre20-Sep-21 6:56 
GeneralRe: Connect to bluetooth service watch and read HR data Pin
Richard MacCutchan20-Sep-21 6:58
mveRichard MacCutchan20-Sep-21 6:58 
GeneralRe: Connect to bluetooth service watch and read HR data Pin
Wim Van den Borre20-Sep-21 7:03
Wim Van den Borre20-Sep-21 7:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.