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

Batch Autorun and Autoplay


  • Please log in to reply
6 replies to this topic

#1 emucade

emucade

  • Members
  • 34 posts
  • OFFLINE
  •  
  • Location:Santa Fe N.M.
  • Local time:09:37 AM

Posted 06 February 2009 - 06:15 PM

Universal drive letter in a batch script.

Need some help here?
Hello all thank you for reading my post.
I am a computer administrator for a local car dealer in Santa Fe NM. (Santa Fe Mazda Volvo)
We use SD cards to backup customer data. At one point everybody had their own SD cards for their computer. We are now moving SD cards from computer to computer exchanging data.
To make things easier I have written Autorun.ini & autoplay.bat files to the sd card. This way everybody
Could just pop in the card and the root directory would open. Itâ??s very convenient except for the fact that
We are now moving the card around. So the autorun wonâ??t work on some of the computers. Here is the reason why. In the autoplay.bat I assigned the drive letter. Some computers donâ??t assign the same drive to the SD card.
Does anybody know what the batch command for a generic drive letter is?
Years ago I use to know it.
Here is the autoplay and autorun script.
Line 5 is the problem. This is where I need to place a universal drive letter.


Autorun.ini
1 [autorun]
2 open=autoplay.bat
3 Autoplay.bat


4 @echo off
5 Start g:\
6 exit
" If you want to be the best you better learn how do defend yourself,
Because when you are the best everybody wants to kick you’re a** "
My Dad 1986

BC AdBot (Login to Remove)

 


#2 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:06:37 AM

Posted 06 February 2009 - 07:18 PM

*I Am Not a Batch File Expert!*

Have you looked into using a relative path? I don't know if it would work, but it might. Try:

5 Start .
(that's Start <period>)

or

5 Start \
Start <backslash>

#3 emucade

emucade
  • Topic Starter

  • Members
  • 34 posts
  • OFFLINE
  •  
  • Location:Santa Fe N.M.
  • Local time:09:37 AM

Posted 07 February 2009 - 05:42 PM

not sure what the relative path command is.
I think its something like an $ or %.
thanks
" If you want to be the best you better learn how do defend yourself,
Because when you are the best everybody wants to kick you’re a** "
My Dad 1986

#4 emucade

emucade
  • Topic Starter

  • Members
  • 34 posts
  • OFFLINE
  •  
  • Location:Santa Fe N.M.
  • Local time:09:37 AM

Posted 07 February 2009 - 05:44 PM

not sure what the relative path command is.
I think its something like an $ or %.
Ive tried . - .. and /
I just get errors
thanks
" If you want to be the best you better learn how do defend yourself,
Because when you are the best everybody wants to kick you’re a** "
My Dad 1986

#5 emucade

emucade
  • Topic Starter

  • Members
  • 34 posts
  • OFFLINE
  •  
  • Location:Santa Fe N.M.
  • Local time:09:37 AM

Posted 07 February 2009 - 05:46 PM

THATS IT!!!!
start /
I was spacing wrong.
thank you so much, YOU ROCK!
" If you want to be the best you better learn how do defend yourself,
Because when you are the best everybody wants to kick you’re a** "
My Dad 1986

#6 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:06:37 AM

Posted 07 February 2009 - 07:12 PM

YOU ROCK!

I know, I know... if only more people realized how wonderful I am the world would be a lot better place. Either that or there would be a massive increase in the insane asylum population. :thumbsup:

#7 emucade

emucade
  • Topic Starter

  • Members
  • 34 posts
  • OFFLINE
  •  
  • Location:Santa Fe N.M.
  • Local time:09:37 AM

Posted 14 February 2009 - 06:26 PM

LOL
" If you want to be the best you better learn how do defend yourself,
Because when you are the best everybody wants to kick you’re a** "
My Dad 1986




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users