ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Turn a batch file into an AHK script.

<< < (15/16) > >>

4wd:
The Netbook is pretty slow which is why 'sleep' was added between the 'start' items, and because Peerblock always tries to check everything when it starts, its icon still opens several seconds after the connection is made.-pilgrim (May 29, 2013, 04:15 AM)
--- End quote ---

That doesn't explain why it works from the CLI but not in the batch file.  If it's fast enough to create the needed pipe in the CLI, it should be able to do it within a batch file.

There's some other weird and wonderful Windows magic at work.

If devcon's speed was an issue surely that would affect my existing batch file as well?
--- End quote ---

Nope, you're not relying on its output for anything, in fact you have no error checking on any of the commands in your batch script, so if, say, the devcon command failed to (dis|en)able the interface the batch file would happily continue.

I was intending to ask you today if it was ready for a wider audience yet?
--- End quote ---

If it hasn't formatted your drive yet or caused the sun to go supernova then I guess so.  :)

You have mentioned before about getting away from its dependency on rasdial but as the most recent versions have proved reliable is there any particular reason for doing so?
--- End quote ---

I don't want to rely on the output from a CLI command that may or may not be executed or that may or may not throw an error when executed. 

If you start it after a VPN connection and it can't run rasdial or rasdial throws an error then it won't show the tray icon, I don't particularly want to sit in a loop until I get a valid output.

It'd be a lot easier to get the information direct from the horses mouth, so to speak, the same place rasdial gets it from.
Plus I have a long term motive for wanting to hit the dll directly, I want to get all information direct from the Remote Access Service rather than wait for things to show up in the EventLog.

Log files: When I moved the latest update into the folder I am running it from I noticed that it is creating a separate log file for each day that it is run, they are I admit only 1kb each but is there any built in limit to their number?
--- End quote ---

Nope, just something I thought might be useful - I was going to have it put the data usage against each session but....

If not, once you decide you have gone as far as you can with the program and do not need possible debug information any more will there be an actual need for them?
--- End quote ---

Nope except purely as a statistical source if anyone wants them.  Maybe I'll stop it creating them unless a certain magic word is enabled, (possibly /rumpelstiltskin or something).

pilgrim:
My drives are all still working and the sun has disappeared (yet again) but I don't think that was your fault.  :D

If you start it after a VPN connection and it can't run rasdial or rasdial throws an error then it won't show the tray icon
--- End quote ---

If VIndicator is run at start-up or as I have it set as a scheduled task is that not avoided?
If rasdial does not run would that not prevent a VPN from connecting, at least in the way that I am using it?  :tellme:
Just trying to understand the technicalities.

The log files are not a big issue, several of the disk cleaning programs I use get rid of them without my changing anything.

Whenever I see log files I am reminded of a weather program I used before I started using sWeather, every time it checked for a change in conditions it created a separate log file, as it ran all the time and checked frequently by the time I discovered what was happening I had quite literally hundreds of them, if I remember correctly they were quite a bit bigger than yours and for some reason all my cleaning programs were ignoring them?

I appreciate there is quite a lot of information that can be picked up from a connection but how often do people check it.
When you started helping me with this I looked at the information that is available through the context menu of NAI, I had never looked at it before and I have never looked at it since.
Mind you, if I do want any usage information I can get it from Networx.

Having logging as an option sounds like a very good idea, I might not use it but I'm sure that some people would.

Personally I'm a great believer in simplicity (there are those who would say I had a head start on everybody else) and I was trying not to complicate things for you.  :)

4wd:
If VIndicator is run at start-up or as I have it set as a scheduled task is that not avoided?-pilgrim (May 29, 2013, 09:11 AM)
--- End quote ---

At startup: Possibly, depends whether a VPN  is set to connect on Windows start and whether that happens before or after startup items get executed.

Scheduled Task: Always after the event since the event has to occur for the Task to trigger.

If rasdial does not run would that not prevent a VPN from connecting, at least in the way that I am using it?
--- End quote ---

I'm not talking about rasdial failing every time, just the time I want, (VIndicator), to use it.

pilgrim:
I'm not talking about rasdial failing every time, just the time I want, (VIndicator), to use it.-4wd (May 30, 2013, 04:14 AM)
--- End quote ---

Sorry, looking at it this morning I realise I was thinking back to when I was using a separate batch file to run each VPN and using rasdial to start them.
The only place that rasdial appears in a batch file now is in the main Internet Toggle file as 'rasdial disconnect', to shut down any PPTP/L2TP VPN that might be running.

I also realised that using VIndicator the VPN's do not require any separate batch files so I have deleted the folder containing them, I should have done that when I changed the shortcuts.  :(

4wd:
v0.3.0.25
Changed: Logging disabled

You may pass it on to whoever wants to play with it, I'm in the process of rewriting it from scratch to get rid of all the hacky bits of code I tacked on as I went but otherwise it's not going to do anything different, (and it'll take a while).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version