jgantes
asked on
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\Lau nchIP.bat
1 = %systemdrive%\Programs\ult ravnc\winv nc.exe
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\Lau
1 = %systemdrive%\Programs\ult
ASKER
Let me try that out tonight... Thanks Rob
No problem. Good luck!
Regards,
Rob.
Regards,
Rob.
ASKER
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....
I tried creating an XML even to just add it to the start menu, but that was with little success too... hmmm....
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.
I'll have a bit more of a look when I get some time....
Regards,
Rob.
ASKER
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!
LocalipLaunch = Shell("cmd.exe /c x:\GetLocalIP_PE.vbs", 1)
thanks for the help though!
Oh great, very good.....seeing as EXE's work though, I wonder why you can't use:
3 = %comspec% %systemdrive%\my_files\Lau nchIP.bat
or
3 = cmd /c %systemdrive%\my_files\Lau nchIP.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.
3 = %comspec% %systemdrive%\my_files\Lau
or
3 = cmd /c %systemdrive%\my_files\Lau
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.
ASKER
Thanks for all the help. I'll try the other solutions... Got lazy and did the exe thing :-)
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\Lau nchIP.bat"
but I'm not sure how BartPE works....
Regards,
Rob.
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\Lau
but I'm not sure how BartPE works....
Regards,
Rob.
ASKER
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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\Scr
Having said that though, maybe it's worth, as a command to execute, running:
3 = %comspec% %systemdrive%\my_files\Lau
which will explicitly force cmd.exe to run the batch file.
Regards,
Rob.