• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Static IP adress for Wi-Fi interface using CSV

    Scheduled Pinned Locked Moved
    General
    2
    2
    155
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      Numa09
      last edited by Numa09

      Hi I´m trying to create a Snapin pack using this scipt but when I test it I recive an error in Line 2 Character 5; Code: 800A03F2
      I’ve no experience scripting and not sure were the failure is:
      This is what I have in my .VBS file

      Set csv="C:\Program Files (x86)\FOG\tmp\IPSet2301\ComputerList.csv"
      for /f "skip=1 delims=, tokens=1-6" %%a in (%csv%) do (
        if /I "%computername%"=="%%a" (
           netsh int ipv4 set address "Wi-Fi" static %%b %%c %%d
          netsh int ipv4 set dnsserver "Wi-Fi" static %%e
          netsh int ipv4 add dnsserver "Wi-Fi" %%f
        )
      )
      
      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @Numa09
        last edited by george1421

        @Numa09 First this looks like a DOS Batch file not a VBS file. That is maybe why its giving you an error with line 2.

        Second make sure that csv file is part of your snapin pack.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • george1421G george1421 moved this topic from Feature Request on
        • 1 / 1
        • First post
          Last post

        245

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project