PDA

View Full Version : bat file problem



ben_ek
08-09-2005, 07:51 AM
hi,

i hope this is the right forum for this kind of question...

i'm trying to create a windows scheduled task that runs a web page every *2 hours or so. so i've installed lynx (low overhead browser) with the intention of creating a bat file that i launch from the schedule manager which directs lynx to the page. ideally i'd like the bat file to close lynx down after *0 minutes or so - but i have no idea how to do that :(

the prob is that when i run the bat file that launches lynx i get "access to the specified device, path, or file is denied". i get the same error when just trying to start ie from the bat file too.

all this is happening on win2000 machine with sygate firewall installed

does anyone know how to let my bat gain access without opening up security holes? is it a firewall issue?

thanks in advance,

ben

SyntaXmasteR
08-09-2005, 10:42 AM
Post your code

ben_ek
08-09-2005, 01:33 PM
the bat i'd really like to get working is the one that configures and runs lynx. this is as follows...

@ECHO OFF
set HOME=c:\lynx
set TEMP=c:\lynx\tmp
set WWW_HOME=http://www.myurl.co.uk/scheduledUpdate.jsp
set LYNX_CFG=c:\lynx\lync.cfg
c:\lynx\lynx.exe %* %2 %* %4 %5

however this basic one which launches the same address in ie gives the same access denied error...

"C:\Program Files\Internet Explorer\iexplore.exe" http://www.myurl.co.uk/scheduledUpdate.jsp

cheers,

ben

SyntaXmasteR
08-09-2005, 03:41 PM
First Question is why do you have the %* %2 %* %4 %5 and SET commands if you do not use them? You set 4 variables in your batch but dont use them. Whats that about? You also use %* %2 %* %4 %5 what are your inputs to these?

About IE - I have no idea why you are getting access denied. Check your IE settings and make sure the .exe permissions are there.

ben_ek
08-10-2005, 09:43 AM
the variables set are required by lynx for it to start properly. i've no idea what the %* %2 etc are for, but in all the tutorials on how to start lynx it ends it with those properties.

i found the problem though and this is pretty stupid. i'd denied access to cmd.exe a while a go to increase security on the server - so all bats fail! i'm just going to run a cron script from a linux server instead. unless you know of some cunning way of only letting my bat run in cmd.exe and stopping everything else.

cheers,

ben

rchandra
11-27-2005, 01:02 PM
I've been getting the "access to the specified path / file / device is denied" also, when running a bat or cmd.exe. I'm not sure what I may have done to cause this, it seems most likely to be a deleted file (I was cleaning up space recently, stuff worked before, doesnt now). Cmd.exe is there. I didn't delete anything in the WINNT directory, some stuff from Documents and Settings and Program Files. Command.com still works.

Do you have any s***estions?

Thanks,

Rahul Chandra