GreenMachine Posted September 21, 2004 Share Posted September 21, 2004 Sorry , no ... USERFILESCD is the same as FILESCD, if just allows the user to point to it. I would just make a switchless self extractor that copies the files to System32. IEXPRESS and a Command Script would work. That could run from SVCPACK.INF (SVC-EXE would get it there.) Link to comment Share on other sites More sharing options...
RogueSpear Posted September 21, 2004 Author Share Posted September 21, 2004 Doesn't work in Windows XP Professional SP2: No Network Icon is displayed, and the box is still unchecked in Network Properties. It was a nice thought, anyway ...What's this? Vindication? Anyway something I forgot is that you need to specify REG_SZ as a constant equal to 1 if you decide to use the subroutine. Link to comment Share on other sites More sharing options...
Sanjay Posted October 11, 2004 Share Posted October 11, 2004 I am a little confused here. Does big poppa pump's winnt.sif method work or not?[Homenet]ShowTrayIcon = Yes If the above does nto work, then what is the simplest method to make the 'Network Tray Icon' appear in unattended install? Link to comment Share on other sites More sharing options...
a06lp Posted October 11, 2004 Share Posted October 11, 2004 try this:http://www.msfn.org/board/index.php?showtopic=23271&hl= Link to comment Share on other sites More sharing options...
Sanjay Posted October 11, 2004 Share Posted October 11, 2004 @a06lpThanks. Link to comment Share on other sites More sharing options...
RogueSpear Posted October 12, 2004 Author Share Posted October 12, 2004 Just made a little improvement in case there is an interest. I made a subroutine to disable NetBIOS from all network interfaces. The inspiration here is a Sierra Wireless AirCard 555. When you install this card it creates two DUN entries and a NIC adapter with NetBIOS getting it's setting from DHCP. So even if you disable NetBIOS in your WINNT.SIF file, once you install this adapter (or the Cisco VPN client by the way), NetBIOS can still run if DHCP calls for it. Personally I like to ensure that NetBIOS is never enabled. It's a bandwidth waster and a huge security hole. I have noticed better throughput VPNing with the AirCard if NetBIOS is totally shutdown.For the tray icon subroutine, I added the ability to specify the DNS suffix to the interface "Local Area Connection". Not entirely necessary, but a nice feature when working in the enterprise.Option ExplicitConst HKLM = &H80000002Const REG_SZ = 1Const REG_DWORD = 4Dim strComputerstrComputer="."'**********************************************************************'** Subroutine; Disable NetBIOS from all interfaces **'**********************************************************************Sub NetBTDisable Dim objReg, strKeyPath, strNBTOptions, dwNBTOptions, arrSubKeys, SubKey, FullKey, arrEntryNames, arrValueTypes, i, dwValue Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces" strNBTOptions = "NetbiosOptions" dwNBTOptions = 2 objReg.EnumKey HKLM, strKeyPath, arrSubKeys For Each SubKey In arrSubKeys FullKey = strKeyPath & "\" & SubKey objReg.EnumValues HKLM, FullKey, arrEntryNames, arrValueTypes For i=0 To UBound(arrEntryNames) Select Case arrValueTypes(i) Case REG_DWORD objReg.GetDWORDValue HKLM, FullKey, arrEntryNames(i),dwValue If arrEntryNames(i) = strNBTOptions Then objReg.SetDWORDValue HKLM, FullKey, strNBTOptions, dwNBTOptions End Select Next NextEnd Sub'**********************************************************************'** Subroutine; Show the tray icon for "Local Area Connection" **'**********************************************************************Sub ShowNetTrayIcon Dim objReg, strKeyPath, strKeyPath2, strShowIcon, dwShowIcon, strDomainKey, strDomain, arrSubKeys Dim SubKey, FullKey, FullKey2, arrEntryNames, arrValueTypes, i, strValue Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}" strKeyPath2 = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" strShowIcon = "ShowIcon" strDomainKey = "Domain" strDomain = "MyDomain.Local" dwShowIcon = 1 objReg.EnumKey HKLM, strKeyPath, arrSubKeys For Each SubKey In arrSubKeys If SubKey <> "Descriptions" Then FullKey = strKeyPath & "\" & SubKey & "\Connection\" FullKey2 = strKeyPath2 & "\" & SubKey objReg.EnumValues HKLM, FullKey, arrEntryNames, arrValueTypes For i=0 To UBound(arrEntryNames) Select Case arrValueTypes(i) Case REG_SZ objReg.GetStringValue HKLM, FullKey, arrEntryNames(i),strValue If strValue = "Local Area Connection" Then objReg.SetDWORDValue HKLM, FullKey, strShowIcon, dwShowIcon objReg.SetStringValue HKLM, FullKey2, strDomainKey, strDomain End If End Select Next End If NextEnd Sub'**********************************************************************'** Run tasks **'**********************************************************************NetBTDisableShowNetTrayIconDon't forget to change the strDomain = "MyDomain.Local" to whatever your domain is. Link to comment Share on other sites More sharing options...
chrno2004 Posted October 26, 2004 Share Posted October 26, 2004 removed Link to comment Share on other sites More sharing options...
chrno2004 Posted October 26, 2004 Share Posted October 26, 2004 @RogueSpearA VBscript line to change the name of your network connection.ws.Run "netsh interface set interface name = ""Local Area Connection"" newname = ""My-Network""",0, TrueI'm getting the following error Line: 1Char: 1Error: Object required: 'ws'Code: 800A01A8Source: Microsoft VBScript runtime error Link to comment Share on other sites More sharing options...
RogueSpear Posted October 26, 2004 Author Share Posted October 26, 2004 Sorry bout that you need to add these two lines of code at the beginning of the script:Dim wsSet ws = WScript.CreateObject("WScript.Shell") Link to comment Share on other sites More sharing options...
chrno2004 Posted October 26, 2004 Share Posted October 26, 2004 many thanks ! Link to comment Share on other sites More sharing options...
durex Posted February 2, 2005 Share Posted February 2, 2005 Not sure if youre still around here Rogue, but perhaps anyone who is familar with this vbscript could answer my question.I was using the batch file version posted on the 1st page of this thread.. it worked like a charm... that was until I used it on my production system, that has firewire and vmware loaded on it.. It appears this batch file enables the network icon in the systray for EVERY network connections you have...I only want it for my NIC.. not my firewire connection or my VMWare virtual adapters...So my question.. does this script work so that it will only show my NICs?btw.. Ive tried the winnt.sif entries for this and it doesnt work.. which of course is probably why there are these work arounds...Thanks!! Link to comment Share on other sites More sharing options...
Br4tt3 Posted February 2, 2005 Share Posted February 2, 2005 There ís a MS vbs file that will show the same network icon in the tray free to download with the BDD2.0 Business Accelerator @ MS webby. WOrked out for me...Cu later Link to comment Share on other sites More sharing options...
RogueSpear Posted February 4, 2005 Author Share Posted February 4, 2005 @durex If you notice the script looks for the network connection that is named "Local Area Connection". It should change only that one network connection, not all of them. I've run this script on literally dozens of different computers now (if not hundreds) and it has worked every time. Check and see if you changed something. As an example, I have one computer at work that has one NIC, one 802.11g adapter, VMware, Cisco VPN Client (which makes a virtual NIC), and firewire; it worked as expected and only turned on the one 10/100 NIC labeled "Local Area Connection".Off topic - I never received an email notification that anybody responded to this thread which is odd. I just happened to search for it so I could reference it in another thread. Anyone else experience this kind of thing? Link to comment Share on other sites More sharing options...
durex Posted February 4, 2005 Share Posted February 4, 2005 Thanks a bunch Rougue... so just toss this in a vbs and call it from my runonce and i should be set? Link to comment Share on other sites More sharing options...
bc- Posted February 4, 2005 Share Posted February 4, 2005 i have another way on setting network interface parameters. after testing GreenMachines batchfile i noticed, its changing all network interfaces, even those not having any option for iconshow etc. (ms_ras..).i made a new batch that first searches any pci-network adapter for its uniq id's and then goes the interfaces setup.@ECHO OFFSETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSIONSET SHOWICON=0SET IPCHECKINGENABLED=0SET IACE=0SET IFKEY=HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\InterfacesSET CLASSKEY=HKLM\SYSTEM\CurrentControlSet\Control\ClassSET ROOTKEY=HKLM\SYSTEM\CurrentControlSet\Control\NetworkSET NETWORKKEY={4D36E972-E325-11CE-BFC1-08002BE10318}FOR /F "TOKENS=1 DELIMS= " %%A IN ('REG QUERY %CLASSKEY%\%NETWORKKEY%') DO ( SET TEMP1=%%A SET TEMP2=!TEMP1:~97,4! FOR /F "TOKENS=1 DELIMS= " %%C IN ('REG QUERY %CLASSKEY%\%NETWORKKEY%\!TEMP2!') DO ( SET TEMP4=%%C rem ComponentId -> pci\ven SET TEMP5=!TEMP4:~0,11! SET TEMP6=!TEMP4:~19,7! IF "!TEMP5!"=="ComponentId" ( IF "!TEMP6!"=="pci\ven" ( FOR /F "TOKENS=1 DELIMS= " %%D IN ('REG QUERY %CLASSKEY%\%NETWORKKEY%\!TEMP2!') DO ( SET TEMP4=%%D rem NetCfgInstanceId SET TEMP5=!TEMP4:~0,16! SET TEMP6=!TEMP4:~24,38! IF "!TEMP5!"=="NetCfgInstanceId" ( SET FOUNDIF=!TEMP6! rem ShowIcon / IpCheckingEnabled SET REGSTR1=%ROOTKEY%\%NETWORKKEY%\!FOUNDIF!\Connection REG ADD !REGSTR1! /v ShowIcon /t REG_DWORD /d %SHOWICON% /f REG ADD !REGSTR1! /v IpCheckingEnabled /t REG_DWORD /d %IPCHECKINGENABLED% /f rem IPAutoconfigurationEnabled SET REGSTR2=%IFKEY%\!FOUNDIF! REG ADD !REGSTR2! /v IPAutoconfigurationEnabled /t REG_DWORD /d %IACE% /f rem add custom Ndi-settings here SET REGSTR3=%CLASSKEY%\%NETWORKKEY%\!TEMP2!\Ndi ) ) ) ) ))bc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now