Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Running batch at startup


  • Please log in to reply
8 replies to this topic

#1 Kirbyofdeath

Kirbyofdeath

  • Members
  • 459 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Somewhere on Earth
  • Local time:05:52 AM

Posted 29 January 2015 - 01:01 PM

I'm trying to run a batch file at startup (when chkdsk runs), but I may need some help.



BC AdBot (Login to Remove)

 


#2 Aura

Aura

    Bleepin' Special Ops


  • Malware Response Team
  • 19,545 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:52 AM

Posted 29 January 2015 - 01:33 PM

Hi Kirby :)

You cannot run a batch file when chkdsk is running, since it's a boot-time operation and the system isn't fully loaded at that point. You can only execute a .bat file on system initilization or session opening. The easiest way (if you ask me) to run a .bat script on start-up is to either create an entry for it under the HKLM or HKCU Run key, or put the .bat script in the user "Start up" folder so it'll be launched when that user enter his account.

unite_blue.png
Security Administrator | Sysnative Windows Update Senior Analyst | Malware Hunter | @SecurityAura
My timezone UTC-05:00 (East. Coast). If I didn't reply to you within 48 hours, please send me a PM.


#3 jkostar

jkostar

  • Members
  • 103 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cleveland, Ohio
  • Local time:05:52 AM

Posted 29 January 2015 - 02:05 PM

both of those should work, but you can also use task scheduler and customize exactly when yo would like the script to run. But this also will not work when running a pre-boot chkdsk.


 

 

 


#4 Kirbyofdeath

Kirbyofdeath
  • Topic Starter

  • Members
  • 459 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Somewhere on Earth
  • Local time:05:52 AM

Posted 29 January 2015 - 04:06 PM

Is it possible to run a cmd window application at boot-time? Like before or right after chkdsk runs?



#5 Aura

Aura

    Bleepin' Special Ops


  • Malware Response Team
  • 19,545 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:52 AM

Posted 29 January 2015 - 04:09 PM

Before boot time, no, after, yes. Why would you want to do that if I may ask? What are you trying to do? Maybe there's another solution?

unite_blue.png
Security Administrator | Sysnative Windows Update Senior Analyst | Malware Hunter | @SecurityAura
My timezone UTC-05:00 (East. Coast). If I didn't reply to you within 48 hours, please send me a PM.


#6 Kirbyofdeath

Kirbyofdeath
  • Topic Starter

  • Members
  • 459 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Somewhere on Earth
  • Local time:05:52 AM

Posted 29 January 2015 - 07:19 PM

I'm trying to replace uxtheme.dll. But instead of just use Mint, I'd like to do it in a special way. Isn't there any tool to run batch files at boot time?



#7 Aura

Aura

    Bleepin' Special Ops


  • Malware Response Team
  • 19,545 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:52 AM

Posted 29 January 2015 - 07:20 PM

You know that there's theme patchers to do that, right?

unite_blue.png
Security Administrator | Sysnative Windows Update Senior Analyst | Malware Hunter | @SecurityAura
My timezone UTC-05:00 (East. Coast). If I didn't reply to you within 48 hours, please send me a PM.


#8 Kirbyofdeath

Kirbyofdeath
  • Topic Starter

  • Members
  • 459 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Somewhere on Earth
  • Local time:05:52 AM

Posted 02 February 2015 - 10:08 AM

Yes, but I like doing this the hard way.



#9 Aura

Aura

    Bleepin' Special Ops


  • Malware Response Team
  • 19,545 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:52 AM

Posted 02 February 2015 - 10:22 AM

There seems to be tons of ways to run a .bat script as a Windows Service, which would be the closest you have to run it on "boot time".

http://serverfault.com/questions/54676/how-to-create-a-service-running-a-bat-file-on-windows-2008-server
http://wiki.scn.sap.com/wiki/display/Basis/How+To+Install+a+Batch+file+as+Windows+Service

unite_blue.png
Security Administrator | Sysnative Windows Update Senior Analyst | Malware Hunter | @SecurityAura
My timezone UTC-05:00 (East. Coast). If I didn't reply to you within 48 hours, please send me a PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users