Jump to content

autorun on startup


nickw
 Share

Recommended Posts

Hi, I'm pretty new to scripting. I've written a short script that will copy music from a CD to a harddrive, then place a player in the startup folder so that when the machine boots up, it will play music. It works on my machine fine, but the machines I have to put it into are display machines that have no mouse or keyboard and have autorun disabled. Is there a way I can make it so that when the machine boots up it will autorun the disk?

Here's my script.

AutoItSetOption("WinTitleMatchMode", 2)

Send("#r")

WinWaitActive("Run")

send("d:\startup{enter}")

WinWaitActive ("startup")

send("{altdown}ea{altup}")

send("^c")

WinClose("startup")

Send("#r")

WinWaitActive("Run")

send("%USERPROFILE%\Start Menu\Programs\Startup{enter}")

winwaitactive("Startup")

send("^v")

WinClose("Startup")

Run("cmd.exe")

WinWaitActive("cmd.exe")

send("mkdir c:\music")

send("{enter}")

send("copy d:\music\*.* c:\music\")

send("{enter}")

Link to comment
Share on other sites

@nickw,

If you don't have a keyboard how were you going to get your script onto the PC in question?

Does it have available USB port and does the BIOS allow bootup to USB? If so

write your script to a pen drive and use it that way.

ViM

Link to comment
Share on other sites

Hi ViM,

If the pcs had autorun enabled, I could put the cd in the machines with an autorun.inf to get the script (converted to .exe) running, but since autorun is disabled, I was wondering if there's some workaround by putting in the CD and rebooting it.

I could just go to each machine with a keyboard and do it manually, but there are a number of machines and some of them are quite a distance away, so that's why I was hoping I could automate it so that I could send the CDs in the mail and no user imput was necessary.

The machines aren't configured to boot from usb at the moment, but thanks for the suggestion.

Link to comment
Share on other sites

no user imput was necessary.

So... what you want is to be able to put in a CD, and have it do something without user input that enables autorun.

thats Circular logic. Nothing on a CD will run(without input at least) without autorun enabled. Period.

Edited by Paulie
Link to comment
Share on other sites

Is the BIOS set to boot from CD before the hard disk drive? If so, you should be able to add a batch file to AUTOEXEC.BAT on a bootable CD (emulate a bootable floppy) to add the music files to your hard disk and put a command in the start folder to be executed. Boot up once from the CD and the job is done.

Link to comment
Share on other sites

Your CD burning software should have instructions on how to create a bootable CD.

Open a command window (run CMD) and type HELP to see instructions that a batch file can execute. The Microsoft website can be searched for more information.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...