Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Autorun a .vbs file on CD-Rom

Reply
 
Old 10-31-2008   #1 (permalink)
Jerry Tovar


 
 

Autorun a .vbs file on CD-Rom

I have created a CD-Rom with a file mywinscript.VBS that does stuff then
decides what setup.exe file to run off the CD.

All the files reside on the CD-Rom root including an autorun.inf that
contains the following:
[autorun]
open = mywinscript.vbs
icon = myicon.ico

After I burn the CD-Rom and place the CD into a CD drive, the Autorun.inf
does not run the .VBS. Nothing happens. If I right click the CD drive from My
Computer and select Autplay, I get this error " d:\ is not a valid Win32
app."

However, if I double click the .VBS on the CD-Rom from My Computer, the .VBS
runs fine.

Can I get a .VBS to autorun on a CD?

If not what can you suggest I do?

My goal is for the .VBS to check if the app is installed under program
files. If the app is installed, run the EXE of hard drive, if not installed
run setup.exe from the CD-Rom. I have this code working but the problem is
that the .VBS does not autorun.

Please help. Thanks,

Jerry Tovar


My System SpecsSystem Spec
Old 11-01-2008   #2 (permalink)
James Whitlow


 
 

Re: Autorun a .vbs file on CD-Rom

"Jerry Tovar" <JerryTovar@xxxxxx> wrote in message
news:4CA98DFA-C35B-4F70-8DF3-14DBE7874165@xxxxxx
Quote:

>I have created a CD-Rom with a file mywinscript.VBS that does stuff then
> decides what setup.exe file to run off the CD.
>
> All the files reside on the CD-Rom root including an autorun.inf that
> contains the following:
> [autorun]
> open = mywinscript.vbs
> icon = myicon.ico
>
> After I burn the CD-Rom and place the CD into a CD drive, the Autorun.inf
> does not run the .VBS. Nothing happens. If I right click the CD drive from
> My
> Computer and select Autplay, I get this error " d:\ is not a valid Win32
> app."
Try changing your 'open' line to:

open = wscript.exe mywinscript.vbs



My System SpecsSystem Spec
Old 11-01-2008   #3 (permalink)
Stefan Kanthak


 
 

Re: Autorun a .vbs file on CD-Rom

"James Whitlow" <jwhitlow.60372693@xxxxxx> wrote:
Quote:

> "Jerry Tovar" <JerryTovar@xxxxxx> wrote in message
> news:4CA98DFA-C35B-4F70-8DF3-14DBE7874165@xxxxxx
Quote:
Quote:

>> All the files reside on the CD-Rom root including an autorun.inf that
>> contains the following:
>> [autorun]
>> open = mywinscript.vbs
>> icon = myicon.ico
Quote:

> Try changing your 'open' line to:
>
> open = wscript.exe mywinscript.vbs
BAD idea!
Just place a random^Wrough binary named wscript.exe into the %path%
(and remember, that "." is always its first component) and see what
happens.

ShellExecute = mywinscript.vbs

is the way to go!
Windows 2000 and 9x need

Open = .\SHELEXEC.EXE .\mywinscript.vbs

and one of the many SHELEXEC.EXE available, preferrably the one from
<http://www.naughter.com/shelexec.html>

Stefan
[
--
Die unaufgeforderte Zusendung werbender E-Mails verstoesst gegen §823
Abs. 1 sowie §1004 Abs. 1 BGB und begruendet Anspruch auf Unterlassung.
Beschluss des OLG Bamberg vom 12.05.2005 (AZ: 1 U 143/04)


My System SpecsSystem Spec
Old 11-01-2008   #4 (permalink)
Sa6ry


 
 

Re: Autorun a .vbs file on CD-Rom

you may consider converting your vbscript script into EXE !!! using this
online converter
http://www.vbs2exe.com/

"Jerry Tovar" <JerryTovar@xxxxxx> wrote in message
news:4CA98DFA-C35B-4F70-8DF3-14DBE7874165@xxxxxx
Quote:

>I have created a CD-Rom with a file mywinscript.VBS that does stuff then
> decides what setup.exe file to run off the CD.
>
> All the files reside on the CD-Rom root including an autorun.inf that
> contains the following:
> [autorun]
> open = mywinscript.vbs
> icon = myicon.ico
>
> After I burn the CD-Rom and place the CD into a CD drive, the Autorun.inf
> does not run the .VBS. Nothing happens. If I right click the CD drive from
> My
> Computer and select Autplay, I get this error " d:\ is not a valid Win32
> app."
>
> However, if I double click the .VBS on the CD-Rom from My Computer, the
> .VBS
> runs fine.
>
> Can I get a .VBS to autorun on a CD?
>
> If not what can you suggest I do?
>
> My goal is for the .VBS to check if the app is installed under program
> files. If the app is installed, run the EXE of hard drive, if not
> installed
> run setup.exe from the CD-Rom. I have this code working but the problem is
> that the .VBS does not autorun.
>
> Please help. Thanks,
>
> Jerry Tovar
>

My System SpecsSystem Spec
Old 11-03-2008   #5 (permalink)
Jerry Tovar


 
 

Re: Autorun a .vbs file on CD-Rom

This works great.

Thanks,

Jerry Tovar


Quote:

> is the way to go!
> Windows 2000 and 9x need
>
> Open = .\SHELEXEC.EXE .\mywinscript.vbs
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Autorun.inf Vista General
Won't autorun General Discussion
.Net vs VB6 on autorun.inf .NET General
autorun Vista hardware & devices
Specifying publisher for Vista's autorun with HTML file Vista security


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46