"IUnderstandSomething" <hke1972@xxxxxx> schrieb im Newsbeitrag
news:64b97b9a-2a4c-4fee-9bcd-3e8beb86ff59@xxxxxx
> Almost there 
>
> I used what you said and read up on a lot of other stuff to and ended
> up with this VBS-file:
>
> Const sName="Class2"
> Dim objNet, objShell, strComputerName
> Set objNet = CreateObject("WScript.NetWork")
> strComputerName = objNet.ComputerName
> if sName <> strComputerName then
> set objShell = wscript.createObject("wscript.shell")
> strTmp = "netsh interface ip set address name 'Local Area Connection'
> static 192.168.10.22 255.255.255.0 192.168.10.1"
> objshell.run strTmp,1,true
> strTmp = "netsh int ip set dns 'Local Area Connection' dns 'Local
> Area Connection' static 62.65.30.10"
> objshell.run strTmp,1,true
> strTmp = "B:\newSid.exe /a " & sName
> objshell.run strTmp,1,true
> Set objNet = Nothing
> end if
>
> ??
> I am, as you probably can see, trying to test if the computername is
> as expected. If not to set IP etc. and DNS. Where I have been guessing
> now is at the quates. Because netsh has Local Area Connection in " ,
> but since I am running it with a shell I thought to change them with
> ' , but it does not work.
>
> Ideas??
>
> Thank you! For the quote problem you can try this :
strTmp = "netsh interface ip set address name " & chr(34) & "Local Area
Connection" & chr(34)
chr(34) stands for " - and I think if you build the string programtically
it maybe works
hth