User Tag List

Results 1 to 5 of 5

Thread: Need help with a script

  1. #1
    Forum Staff
    • aayman's Gadgets
      • Motherboard:
      • MSI X370 Gaming Pro
      • CPU:
      • Ryzen 1700 @3.7GHz (H100i v2)
      • RAM:
      • 2x8GB Trident Z 3600Mhz
      • Hard Drive:
      • 960 EVO 250GB + SanDisk SSDX 960GB + 1TB WD Black
      • Graphics Card:
      • EVGA 1070 FTW
      • Display:
      • ASUS PG279Q + Dell U2312HM
      • Sound Card:
      • Creative Sound Blaster Zx
      • Speakers/HPs:
      • Sennheiser PC350SE + Phillips SPH9500
      • Keyboard:
      • CM QuickFire Stealth
      • Mouse:
      • FinalMouse Scream One | Logitech G403
      • Controller:
      • Steam Controller
      • Power Supply:
      • Corsair AX850
      • Operating System:
      • Windows 10 1703
      • ISP:
      • AmberIT
    aayman's Avatar
    Join Date
    Jul 2008
    Posts
    13,790

    Default Need help with a script

    I was wondering if anyone can write up a BAT file which will do a couple of things in order. This is to help the CSS scene and I'm sure many people will appreciate it.

    Things that need to be done (in order):
    1) Exit Steam.exe
    2) Disable LAN connection
    3) Launch CSS exe
    4) Some delay
    5) Enable LAN connection

    I have no idea how to do this and when I tried, I just managed to close Steam and minimize it in the background rather than exiting it completely. Don't know what's the command for a graceful exit.

    Any help would be appreciated

  2. #2
    Member
    • ShouravBR's Gadgets
      • Motherboard:
      • Gigabyte B150M-D3H
      • CPU:
      • Intel i3-6100
      • RAM:
      • 2x DDR4 4GB
      • Hard Drive:
      • Transcend 128GB; Toshiba 1TB
      • Graphics Card:
      • Sapphire R7 260x 2GB
      • Display:
      • Samsung SyncMaster (1920x1080)
      • Keyboard:
      • A4Tech Wireless
      • Mouse:
      • A4Tech Wireless
      • Power Supply:
      • Gigabyte Hercules x580
      • Operating System:
      • Windows 10
      • Comment:
      • Minecraftable.
      • ISP:
      • ICC 2Mbps
      • Console:
      • 8
    ShouravBR's Avatar
    Join Date
    Apr 2013
    Location
    Dhaka
    Posts
    186

    Default

    Writing batch files may be daunting but the net is packed with resources waiting to be googled.
    And you should run this batch file as admin.

    Code:
    taskkill /f /im Steam.exe
    ipconfig/release
    path/to/css.exe
    sleep 10s
    ipconfig/renew
    Ref/footnote:
    1. http://www.neowin.net/forum/topic/32...on-with-a-cmd/
    2. It doesnt actually disable the network adapter, but makes your network show up as "unidentified". (don't know if it will work for you)
    3. From past experience
    4. Sleep x (any integer followed with s = seconds, m = minutes, h = hours or d = day)
    5. (we all know what this does)
    Last edited by ShouravBR; June 2nd, 2013 at 00:46. Reason: typos and formating

  3. #3
    Forum Staff
    • aayman's Gadgets
      • Motherboard:
      • MSI X370 Gaming Pro
      • CPU:
      • Ryzen 1700 @3.7GHz (H100i v2)
      • RAM:
      • 2x8GB Trident Z 3600Mhz
      • Hard Drive:
      • 960 EVO 250GB + SanDisk SSDX 960GB + 1TB WD Black
      • Graphics Card:
      • EVGA 1070 FTW
      • Display:
      • ASUS PG279Q + Dell U2312HM
      • Sound Card:
      • Creative Sound Blaster Zx
      • Speakers/HPs:
      • Sennheiser PC350SE + Phillips SPH9500
      • Keyboard:
      • CM QuickFire Stealth
      • Mouse:
      • FinalMouse Scream One | Logitech G403
      • Controller:
      • Steam Controller
      • Power Supply:
      • Corsair AX850
      • Operating System:
      • Windows 10 1703
      • ISP:
      • AmberIT
    aayman's Avatar
    Join Date
    Jul 2008
    Posts
    13,790

    Default

    Thanks for the start, but it isn't working as expected. Link3 users have static IP, and I guess the release-renew will work only when it's meant to get an IP automatically.

    Secondly, I changed the css exe to the actual name but it isn't launching. Am I supposed to include the whole path like D\games\css\css.exe? Any quotation marks?

    Lastly, is it possible to have Steam shut down gracefully instead of what it is right now (same as end process from task manager)?

  4. #4
    Member
    • ShouravBR's Gadgets
      • Motherboard:
      • Gigabyte B150M-D3H
      • CPU:
      • Intel i3-6100
      • RAM:
      • 2x DDR4 4GB
      • Hard Drive:
      • Transcend 128GB; Toshiba 1TB
      • Graphics Card:
      • Sapphire R7 260x 2GB
      • Display:
      • Samsung SyncMaster (1920x1080)
      • Keyboard:
      • A4Tech Wireless
      • Mouse:
      • A4Tech Wireless
      • Power Supply:
      • Gigabyte Hercules x580
      • Operating System:
      • Windows 10
      • Comment:
      • Minecraftable.
      • ISP:
      • ICC 2Mbps
      • Console:
      • 8
    ShouravBR's Avatar
    Join Date
    Apr 2013
    Location
    Dhaka
    Posts
    186

    Default

    Code:
    taskkill /IM program.exe /T
    /F specifies terminated forcefully
    /T specifies close child process
    taskkill /? for more info

    Look here for network ON/OFF -> http://cmdknowledge.wordpress.com/20...ommand-prompt/

    Does D\games\css\css.exe in cmd starts the program then "yes". (try snippets in CMD before you save it to bat file)

  5. #5
    Noblesse Oblige
    • CvP's Gadgets
      • Motherboard:
      • ASUS P8Z77 V Delux
      • CPU:
      • Intel Core i7 3770K @3.9GHz
      • RAM:
      • GSkill TridentX 2x8GB DDR3 @2400MHz
      • Hard Drive:
      • Crucial M4 256GB SSD; WD Caviar Black 2TB; Hitachi 250GB; Samsung S3 1.5TB; Hitachi 2TB
      • Graphics Card:
      • EVGA 980Ti 6GB
      • Display:
      • Samsung 17"+22"+22"
      • Sound Card:
      • Realtek HD Audio <internal>
      • Speakers/HPs:
      • Creative Inspire 5:1
      • Keyboard:
      • Razer BlackWidow Ultimate
      • Mouse:
      • G7
      • Power Supply:
      • Seasonic X 850W 80Plus Gold
      • Optical Drive:
      • External DVD-RW
      • USB Devices:
      • Logitech Carl Zeiss Tessar HD 1080p Webcam
      • UPS:
      • Mercury 1500VA with Large Lead-Acid Battery
      • Operating System:
      • Genuine Windows 10 Pro
      • Comment:
      • Everything packed in a NZXT Phantom 820
      • ISP:
      • Link3/Amber IT
      • Download Speed:
      • 10000
      • Upload Speed:
      • 10000
    CvP's Avatar
    Join Date
    Feb 2008
    Location
    Dhaka, Bangladesh
    Posts
    9,019

    Default

    Here you go.

    I am not entirely sure if this will work on Windows 7 or not as Windows 7 has PowerShell v2 and Windows 8 has v3.

    How to use:
    extract.

    open.
    put necessary path/options in CONFIG.
    save

    run.


    - Updated to make it work in Windows 7.
    - Alternatively, you can install powershell v3 (latest) from here.
    Attached Files Attached Files
    Last edited by CvP; June 4th, 2013 at 00:42.
    The abuse of greatness is when it disjoins remorse from power.
    Please do not PM me for support. You will NOT get a reply. Post in the relevant forum section.

Similar Threads

  1. Torrentbd Seedbox & rapidleech script
    By virus_bd in forum Features of TorrentBD
    Replies: 0
    Last Post: June 9th, 2011, 02:00
  2. Server2Server Transloader Script
    By somik in forum Programming
    Replies: 1
    Last Post: August 6th, 2010, 14:22

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 0.18135 seconds with 15 queries.