Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Windows 64bit (http://www.velocityreviews.com/forums/f46-windows-64bit.html)
-   -   executing batch file from different folder not working ? (http://www.velocityreviews.com/forums/t585931-executing-batch-file-from-different-folder-not-working.html)

Skybuck Flying 01-20-2008 09:10 AM

executing batch file from different folder not working ?
 
Hello.

file contents neuk.bat:
program.exe

console commands entered:
cd c:\bla\bla
c:\bla\bla\neuk.bat

"can't execute program.exe" it says.

This seems abnormal from ms-dos 6.22 days ?

The batch file is supposed to execute the program.exe no matter from what
folder the batch file is invoked ?

Seems to be a bug ????

Or is this a new "security feature" ? ;)

Bye,
Skybuck.



R. C. White 01-20-2008 06:58 PM

Re: executing batch file from different folder not working ?
 
Hi, Skybuck.

Are you running Vista? Are you THE Administrator? Does Vista know this?

Open an Administrator:Command Prompt. (Right-click cmd.exe, then Run as
Administrator.) Run your batch file in this window.

Yes, this is a new security feature. Vista doesn't like to run .exe files
without proof that the Administrator is in control.

RC
--
R. C. White, CPA
San Marcos, TX
rc@grandecom.net
Microsoft Windows MVP
(Running Windows Live Mail 2008 in Vista Ultimate x64)

"Skybuck Flying" <spam@hotmail.com> wrote in message
news:40c$47930f4e$541983fa$14059@cache5.tilbu1.nb. home.nl...
> Hello.
>
> file contents neuk.bat:
> program.exe
>
> console commands entered:
> cd c:\bla\bla
> c:\bla\bla\neuk.bat
>
> "can't execute program.exe" it says.
>
> This seems abnormal from ms-dos 6.22 days ?
>
> The batch file is supposed to execute the program.exe no matter from what
> folder the batch file is invoked ?
>
> Seems to be a bug ????
>
> Or is this a new "security feature" ? ;)
>
> Bye,
> Skybuck.



Charlie Russel - MVP 01-20-2008 07:22 PM

Re: executing batch file from different folder not working ?
 
If the program.exe you're calling requires elevation, this will fail. If it
does NOT require elevation, it will work. And in all cases if you open an
elevated command shell, it will work.

--
Charlie.
http://msmvps.com/xperts64
http://mvp.support.microsoft.com/profile/charlie.russel


"Skybuck Flying" <spam@hotmail.com> wrote in message
news:40c$47930f4e$541983fa$14059@cache5.tilbu1.nb. home.nl...
> Hello.
>
> file contents neuk.bat:
> program.exe
>
> console commands entered:
> cd c:\bla\bla
> c:\bla\bla\neuk.bat
>
> "can't execute program.exe" it says.
>
> This seems abnormal from ms-dos 6.22 days ?
>
> The batch file is supposed to execute the program.exe no matter from what
> folder the batch file is invoked ?
>
> Seems to be a bug ????
>
> Or is this a new "security feature" ? ;)
>
> Bye,
> Skybuck.
>



Skybuck Flying 01-20-2008 07:55 PM

Re: executing batch file from different folder not working ?
 
Nope just X64 Pro.

Bye,
Skybuck.



Skybuck Flying 01-20-2008 08:22 PM

Re: executing batch file from different folder not working ?
 
Nope, that's not the problem.

I have figured out what the problem is, it seems to be a bug with the > pipe
direction in x64.

I'll post a new thread to describe the problem.

Bye,
Skybuck.



Tony Sperling 01-20-2008 10:07 PM

Re: executing batch file from different folder not working ?
 
This is probably wrong, this is old stuff for me, but does not excution from
batch files require the full pathname to the *.EXE if it is not guaranteed
to be in the current directory - or further down the tree from the current
directory?

I seem to remember there was always some kind of inconsistency that tought
me to always write them that way, way back when.

Anyway, what is the current directory? Is "C:\bla\bla" the batchfile home or
just anywhere?

'Piping', wasn't mentioned in the example code, but that could complicate
matters, I'm sure.


Tony. . .


"Charlie Russel - MVP" <charlie@mvKILLALLSPAMMERSps.org> wrote in message
news:FD7D8B55-5E00-4FEF-9AE1-B505BC78FE19@microsoft.com...
> If the program.exe you're calling requires elevation, this will fail. If
> it does NOT require elevation, it will work. And in all cases if you open
> an elevated command shell, it will work.
>
> --
> Charlie.
> http://msmvps.com/xperts64
> http://mvp.support.microsoft.com/profile/charlie.russel
>
>
> "Skybuck Flying" <spam@hotmail.com> wrote in message
> news:40c$47930f4e$541983fa$14059@cache5.tilbu1.nb. home.nl...
>> Hello.
>>
>> file contents neuk.bat:
>> program.exe
>>
>> console commands entered:
>> cd c:\bla\bla
>> c:\bla\bla\neuk.bat
>>
>> "can't execute program.exe" it says.
>>
>> This seems abnormal from ms-dos 6.22 days ?
>>
>> The batch file is supposed to execute the program.exe no matter from what
>> folder the batch file is invoked ?
>>
>> Seems to be a bug ????
>>
>> Or is this a new "security feature" ? ;)
>>
>> Bye,
>> Skybuck.
>>

>




Charlie Russel - MVP 01-20-2008 11:14 PM

Re: executing batch file from different folder not working ?
 
I'm not seeing anything different than I'd expect with piping and
redirection.

--
Charlie.
http://msmvps.com/xperts64
http://mvp.support.microsoft.com/profile/charlie.russel


"Skybuck Flying" <spam@hotmail.com> wrote in message
news:e070a$4793acff$541983fa$20086@cache6.tilbu1.n b.home.nl...
> Nope, that's not the problem.
>
> I have figured out what the problem is, it seems to be a bug with the >
> pipe direction in x64.
>
> I'll post a new thread to describe the problem.
>
> Bye,
> Skybuck.
>



crich243 07-11-2012 10:06 PM

Hey All,
can someone tell me why this isn't working.

@echo off
Title Games - Select Your Game
echo ============Select Your Game============
echo.
echo 1 = Minecraft (MC)
echo 2 = Flight Simulator X (FSX)
echo 3 = Age of Empires 3 (AoE 3)
echo 4 = Ship Simulator 2008 (SS2008)
echo 5 = Kerbal Space Program (KSP)
echo.
SET /P Choose=Type the Number Next to your Chosen Game then Press ENTER:
IF %Choose%==1 GOTO MC
IF %Choose%==2 GOTO FSX
IF %Choose%==3 GOTO AoE
IF %Choose%==4 GOTO SS2008
IF %Choose%==5 GOTO KSP
:MC
cd C:\Users\Andrew\Documents\Games\Minecraft.exe
Start Minecraft.exe
:FSX
cd C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\fsx.exe
Start fsx.exe
:AoE
cd C:\Program Files\Microsoft Games\Age of Empires III\age3.exe
Start age3.exe
:SS2008
cd C:\Program Files\Vstep\ShipSim2008\ShipSim2008.exe
Start ShipSim2008.exe
:KSP
cd C:\Program Files\KSP\KSP.exe
Start KSP.exe

Please Help,
crich243


All times are GMT. The time now is 09:37 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.