Sign in to follow this  
Followers 0
nickw

autorun on startup

8 posts in this topic

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}")

Share this post


Link to post
Share on other sites



On my pc, CDs automaticly go on startup, or when the pc comes out of standby.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Thanks for the advice confuzzled. The machines do boot from a cd, so that looks like my best bet. Any suggestions on a good site learn how to create batch files and bootable cds?

Thanks

Nick

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0