Click here to Skip to main content
15,909,205 members
Home / Discussions / C#
   

C#

 
AnswerRe: winform Deployment Pin
OriginalGriff9-Mar-11 22:08
mveOriginalGriff9-Mar-11 22:08 
GeneralRe: winform Deployment Pin
arkiboys9-Mar-11 22:10
arkiboys9-Mar-11 22:10 
AnswerRe: winform Deployment Pin
Pete O'Hanlon7-Mar-11 10:50
mvePete O'Hanlon7-Mar-11 10:50 
GeneralRe: winform Deployment Pin
arkiboys7-Mar-11 10:57
arkiboys7-Mar-11 10:57 
GeneralRe: winform Deployment Pin
GenJerDan7-Mar-11 12:16
GenJerDan7-Mar-11 12:16 
AnswerRe: winform Deployment Pin
RaviRanjanKr9-Mar-11 17:27
professionalRaviRanjanKr9-Mar-11 17:27 
QuestionStore data in Attribute for use in PropertyGrid Pin
lukeer7-Mar-11 1:22
lukeer7-Mar-11 1:22 
QuestionSCCM OS Deployment with native C# code Pin
UK19676-Mar-11 21:15
UK19676-Mar-11 21:15 
I've received a project to replace an old (ASP based) OS Deployment protal with a new one - based on ASP.NET using C#.

Code example:
Function GetResourceIDbyMac(server, mac) 
    Dim counter:counter = 0

    Log ""
    Log "WMI Machine Check "
		
    On Error Resume Next

    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
    Set objSWbemServices = objSWbemLocator.ConnectServer(server, "\Root\SMS\site_EMEA, username, password)
    objSWbemServices.Security_.ImpersonationLevel = 3

    Set colSwbemObjectSet = objSWbemServices.ExecQuery("Select distinct ResourceID from SMS_G_System_NETWORK_ADAPTER where MACAddress = '" & mac & "'")
    For Each objProcess in colSWbemObjectSet
        log "Record found with Resource ID " & objProcess.ResourceID 
        counter = counter + 1
    Next

    If err.number <> 0 Then
        Log "F:GetResourceID: " & ex.Message
    Else
        If counter = 0 Then 
	    GetResourceIDbyMac = -1
	Else
	    GetResourceIDbyMac = 0
	End If
    End if
End Function


I've searched the web and the SCCM SDK but currently I'm unable to understand where and how i should start with this.

Could someone tell me how i can (should) connect to SCCM and get or set data there. A native C# translation of the code lines listed above would be really helpful.

Thanks in advance,
Uwe
(Germany)
AnswerRe: SCCM OS Deployment with native C# code Pin
OriginalGriff7-Mar-11 0:46
mveOriginalGriff7-Mar-11 0:46 
GeneralRe: SCCM OS Deployment with native C# code Pin
UK19677-Mar-11 1:12
UK19677-Mar-11 1:12 
Questionerror with Button in datagridview Pin
dits056-Mar-11 18:57
dits056-Mar-11 18:57 
AnswerRe: error with Button in datagridview Pin
nainakarri7-Mar-11 0:06
nainakarri7-Mar-11 0:06 
AnswerRe: error with Button in datagridview Pin
Pravin Patil, Mumbai7-Mar-11 0:27
Pravin Patil, Mumbai7-Mar-11 0:27 
AnswerRe: error with Button in datagridview Pin
OriginalGriff7-Mar-11 0:38
mveOriginalGriff7-Mar-11 0:38 
QuestionWhat do programmers think about "Fluent Interface's" ? Pin
venomation6-Mar-11 16:14
venomation6-Mar-11 16:14 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
Super Lloyd6-Mar-11 16:42
Super Lloyd6-Mar-11 16:42 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation6-Mar-11 17:10
venomation6-Mar-11 17:10 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
Pete O'Hanlon6-Mar-11 19:46
mvePete O'Hanlon6-Mar-11 19:46 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation6-Mar-11 21:32
venomation6-Mar-11 21:32 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
Eddy Vluggen6-Mar-11 20:51
professionalEddy Vluggen6-Mar-11 20:51 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation6-Mar-11 21:34
venomation6-Mar-11 21:34 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
Eddy Vluggen7-Mar-11 0:12
professionalEddy Vluggen7-Mar-11 0:12 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
venomation7-Mar-11 6:00
venomation7-Mar-11 6:00 
GeneralRe: What do programmers think about "Fluent Interface's" ? Pin
Eddy Vluggen7-Mar-11 8:14
professionalEddy Vluggen7-Mar-11 8:14 
AnswerRe: What do programmers think about "Fluent Interface's" ? Pin
jschell7-Mar-11 8:51
jschell7-Mar-11 8:51 

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.