Results 1 to 4 of 4

Thread: Command prompt help - batch command

  1. #1
    Hello jackvdbuk's Avatar
    Join Date
    Apr 2006
    Location
    Stratford
    Posts
    2,513
    Thanks
    468
    Thanked
    112 times in 95 posts
    • jackvdbuk's system
      • Motherboard:
      • AbiT IP35-PRO
      • CPU:
      • Intel C2Q Q9550
      • Memory:
      • OCZ Nvidia SLi Edition 4GB (2x2gb) pc2-6400 DDR2
      • Storage:
      • lots of TB
      • Graphics card(s):
      • BFG 8800GTS 512MB
      • PSU:
      • Corsair HX620W
      • Case:
      • Corsair 800D
      • Operating System:
      • Windows 7 Premium x64
      • Monitor(s):
      • Dell 2407WFP
      • Internet:
      • Orange (about 6Mb)

    Command prompt help - batch command

    Hello,

    im trying to make life easier at work by creating a batch script that needs to start a service on multiple PCs which currently do not have this service running that day.

    the problem is the list of affected PCs changes each day and the list is generated in excel.

    id like to create a batch script that can be run each morning on these computers.

    so far i have the command as : sc \\ PC**** start "serviceXXXX" %1

    is it possible to paste the list in the batch file say at the bottom and have a "insert X into that command from below list?"

    obviously i need to somehow tell command prompt the PC to check which changes each day but not sure the best method or simplest way (never done batch commands before)

    any help would be great

  2. #2
    Senior Member
    Join Date
    May 2013
    Posts
    215
    Thanks
    3
    Thanked
    21 times in 19 posts
    • bytejunkie's system
      • Motherboard:
      • ASRock P5S Pro
      • CPU:
      • i5 750
      • Memory:
      • 8GB Patriot IEM
      • Storage:
      • Samsung 840Pro 128GB
      • Graphics card(s):
      • XFX 6870
      • PSU:
      • Powercooler 600
      • Case:
      • Thermal Take Dokker
      • Operating System:
      • Win7
      • Monitor(s):
      • Apple Cinema Screen
      • Internet:
      • yup

    Re: Command prompt help - batch command

    can you do readfiles with a command prompt?

    suspect you'd find this simpler in powershell, is that an option?

  3. #3
    Hello jackvdbuk's Avatar
    Join Date
    Apr 2006
    Location
    Stratford
    Posts
    2,513
    Thanks
    468
    Thanked
    112 times in 95 posts
    • jackvdbuk's system
      • Motherboard:
      • AbiT IP35-PRO
      • CPU:
      • Intel C2Q Q9550
      • Memory:
      • OCZ Nvidia SLi Edition 4GB (2x2gb) pc2-6400 DDR2
      • Storage:
      • lots of TB
      • Graphics card(s):
      • BFG 8800GTS 512MB
      • PSU:
      • Corsair HX620W
      • Case:
      • Corsair 800D
      • Operating System:
      • Windows 7 Premium x64
      • Monitor(s):
      • Dell 2407WFP
      • Internet:
      • Orange (about 6Mb)

    Re: Command prompt help - batch command

    bit beyond me that by the looks of the scripting required.

    was hoping it to be rather simple but hey ho

    - is it possible to replace say x in a cell in excel if there is a number in an adjacent cell perhaps?
    Last edited by jackvdbuk; 11-08-2013 at 02:09 PM.

  4. #4
    Senior Member Spreadie's Avatar
    Join Date
    Jun 2013
    Location
    an island in the south
    Posts
    1,653
    Thanks
    251
    Thanked
    302 times in 212 posts
    • Spreadie's system
      • Motherboard:
      • Z390i
      • CPU:
      • i7-9700K
      • Memory:
      • 16GB DDR4 3200 CL14
      • Storage:
      • 3.5TB m.2/SSD, 32TB NAS
      • Graphics card(s):
      • 1080 Ti
      • PSU:
      • SFX 600
      • Case:
      • NCase M1
      • Operating System:
      • Win 10
      • Monitor(s):
      • AOC CQ32G1
      • Internet:
      • 80 Meg Fibre

    Re: Command prompt help - batch command

    Can you use a macro to export the list from excel and continually update a file called from the batch command?

    We used to do something similar at work, with laboratory sample results.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •