Solved can i create a bat file and run it as a service?

My Computer

System One

  • OS
    Windows 8.1.1 Pro with Media Center
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Gateway
    CPU
    AMD K140 Cores 2 Threads 2 Name AMD K140 Package Socket FT1 BGA Technology 40nm
    Motherboard
    Manufacturer Gateway Model SX2110G (P0)
    Memory
    Type DDR3 Size 8192 MBytes DRAM Frequency 532.3 MHz
    Graphics Card(s)
    ATI AMD Radeon HD 7310 Graphics
    Sound Card
    AMD High Definition Audio Device Realtek High Definition Audio USB Audio Device
    Monitor(s) Displays
    Name 1950W on AMD Radeon HD 7310 Graphics Current Resolution 1366x768 pixels Work Resolution 1366x76
    Screen Resolution
    Current Resolution 1366x768 pixels Work Resolution 1366x768 pixels
    Hard Drives
    AMD K140
    Cores 2
    Threads 2
    Name AMD K140
    Package Socket FT1 BGA
    Technology 40nm
    Specification AMD E1-1200 APU with Radeon HD Graphics
    Family F
    Extended Family 14
    Model 2
    Extended Model 2
    Stepping 0
    Revision ON-C0
    Instruction
    Browser
    Opera 24.0
    Antivirus
    Avast Internet Security
Use Task Scheduler to create a new task to start at startup.
The new task being the .bat file.
 

My Computer

System One

  • OS
    Windows 8.1.1 Pro with Media Center
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Gateway
    CPU
    AMD K140 Cores 2 Threads 2 Name AMD K140 Package Socket FT1 BGA Technology 40nm
    Motherboard
    Manufacturer Gateway Model SX2110G (P0)
    Memory
    Type DDR3 Size 8192 MBytes DRAM Frequency 532.3 MHz
    Graphics Card(s)
    ATI AMD Radeon HD 7310 Graphics
    Sound Card
    AMD High Definition Audio Device Realtek High Definition Audio USB Audio Device
    Monitor(s) Displays
    Name 1950W on AMD Radeon HD 7310 Graphics Current Resolution 1366x768 pixels Work Resolution 1366x76
    Screen Resolution
    Current Resolution 1366x768 pixels Work Resolution 1366x768 pixels
    Hard Drives
    AMD K140
    Cores 2
    Threads 2
    Name AMD K140
    Package Socket FT1 BGA
    Technology 40nm
    Specification AMD E1-1200 APU with Radeon HD Graphics
    Family F
    Extended Family 14
    Model 2
    Extended Model 2
    Stepping 0
    Revision ON-C0
    Instruction
    Browser
    Opera 24.0
    Antivirus
    Avast Internet Security
A scheduled task is not a Windows Service. Although, since the Task Service is a service, your batch file becomes a child of a service...
 

My Computer

System One

  • OS
    Windows 8.1 Pro
    CPU
    Intel i7 3770K
    Motherboard
    Gigabyte Z77X-UD4 TH
    Memory
    16GB DDR3 1600
    Graphics Card(s)
    nVidia GTX 650
    Sound Card
    Onboard Audio
    Monitor(s) Displays
    Auria 27" IPS + 2x Samsung 23"
    Screen Resolution
    2560x1440 + 2x 2048x1152
    Hard Drives
    Corsair m4 256GB, 2 WD 2TB drives
    Case
    Antec SOLO II
    Keyboard
    Microsoft Natural Ergonomic Keyboard 4000
    Mouse
    Logitech MX
A scheduled task is not a Windows Service. Although, since the Task Service is a service, your batch file becomes a child of a service...

:cool:
 

My Computer

System One

  • OS
    Windows 8.1.1 Pro with Media Center
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Gateway
    CPU
    AMD K140 Cores 2 Threads 2 Name AMD K140 Package Socket FT1 BGA Technology 40nm
    Motherboard
    Manufacturer Gateway Model SX2110G (P0)
    Memory
    Type DDR3 Size 8192 MBytes DRAM Frequency 532.3 MHz
    Graphics Card(s)
    ATI AMD Radeon HD 7310 Graphics
    Sound Card
    AMD High Definition Audio Device Realtek High Definition Audio USB Audio Device
    Monitor(s) Displays
    Name 1950W on AMD Radeon HD 7310 Graphics Current Resolution 1366x768 pixels Work Resolution 1366x76
    Screen Resolution
    Current Resolution 1366x768 pixels Work Resolution 1366x768 pixels
    Hard Drives
    AMD K140
    Cores 2
    Threads 2
    Name AMD K140
    Package Socket FT1 BGA
    Technology 40nm
    Specification AMD E1-1200 APU with Radeon HD Graphics
    Family F
    Extended Family 14
    Model 2
    Extended Model 2
    Stepping 0
    Revision ON-C0
    Instruction
    Browser
    Opera 24.0
    Antivirus
    Avast Internet Security
It depends on what kevin2005 is actually trying to accomplish, whether or not that will work for him.
 

My Computer

System One

  • OS
    Windows 8.1 Pro
    CPU
    Intel i7 3770K
    Motherboard
    Gigabyte Z77X-UD4 TH
    Memory
    16GB DDR3 1600
    Graphics Card(s)
    nVidia GTX 650
    Sound Card
    Onboard Audio
    Monitor(s) Displays
    Auria 27" IPS + 2x Samsung 23"
    Screen Resolution
    2560x1440 + 2x 2048x1152
    Hard Drives
    Corsair m4 256GB, 2 WD 2TB drives
    Case
    Antec SOLO II
    Keyboard
    Microsoft Natural Ergonomic Keyboard 4000
    Mouse
    Logitech MX
Windows has some strict requirements about what a service is. There is more to it than just running at startup. I am not sure that a batch file could be made a service but I doubt it is necessary. Most likely all that is necessary is using Task scheduler to run a batch file at startup.

A process might be the child of a service but that in itself does not make it a service, at least not in Windows.
 

My Computer

System One

  • OS
    Windows 7
    Computer type
    PC/Desktop

My Computer

System One

  • OS
    Windows 8.1 Pro 64-bit
    Computer type
    Laptop
    System Manufacturer/Model
    Acer V3 771G-6443
    CPU
    i5-3230m
    Motherboard
    Acer VA70_HC (U3E1)
    Memory
    8GB DDR3 PC3-12800 (800 MHz)
    Graphics Card(s)
    HD4000 + GeForce GT 730M
    Sound Card
    Realtek High Definition Audio
    Monitor(s) Displays
    17" Generic PnP Display on Intel HD Graphics 4000
    Screen Resolution
    1600x900 pixels
    Hard Drives
    Samsung SSD 850 EVO 250 GB
    ADATA SSD SP900 128GB
    PSU
    90 watt brick
    Mouse
    Bluetooth
    Antivirus
    Comodo
    Other Info
    Asus RT-AC56R dual-band WRT router (Merlin firmware). Intel 7260.HMWWB.R dual-band ac wireless adapter.
We're not mind readers, so if he would post back we could get some idea of what he wants to do.
 

My Computer

System One

  • OS
    Windows 8.1.1 Pro with Media Center
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Gateway
    CPU
    AMD K140 Cores 2 Threads 2 Name AMD K140 Package Socket FT1 BGA Technology 40nm
    Motherboard
    Manufacturer Gateway Model SX2110G (P0)
    Memory
    Type DDR3 Size 8192 MBytes DRAM Frequency 532.3 MHz
    Graphics Card(s)
    ATI AMD Radeon HD 7310 Graphics
    Sound Card
    AMD High Definition Audio Device Realtek High Definition Audio USB Audio Device
    Monitor(s) Displays
    Name 1950W on AMD Radeon HD 7310 Graphics Current Resolution 1366x768 pixels Work Resolution 1366x76
    Screen Resolution
    Current Resolution 1366x768 pixels Work Resolution 1366x768 pixels
    Hard Drives
    AMD K140
    Cores 2
    Threads 2
    Name AMD K140
    Package Socket FT1 BGA
    Technology 40nm
    Specification AMD E1-1200 APU with Radeon HD Graphics
    Family F
    Extended Family 14
    Model 2
    Extended Model 2
    Stepping 0
    Revision ON-C0
    Instruction
    Browser
    Opera 24.0
    Antivirus
    Avast Internet Security
We're not mind readers, so if he would post back we could get some idea of what he wants to do.

This is what i plan to do. Disable LLC on NCP4206 chip found in many GPU. I have the batch file done. but i like to have a .bat file or some .exe to run when windows load to desktop. instead doing it manually. in some case run it take time and the little sec in doing it need's to be cut.
 

My Computer

System One

  • OS
    windows 8
We're not mind readers, so if he would post back we could get some idea of what he wants to do.

This is what i plan to do. Disable LLC on NCP4206 chip found in many GPU. I have the batch file done. but i like to have a .bat file or some .exe to run when windows load to desktop. instead doing it manually. in some case run it take time and the little sec in doing it need's to be cut.

Thanks for posting back. :)

Windows has a built in Wizard for creating .EXE files.
Open RUN and type in:

iexpress.exe

And click OK.

It might be what you are looking for.
 

My Computer

System One

  • OS
    Windows 8.1.1 Pro with Media Center
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Gateway
    CPU
    AMD K140 Cores 2 Threads 2 Name AMD K140 Package Socket FT1 BGA Technology 40nm
    Motherboard
    Manufacturer Gateway Model SX2110G (P0)
    Memory
    Type DDR3 Size 8192 MBytes DRAM Frequency 532.3 MHz
    Graphics Card(s)
    ATI AMD Radeon HD 7310 Graphics
    Sound Card
    AMD High Definition Audio Device Realtek High Definition Audio USB Audio Device
    Monitor(s) Displays
    Name 1950W on AMD Radeon HD 7310 Graphics Current Resolution 1366x768 pixels Work Resolution 1366x76
    Screen Resolution
    Current Resolution 1366x768 pixels Work Resolution 1366x768 pixels
    Hard Drives
    AMD K140
    Cores 2
    Threads 2
    Name AMD K140
    Package Socket FT1 BGA
    Technology 40nm
    Specification AMD E1-1200 APU with Radeon HD Graphics
    Family F
    Extended Family 14
    Model 2
    Extended Model 2
    Stepping 0
    Revision ON-C0
    Instruction
    Browser
    Opera 24.0
    Antivirus
    Avast Internet Security
IExpress is InstallShield Express, it's for creating installation programs. It's not something that converts batch files into executables.
 

My Computer

System One

  • OS
    Windows 8.1 Pro
    CPU
    Intel i7 3770K
    Motherboard
    Gigabyte Z77X-UD4 TH
    Memory
    16GB DDR3 1600
    Graphics Card(s)
    nVidia GTX 650
    Sound Card
    Onboard Audio
    Monitor(s) Displays
    Auria 27" IPS + 2x Samsung 23"
    Screen Resolution
    2560x1440 + 2x 2048x1152
    Hard Drives
    Corsair m4 256GB, 2 WD 2TB drives
    Case
    Antec SOLO II
    Keyboard
    Microsoft Natural Ergonomic Keyboard 4000
    Mouse
    Logitech MX
IExpress is InstallShield Express, it's for creating installation programs. It's not something that converts batch files into executables.

that's true, but it can work, however, I have not used it myself as a start up app in Windows 8.
It creates an self extracting executable that works fairly well.

I would not look at trying to run this as a service. There is no reason to do that.

The issue you may run into is when the driver loads vs. when the batch file runs during startup
You MAY need the batch to wait and run at a specific time after startup,, Delayed a bit.

Best thing to do is,,

Create a start up task in task scheduler
I would do this,, Set the Triggers at startup and Delay 30 sec.
 

My Computer

System One

  • OS
    Win 8.1 Pro
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Self Built
    CPU
    I7-3770K
    Motherboard
    ASUS SABERTOOTH Z77
    Memory
    CORSAIR 8GB 2X4 D3 1866
    Graphics Card(s)
    EVGA GTX680 4GB
    Monitor(s) Displays
    ASUS 24" LED VG248QE
    Hard Drives
    SAMSUNG E 256GB SSD 840 PRO -
    SAMSUNG E 120GB SSD840 -
    SEAGATE 1TB PIPELINE
    PSU
    CORSAIR GS800
    Case
    CORSAIR 600T
    Cooling
    CORSAIR HYDRO H100I LIQUID COOLER
    Keyboard
    THERMALTA CHALLENGER ULT GAME-KYBRD
    Mouse
    RAZER DEATHADDER GAME MS BLK-ED
    Antivirus
    Windows Defender
    Other Info
    APC 1000VA -
    LGELECOEM LG 14X SATA BD BURNER -
    CORSAIR SP120 Fans x 3 -
    NZXT 5.25 USB3 BAY CARD READER -
    HAUPPAUGE COLOSSUS
We're not mind readers, so if he would post back we could get some idea of what he wants to do.

This is what i plan to do. Disable LLC on NCP4206 chip found in many GPU. I have the batch file done. but i like to have a .bat file or some .exe to run when windows load to desktop. instead doing it manually. in some case run it take time and the little sec in doing it need's to be cut.

Thanks for posting back. :)

Windows has a built in Wizard for creating .EXE files.
Open RUN and type in:

iexpress.exe

And click OK.

It might be what you are looking for.

I won't work it only extract files.

IExpress is InstallShield Express, it's for creating installation programs. It's not something that converts batch files into executables.

This

IExpress is InstallShield Express, it's for creating installation programs. It's not something that converts batch files into executables.

that's true, but it can work, however, I have not used it myself as a start up app in Windows 8.
It creates an self extracting executable that works fairly well.

I would not look at trying to run this as a service. There is no reason to do that.

The issue you may run into is when the driver loads vs. when the batch file runs during startup
You MAY need the batch to wait and run at a specific time after startup,, Delayed a bit.

Best thing to do is,,

Create a start up task in task scheduler
I would do this,, Set the Triggers at startup and Delay 30 sec.

I did that and it does work well , but I still need to find out how I can enable the bat file to work on windows load. in just add to registry and some easy task.
 

My Computer

System One

  • OS
    windows 8
can you post the code in your batch file?
 

My Computer

System One

  • OS
    Win 8.1 Pro
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Self Built
    CPU
    I7-3770K
    Motherboard
    ASUS SABERTOOTH Z77
    Memory
    CORSAIR 8GB 2X4 D3 1866
    Graphics Card(s)
    EVGA GTX680 4GB
    Monitor(s) Displays
    ASUS 24" LED VG248QE
    Hard Drives
    SAMSUNG E 256GB SSD 840 PRO -
    SAMSUNG E 120GB SSD840 -
    SEAGATE 1TB PIPELINE
    PSU
    CORSAIR GS800
    Case
    CORSAIR 600T
    Cooling
    CORSAIR HYDRO H100I LIQUID COOLER
    Keyboard
    THERMALTA CHALLENGER ULT GAME-KYBRD
    Mouse
    RAZER DEATHADDER GAME MS BLK-ED
    Antivirus
    Windows Defender
    Other Info
    APC 1000VA -
    LGELECOEM LG 14X SATA BD BURNER -
    CORSAIR SP120 Fans x 3 -
    NZXT 5.25 USB3 BAY CARD READER -
    HAUPPAUGE COLOSSUS
but I still need to find out how I can enable the bat file to work on windows load. in just add to registry and some easy task.

Create an entry for it in the registry here:
Code:
[COLOR=#000000][FONT=Arial][HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run][/FONT][/COLOR]
How to Add an Application to Startup Using the Registry

Or

Put the bat file in the Startup folder:
Code:
%appdata%\Microsoft\Windows\Start Menu\Programs\Startup

It should do it, but If these two possibilities work only with exe files, simply make a self-extractable exe (with, already mentioned iexpress.exe) that runs the bat after extraction.

WinRAR and 7-Zip archiving tools can also make self-extractable files.
 

My Computer

System One

  • OS
    Windows 10 x64
    Computer type
    Laptop
    System Manufacturer/Model
    HP Envy DV6 7250
    CPU
    Intel i7-3630QM
    Motherboard
    HP, Intel HM77 Express Chipset
    Memory
    16GB
    Graphics Card(s)
    Intel HD4000 + Nvidia Geforce 630M
    Sound Card
    IDT HD Audio
    Monitor(s) Displays
    15.6' built-in + Samsung S22D300 + 17.3' LG Phillips
    Screen Resolution
    multiple resolutions
    Hard Drives
    Samsung SSD 250GB + Hitachi HDD 750GB
    PSU
    120W adapter
    Case
    small
    Cooling
    laptop cooling pad
    Keyboard
    Backlit built-in + big one in USB
    Mouse
    SteelSeries Sensei
    Internet Speed
    slow and steady
    Browser
    Chromium, Pale Moon, Firefox Developer Edition
    Antivirus
    Windows Defender
    Other Info
    That's basically it.
but I still need to find out how I can enable the bat file to work on windows load. in just add to registry and some easy task.

Create an entry for it in the registry here:
Code:
[COLOR=#000000][FONT=Arial][HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run][/FONT][/COLOR]
How to Add an Application to Startup Using the Registry

Or

Put the bat file in the Startup folder:
Code:
%appdata%\Microsoft\Windows\Start Menu\Programs\Startup

It should do it, but If these two possibilities work only with exe files, simply make a self-extractable exe (with, already mentioned iexpress.exe) that runs the bat after extraction.

WinRAR and 7-Zip archiving tools can also make self-extractable files.

Hey Hopachi, I have created the .exe file it does run on windows load
Code:
%appdata%\Microsoft\Windows\Start Menu\Programs\Startup
works but i get this message in the end I really don't know what is causing it. any input ?

Untitled.png
 

My Computer

System One

  • OS
    windows 8
Don't know if this will help. Command.com is the DOS command, which runs the .bat file rather than cmd.exe which is the NT cmd executable. Try saving the batch file with a .cmd extension, rather than .bat.
I guess you can add the path to your user temp folder in your environment variables.
 
Last edited:

My Computer

System One

  • OS
    Windows 8.1 Pro with Media Center
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP COMPAQ Presario CQ57
    CPU
    AMD E- 300 APU with Radion HD Graphics 1.30GHz
    Motherboard
    inbuilt
    Memory
    4GB
    Graphics Card(s)
    ATI
    Sound Card
    High Definition Audio on-board
    Monitor(s) Displays
    notebook
    Screen Resolution
    1366x768
    Hard Drives
    Seagate ST9500325AS
    Google drive 15GB
    Skydrive 25GB
    BT Cloud
    PSU
    external 20v
    Case
    Laptop
    Cooling
    pretty good
    Keyboard
    inbuilt
    Mouse
    touchpad
    Internet Speed
    BT Infinity Unlimited - 80 up 20 down =70/16 really
    Browser
    Chrome Canary usually
    Antivirus
    Windows Defender and Malwarebytes
    Other Info
    no Start menu modifications
    Upgraded with no issues to 8.0 and to 8.1
Don't know if this will help. Command.com is the DOS command, which runs the .bat file rather than cmd.exe which is the NT cmd executable. Try saving the batch file with a .cmd extension, rather than .bat.
I guess you can add the path to your user temp folder in your environment variables.


Hey Hopachi
I nailed it. I found a software called "Exescript" it can make any bat into .exe file with a lot options to choose from. Now I can run my .exe file on windows load in background so no warning or popup window. It does work flawless.
I just add the .exe I to startup folder and let the magic runs.

Thanks for all replay.
 

My Computer

System One

  • OS
    windows 8
Back
Top