BartPE: PENetCfg launces everything fine except my batch files that calls a VBS

We've used BartPE for years with great success.  However, I added a line to our config that launches a batch file that calls a vb script and it won't auto launch.  I can't figure it out.  I saw this behavior years ago and gave up on it... but this time I need the file to launch.

I originally had a line for the script (*.vbs) to launch on it's own, but went to batch file figuring it didn't like the vbs files.  Still not luck, but the script runs fine if I launch it myself from the x:\my_files custom directory on the CD.

Also, I've tried different start up parameters to no avail...

[PostNetAutoRun]
3 = %systemdrive%\my_files\LaunchIP.bat
1 = %systemdrive%\Programs\ultravnc\winvnc.exe
jgantesAsked:
Who is Participating?
 
RobSampsonCommented:
@ the Cleanup Volunteer, I would recommended accepting the author's response: 20091211, and refund points.

Regards,

Rob.
0
 
RobSampsonCommented:
Hi, from here:
http://www.msfn.org/board/lofiversion/index.php/t72356.html

"BartPE looks at the "penetcfg.ini" first and if you have the AutoStartNet=Yes and PromptForProfile=No and ShowGUI=No then BartPE will not look at the other NetProfiles and will opt to use whatever default settings you have made farther down in the penetcfg.ini file."

And also within your batch file, to run a VBS, use a line that reads:
wscript %systemdrive%\my_files\ScriptFile.vbs

Having said that though, maybe it's worth, as a command to execute, running:
3 = %comspec% %systemdrive%\my_files\LaunchIP.bat

which will explicitly force cmd.exe to run the batch file.

Regards,

Rob.
0
 
jgantesAuthor Commented:
Let me try that out tonight... Thanks Rob
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
RobSampsonCommented:
No problem.  Good luck!

Regards,

Rob.
0
 
jgantesAuthor Commented:
gave both a try but no luck.  Works fine when I run it from the command prompt or even launch the batch file any other way, so very strange.  

I tried creating an XML even to just add it to the start menu, but that was with little success too... hmmm....
0
 
RobSampsonCommented:
Hmmm, can't say I've used Barts PE, but I just searched Google for PostNetAutoRun and had a look through a couple of articles....maybe the one I posted, or another may help you get autorun things going?

I'll have a bit more of a look when I get some time....

Regards,

Rob.
0
 
jgantesAuthor Commented:
Actually wrote a VB6 app that launches it from an EXE... since EXE's work and all, that seemed easy enough and it works.  Of course, we do have the VB6 plugin.  

LocalipLaunch = Shell("cmd.exe /c x:\GetLocalIP_PE.vbs", 1)

thanks for the help though!
0
 
RobSampsonCommented:
Oh great, very good.....seeing as EXE's work though, I wonder why you can't use:
3 = %comspec% %systemdrive%\my_files\LaunchIP.bat

or
3 = cmd /c %systemdrive%\my_files\LaunchIP.bat

Anyway, you can post a request in the Community Support zone to either delete this question, or PAQ your solution....including the link to this question.

Regards,

Rob.
0
 
jgantesAuthor Commented:
Thanks for all the help.  I'll try the other solutions... Got lazy and did the exe thing :-)
0
 
RobSampsonCommented:
No worries.  It just seems that seeing as you *can* run your exe, then you should be able to run cmd.exe or wscript.exe as well without problems....maybe though, the parameters don't work....maybe that's why it doesn't "appear" to work.

That is, you may be able to run
cmd.exe
on it's own, but not
cmd.exe /c c:\batch.bat

Maybe if you did:
3 = "cmd /c %systemdrive%\my_files\LaunchIP.bat"

but I'm not sure how BartPE works....

Regards,

Rob.
0
 
jgantesAuthor Commented:
I'll give it a try... good point w/ the quotes.  Penetcfg isn't exactly the most robust launching pad in the world, if ya know what I mean, but it does the job.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.