General Discussion
  >> Fibre Broadband


Register (or login) on our website and you will not see this ad.


Pages in this thread: 1 | 2 | 3 | [4] | 5 | 6 | 7 | 8 | (show all)   Print Thread
Standard User deleted
(deleted) Mon 11-Mar-13 21:09:43
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: deleted] [link to this post]
 
Odd that. More suggestions here http://serverfault.com/questions/9038/run-a-bat-file...
Standard User deleted
(deleted) Mon 11-Mar-13 22:08:18
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: deleted] [link to this post]
 
I just get ERROR: Access is denied when using SYSTEM as the username on my W7 system (when already logged in to Windows with username & password).

That looks like the same site that I firstly got the idea to use the shortcut method from, latterly cribbing from & slightly adding to the VBS script method.
Standard User R0NSKI
(experienced) Mon 11-Mar-13 23:04:46
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: deleted] [link to this post]
 
I also get the error Access is denied when trying this in W7, I tried this example taken from http://technet.microsoft.com/en-us/library/bb490996....

schtasks /create /tn "My App" /tr c:\apps\myapp.exe /sc monthly /d 1 /ru "System"

I believe I did try using the system account whilst writing the editor, but didn't have any joy.

Googling doesn't reveal an answer, apart from using the old AT command from XP, which I don't think is much use, if any for Vista onwards.

Edit. It must be possible as I do have several scheduled tasks set to run under the system account

Edited by R0NSKI (Mon 11-Mar-13 23:06:40)


Register (or login) on our website and you will not see this ad.

Standard User R0NSKI
(experienced) Mon 11-Mar-13 23:37:04
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: R0NSKI] [link to this post]
 
In reply to a post by R0NSKI:
Edit. It must be possible as I do have several scheduled tasks set to run under the system account


Quoting myself, how bad is that?

Anyway I have just created a scheduled task to run under the system user account.

I exported the original task, which creates an XML file.

I then edit this line <UserId>Rons-PC\Ron</UserId> and change it to <UserId>S-1-5-18</UserId>

Then delete the <LogonType>Password</LogonType> line and then import it.

Either delete the existing task, or rename the xml file prior to importing it.

I now have a scheduled task to run under the system account smile

This will take quite a bit of work to implement in the editor, but it should in theory do away with the username and password entry for Vista onwards, and of course means the HG612_Stats.exe can be run directly.

See this article to find out what the S-1-5-18 means.

Standard User R0NSKI
(experienced) Mon 11-Mar-13 23:48:21
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: deleted] [link to this post]
 
In reply to a post by Bald_Eagle1:
The delay can be set to zero (ideal if only running one instance - i.e. a default installation).

However, for testing purposes (or possibly even used for backup purposes), I usually also have another instance running via a separate ini file, delayed by 30 seconds.

So, for the time being at least, I don't plan to disable or ignore any delay settings as I (& maybe others) have a use for them.


Ah yes, didn't think of that, although we put in the instructions that the delays were ignored when run from the scheduled task, but it should be that the snapshot delay is ignored.

Standard User deleted
(deleted) Tue 12-Mar-13 06:54:05
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: R0NSKI] [link to this post]
 
In reply to a post by R0NSKI:
Ah yes, didn't think of that, although we put in the instructions that the delays were ignored when run from the scheduled task, but it should be that the snapshot delay is ignored.


The snapshot (HG612_current_stats.exe) delay IS ignored if it is being run via HG612_stats.exe.

12/03/2013 06:00:05.120 - After checking for RESYNC or SCHEDULED events, Delay_snapshot_data_harvest_seconds = 0



If it is run manually, it checks if HG612_stats.exe is also running. If it is, it waits for it to complete before continuing, using any delay as intentionally set in the ini file.

**************************************************
* *
* Gathering Snapshot Statistics from the modem *
* *
**************************************************

The local time is: 06:50:00.997

There are 1 instances of HG612_stats.exe running. Please wait for it to complete
*****


HG612_stats.exe has now completed
HG612_stats.exe is NOT running

Temp File CURRENT-ISRUNNING-065003-961 was created

Creating log file Plink_20130312-0650.log


Delaying snapshot data harvesting by 10 seconds to avoid clashes with any other scheduled
data harvesting tasks
Standard User StephenTodd
(committed) Tue 12-Mar-13 08:00:54
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: deleted] [link to this post]
 
Maybe the command line could simply consist of something on the lines of:-

cscript ""D:\Temp\HG612_Modem_Stats\Scripts\HG612_stats.VBS""

That worked for me, but gave a flash of a command prompt when run from Task Scheduler.

The whole thing is certainly quite confusing. b.t.w. the only reason I was testing command lines involving 'OpenWith.exe' is that Task Scheduler was using it to launch 'HG612_stats.VBS' . At least to try to launch it, but failing due to the hidden interaction. I didn't have to be quick to discover that with Process Hacker, as once the first instance was launched it hung around indefinitely.

--
Moved (with trepidation turned relief) to BT Infinity 2 for upload speed. Happy BE user for several years.
Standard User R0NSKI
(experienced) Tue 12-Mar-13 08:08:03
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: StephenTodd] [link to this post]
 
I've worked out how to create a task which runs using the system account, this means we will be able to run the exe, thus not requiring the vbs script for Vista onwards, it also means no need to supply a username or password.

I'll try and alter the editor this week, and then let you have a copy to test if you wouldn't mind?

Edited by R0NSKI (Tue 12-Mar-13 08:09:19)

Standard User deleted
(deleted) Tue 12-Mar-13 08:17:15
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: StephenTodd] [link to this post]
 
Maybe a combination of //B & //Nologo in the command line would cure that?

See the info in the link that I provided earlier for details on what these switches do.

Alternatively, RONSKI's method may be the answer.

Edited by deleted (Tue 12-Mar-13 08:20:04)

Standard User R0NSKI
(experienced) Wed 13-Mar-13 00:05:00
Print Post

Re: Huawei HG612 Stats & Graphing Programs for Windows Users


[re: deleted] [link to this post]
 
Well, I've been trying all night, and whilst I can get XP to run the task under the system account. I can not get SCHTasks to import an XML file to run under the system account.

I can do it from a command prompt, starting the cmd window with Run As Administrator, but that cause further problems.

Strange how I can just import the task from within task scheduler and it works fine.

Going to have to find another way around it for Windows 8.

Pages in this thread: 1 | 2 | 3 | [4] | 5 | 6 | 7 | 8 | (show all)   Print Thread

Jump to