Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Internet Transfer Control && Task Scheduler


Hi,

My program VB script with an Internet Transfer Control
is working ok in the foreground but when I'm using
the task scheduler (WINDOWS 2000 and NT4.0) I'm
getting "Can't connect to remote host". Even when
I'm using the /interactive option at the AT command

Please, Please help me

Ton Gelissen




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Is The Windows Task Scheduler An ActiveX Control And If So How Can I
instantiate it? Sorry if this is an ignorant question.

Thanks



Using Visual Basic To Schedule A Task In Task Scheduler Running Windows 98.
Need to use Visual Basic to schedule a task in Task Scheduler running Windows 98.

Are there API calls to make?

AT commands that work?

Some way to programmatically schedule Task Scheduler on Windows 98?

Terminating Active Internet Connection - Internet Transfer Control
Just wondering if anyone can tell me how to terminate a connection that has been made with the Internet Transfer Control in VB5.

I have tried the CANCEL method but it doesn't seem to do anything.

An Example Scenario

Windows Task Scheduler - Add A Task
Does any body have any idea how to add a task to the windows task scheduler (if its not there already) through a vb program ?

So that a program can be run through the task scheduler...
(By the way, I know how to do it manually, I just want to put a task to the scheduler through a vb program)

Thanks
Ram

Task Scheduler.
Hello.

I found in the following location:
http://www.etasoft.com/schtask/vbcode.htm

an article that talks about creating new scheduled tasks.
It is mentioned there that i should reference a dll called "SchedTask 1.0 Type Library" but i can find it. Where should i look it in? Or how else can i interact with windows task scheduler?

Thanks, Tal.

IE 5.0 TASK SCHEDULER
Has anyone come across VB code to add jobs to "Task Scheduler" through the api. I've only seen C++ code. I know I can use AT commands but they do not support the full set of features in TASK SCHEDULER.
Thanks.

Task Scheduler
Hello everybody.

Can anyone tell me how to use windows task scheduler from VB.

Task Scheduler
I would like to upload files to an ftp site hourly. The app to do this should be run hourly and ended when upload is completed. The problem is creating a scheduled task to run this app. Manual configuration is not an option. Thanks for any ideas

Task Scheduler
I am running a scheduled task (Task Scheduler on win 2k) on a remote server. Is there any class library to access the properties and methods of this "Task Scheduler". I really appreciate your help

Task Scheduler
http://www.vbforums.com/showthread.php?postid=1273788

Task Scheduler
Background:
I'm in the process of developing a task scheduler at work. This application runs on a dedicated workstation. It simply displays the time, incrementing every second. Every second it is also checking an ini file to see if it should call another application or run a backup.

Example:
At 6:00 every day run BlockedReport.exe
At 17:30 every day backup TestDatabase.mdb

I want to make this so it takes up the least amount of system resources. The algorithm I'm thinking of using is this:

First off check to see if seconds = 00. This will ensure that the function is only ran once a minute instead of 60 times a minute.
If it is = 00, then check to see if the task should be run on this day.
If it should be run, then check to see if it should be run at this time.

Here is some sample code (I know that it isn't exactly what I said above yet):

VB Code:
Private Sub tmr_TimerFired() Dim x As Integer, iCount As IntegerDim results() As String   lblTime.Caption = Format(Time, "h:mm:ss")    Call ini.GetSections(INIFile, results())  iCount = UBound(results()) + 1    For x = 1 To iCount      If Format(ini.GetSettingINI(INIFile, "Task" & x, "Time"), "h:mm:ss") = Format(Time, "h:mm:ss") Then            Select Case ini.GetSettingINI(INIFile, "Task" & x, "Status")              Case 1          'Status 1 = Execute File          If ini.GetSettingINI(INIFile, "Task" & x, "Params", "None") = "None" Then            hyp.File Me.hwnd, ini.GetSettingINI(INIFile, "Task" & x, "Path")          Else            hyp.File Me.hwnd, ini.GetSettingINI(INIFile, "Task" & x, "Path"), ini.GetSettingINI(INIFile, "Task" & x, "Params")          End If                Case 2          'Status 2 = Backup File          Call Backup(x)              Case 3          'Status 3 = Backup and Compact DB          Call Backup(x)          Call CompactDatabase(x)                  End Select          End If    Next x    If Format(Time, "n") Mod 15 = 0 Then    If y = 0 Then Call WriteMem    y = 1  Else    y = 0  End If  End Sub


Does anyone have any suggestions, comments, critisims, ideas on how I could do this better?? If you need any more information, just ask. Any help is appreciated.

Thanks,

Mike

VB With Task Scheduler
I have been told that Mathew Gates or Megatron PM are good in that:

how can i use task scheduler with VB?
i want the user inside my application to have the choice to run the program himself each day, or to CHECK AN OPTION INSIDE THE PROGRAM (but how to program it???) that lets the scheduler run the program the next day for example, without any intervention
thanks
terry

Run Vb Pgm Using Task Scheduler
I have a vb program with no forms. It runs from the command line with single argument. It will not run when scheduled. What do I need to do?

Task Scheduler
I have posted this question before but I did not get any response.

I have a server that has several jobs scheduled. I was wanting to mak a app that I could go in and loop through the jobs and disable all or selected tasks. Anyone know how to manipulate the task scheduler?

Thanks
LJ

Is There A Way To Get Plain Text From Microsoft Internet Control Or Transfer Control
is there a way to get plain text from the Microsoft Internet Control or Microsoft Internet Transfer Control



For Example if u go to a page and hit Ctrl A and Then Ctrl C and then open notepad and hit Ctrl V u get plain next with no HTML in it. Can that be done with the Microsoft Internet Control or Microsoft Internet Transfer Control

Task Scheduler Win98
For video capture and sound recording I have written a VB6 program. This program consists actually two programs, 1- TimerSetCap, 2 – TimerCaption. In the TimerSetCap I can select Video or Sound recording/capture and I give the duration of the recording. These values are stored in a data file. From the TimerSetCap prog I start the Win98 Task Scheduler and make the settings for the starting time. At this moment I can switch my computer in Standby modus.
At the given time the Task Scheduler starts the computer and the second program, the TimerCaption which reads the data from the data file and the caption starts for the given time. So far OK.
I like to combine the Task Scheduler in my TimerSetCap program, so I can set all values in one Form.
Questions:
A – Is there a possibility to reach the data of the Task Scheduler and change them. Windows Explorer do not find the *.job (TimerCaption.job) file.
B – Is there an API available which can change Text in a TextBox (Class Name: SysDateTimePick32) of a program which is called with the VB Shell function.

Opening Task Scheduler
Is there a way of opening the windows task scheduler properties window (passing in a current task) ???

Task Scheduler In Windows NT
Hello

I am attempting to amend a task created within windows NT
I know the task is running every 5 mins as I can see that in the error log
Problem is is that I cannot find the task
It just simply isn't showing when I go into task scheduler via my computer
Am I looking in the wrong place or doing anything obviously wrong

Thanks

Damian.

Running VB6 App From MS Task Scheduler
I can't run any VB6 app using the MS Task scheduler.

Anyone know of issues doing this?

Helmar B. Herman, VP ProtoProducts

Task Scheduler Win98
For video capture and sound recording I have written a VB6 program. This program consists actually two programs, 1- TimerSetCap, 2 – TimerCaption. In the TimerSetCap I can select Video or Sound recording/capture and I give the duration of the recording. These values are stored in a data file. From the TimerSetCap prog I start the Win98 Task Scheduler and make the settings for the starting time. At this moment I can switch my computer in Standby modus.
At the given time the Task Scheduler starts the computer and the second program, the TimerCaption which reads the data from the data file and the caption starts for the given time. So far OK.
I like to combine the Task Scheduler in my TimerSetCap program, so I can set all values in one Form.
Questions:
A – Is there a possibility to reach the data of the Task Scheduler and change them. Windows Explorer do not find the *.job (TimerCaption.job) file.
B – Is there an API available which can change Text in a TextBox (Class Name: SysDateTimePick32) of a program which is called with the VB Shell function.

Windows Task Scheduler
How do I open a the windows task scheduler with VB6? I've tried using the "shell" command but apparently the task scheduler is not listed as an executable file. I'm running a Win2K OS.
Help....

How Can You Create A Task Scheduler?
Lets say i want something to run or do something every X minutes.. how can i do that?

Windows Task Scheduler?
Is there any way to control this, i.e. read task
info and create new tasks, via VB?
Thanks, DaveBo

Mail And Task Scheduler
I have a program that is launched by Scheduler on an NT4 server (with Outlook 2000). Outlook only uses one profile and scheduler is set to logon with the UserId that owns that exchange account. The problem is that whenever the program is launched via the scheduler it gives the following error:

"MAPI Failure: valid session ID does not exist"

However, if I run the program while physically logged onto the box it works great.

The logon code that I am using is:

Private Function LogOn() As Boolean

Dim Result As String
Dim HFile As Long

If MapSess.NewSession Then
LogOn = False
Exit Function
End If

On Error GoTo errLogInFail

With MapSess
' Set DownLoadMail to False to prevent immediate download.
.DownLoadMail = False
.UserName = "MS Exchange Settings"
.LogonUI = True ' Use the underlying email system's logon UI.
.SignOn ' Signon method.
' If successful, return True
LogOn = True
' Set NewSession to True and set0
' variable flag to true
.NewSession = True
bNewSession = .NewSession
MapMess.SessionID = .SessionID ' You must set this before continuing.
End With
Exit Function

errLogInFail:
HFile = FreeFile
Open "C:error.log" For Append Access Write Shared As HFile
Write #HFile, Error
Close HFile
Err = 0
Resume Next

End Function


If anyone has any suggestions it would be greatly appreciated. I need to get this thing working and am getting frustrated!

Thanks!

Windows Scheduler Task
Hi all

Can any one help me out. I have a problem while creating the scheduler task.

I can not able to create a task for monthly, But i wanted to create a

schedule task for selected months (eg., Jan, Mar, Jun,Sep).

I am using this API's

Private Declare Function NetScheduleJobAdd Lib "netapi32" (Servername As

Byte, PointerToBuffer As AT_INFO, JobInfo As Long) As Long

AddJob "jai2000", 60000000, 5, 0, 1, "c:abc.bat"

Parameters : (servername,time,day of month, day of week,flag,command)

In day of month, if i give a value it will be considering as day (eg. 2nd of

every months)

But my requirement is (eg. 2nd of Jan,Mar,Sep)

Please let me know if it is possible. It is a very very very urgent

requirement...

Advance thanks.

Regards

Windows Scheduler Task
can i run a vb 6.0 exe that i create , the program basically reads text files and creates new files
as a task in windows scheduler ?

thanks for your help

Task Scheduler Problems
Hello,

I am tring to schedual a vb script with at.exe command but the task is not executed. I did not see any errors in the SchedLgU.txt file (the log file). Any ideas?

Thanks!

How To Add Prog. In Task Scheduler?????
I want my prog. to mail at some predefined schedule... so i want my vb prog. to add itself to task scheduler (at time of installation of prog.) ..... plz help me........

Exposing Task Scheduler API
Hi Folks,

I'm already declaring NetScheduleJobAdd Lib "netapi32.dll" on my application so I can schedule an ActiveX.exe component for later execution. However, I'm finding that the Task Scheduler cannot run the task because the username and password is missing from the job (Win2000 and VB6). I don't see a way to set uname and passwd from the netapi32 library. Is there some other library with the the function I need that can be referenced by VB6? Or I am I going to have to do something with Sleep or Timer?

Thanks,

Troy

Windows Task Scheduler & VB
How to invoke the Functionalities of the Windows Task Scheduler from VB using Windows API

Windows Task Scheduler
Hi everyone,
I am using a VC dll to invoke windows task scheduler. the dll works fine. But when using it on NT/2K OS, we need to set username and passwords for the task to work in the desired manner, for this i used Itask:setaccountinformation method for class itask. Now the dll seems to run fine but i am unable to set username and password still.
Please guide me in this regard
thanx
Tushar M Jain

Internet Transfer Control
Hi,
I would like to ad a PayPal button to my VB6 application.
My web page has the PayPal button with all the http code required (supplied by their web site)
I can't figure out how to embed it on my vb form or in a command button.
I have been trying to come up with something using the Interent Transfer Control but can't seem to get it to work.
If there is a better way? Am I on the right track?
Any help will be apprrciated.
Thanks,
Dwight

Internet Transfer Control HELP!!
I am trying to use Inet in order to retrieve the HTML of some websites, however, for some sites it does not retrieve the full HTML. For example, if you use the OpenUrl method with Yahoo.com, it will not return you the full HTML, but merely a brief part of it that only includes the first graphic.
Here is what I have been doing, and then the html that follows is the partial results that it gives me. Does anyone know why I am only getting a small portion of the HTML, and what I can do to get all of it??? Thanks!


Code:
string = form1.Inet1.OpenURL ("http://www.yahoo.com")

HTML Code:
<html><head>

<title>Yahoo!</title>
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l r (cz 1 lz 1 nz 1 oz 1 vz 1) gen true for "http://www.yahoo.com" r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l r (n 0 s 0 v 0 l 0) gen true for "http://www.yahoo.com" r (n 0 s 0 v 0 l 0))'>
<base href="http://www.yahoo.com/_ylh=X3oDMTB1c2ZmZzF2BF9TAzI3MTYxNDkEdGVzdAMwBHRtcGwDbnMtYmV0YQ--/" target=_top>
<style type="text/css"><!--
.yhmpabd{border-left:solid #4d99e5 1px;border-right:solid #4d99e5 1px;border-bottom:solid #4d99e5 1px;}
.yhmnwbd{border-left:solid #9b72cf 1px;border-right:solid #9b72cf 1px;}
.yhmnwbm{border-left:solid #9b72cf 1px;border-right:solid #9b72cf 1px;border-bottom:solid #9b72cf 1px;}
//--></style>
<script language=javascript><!--
lck='',sss=1091136956;//--></script>
<script language=javascript>
var b,d,l='',n='0',r,s,y;
y=' '+document.cookie+';';
if ((b=y.indexOf(' Y=v'))>=0) {
y=y.substring(b,y.indexOf(';',b))+'&';
if ((b=y.indexOf('l='))>=0) {
l=y.substring(b+2,y.indexOf('&',b));
if((b=y.indexOf('n='))>=0)n=y.substring(b+2,y.indexOf('&',b));
}
}
d=new Date();
s=Math.round(d.getTime()/1000);
r=Math.round(parseInt(n,32)%1021);
if (lck!=l) {
document.write('<meta http-equiv="Expires" content="-1">');
if (location.search.indexOf('r'+r+'=')!=1) {
location.replace('http://'+location.hostname+location.pathname+'?r'+r+'='+s);
}
}
</script>
</head>
<body id=bod topmargin=7 marginheight=7>
<center>
<map name=m><area alt="My Yahoo!" coords="44,0,106,47" href=r/i1><area alt=Finance coords="121,0,170,47" href=r/f1><area alt=Travel coords="192,0,241,47" href=r/t4><area alt=Mail coords="493,0,542,47" href=r/m1><area alt=Messenger coords="558,0,618,47" href=r/p1><area alt=HotJobs coords="634,0,683,47" href=r/hj><area alt=Help coords="699,0,739,14" href=r/hw></map><img width=740 height=48 border=0 usemap="#m" src=http://us.i1.yimg.com/us.yimg.com/i/ww/m6v9e.gif alt="Yahoo!"><!-- SpaceID=0 robot -->
<table border=0 cellspacing=0 cellpadding=11><tr><td align=center nowrap><font face=arial size=-1><table border=0 cellspacing=0 cellpadding=0><tr><td nowrap><font face=arial size=-1> &nbsp;<a href=s/204498><b>Yahoo! Shopping</b></a> - <a href=s/204499>MP3 Players</a>, <a href=s/204500>Digital Cameras</a>, <a href=s/204501>Laptops</a>, <a href=s/204502>Cell Phones</a>, <a href=s/204503>DVD Players</a>, <a href=s/204504>more...</A></font></td></tr></table><!-- SpaceID=0 robot -->
</font></td></tr></table><table cellpadding=1 cellspacing=0 bor

Internet Transfer Control
Hi,

I am making af simple program which reads a file. The first line looks like: ftp://user***@host.com/test.txt

The second line looks like: C: est.txt

The third like looks like the first, the fourth line like the second and so on...

When i use the Microsoft Internet Transfer Control to get the file from the first line and save it on the harddisk with the name of the second line i get a timeout.

Is it not possible to use an url like the first line?

Internet Transfer Control
I'm using the Internet Transfer Control to download a small web page using the following code:

Private Sub Start_Click()
Dim Pwurl As String
Pwurl = "http://www.thepage.com/abcd.html"
Text1 = Inet1.OpenURL(Pwurl, icString)
End Sub

Private Sub CloseForm_Click()
Inet1.Cancel
Unload Me
End Sub


Program compiles and runs correctly but....

After execution of the compiled EXE, I cannot delete it for about 2 minutes because the system says the file is in use!

Checking Task Manager I see status "Not Responding". After 2 minutes or so, the not responding status drops and the task is removed fromTask Manager window.

How do I exit and deactivate whatever is holding this task active??

Any help is appreciated.

Lee

Using Internet Transfer Control
I'm wanting to use the Internet Transfer Control to read the results of a POST command (ie. I want to post the results of a form to a URL and then read the results of the post - see below)

Code:
Inet1.Execute "http://localhost/test/process.asp", "POST", "session_id=" & sSID & "&command=getparam&version=2.0&aicc_data="
I have specified the data to be posted in the [InputData] parameter of the Execute method, but the page receiving the post (process.asp) does not recognise the data as being posted from a form (code below)

Code:
Response.Write Request.Form("session_id") & "<br>"
Response.Write Request.Form("command") & "<br>"
Response.Write Request.Form("version") & "<br>"
Response.Write Request.Form("aicc_data") & "<br>"
I MUST use the Request.Form and not Request.QueryString to read the input.

Any ideas on how I pass these form field values using the Internet Transfer Control?

Thanks

Internet Transfer Control
hello

inet1.OpenURL operates synchronously, which means that code following the method call does not execute until the request is complete.

Any method to over come this delay open consecative openurl request ?

Internet Transfer Control? HELP!
Hey,

I want to build a self-update feature into one of my programs, and I want to use the internet transfer control to do it.... Can anyone tell me where I can get some onfo on how that control works?

Internet Transfer Control
Hi. I'm trying to make a program that can log into a ftp-server and get a file. But when it runs it makes this error after my execute CD: Still executing last request.

I have pasted my code below

With Inet1
.URL = "my url"
.UserName = "my username"
.Password = "my password"
.Execute , "CD www"
.Execute , "GET index.html C:dokumenterftptest.txt"
.Execute , "CLOSE" ' Close the connection.
End With

I would appreciate if someone can help me.

Internet Transfer Control
I'm working on a program that reads through the HTML code of a web page and downloads a certain file type(s) from that page to the user's computer.

The program works fine and is bug-free. The problem is that it's not as fast as it could be.

Originally, I used the "OpenURL" method of the internet transfer control to get the files synchronously (one by one), but I quickly realized that this would be a problem when someone wanted to download, let's say, 20 audio files from a page.

So I ditched that idea and thought I'd put multiple internet transfer controls on the form and use the "Execute" method instead (as it is asynchronous and allows the program to continue after a file is requested).

The program now has the capability of downloading multiple files at one time, but my intuition tells me that the way I went about doing this is not the best, and there is a much quicker and easier way. (If you need to know what I did, specifically, let me know.)

How can I code my program so that it will download multiple files quickly and efficiently?

Internet Transfer Control
Is there a way I can specify what HTTP version to send the message in? Also, is there a way to only send the headers that I *want* to send? Lastly, is there a way I can see the request that the Inet *sent*?

This is what I have in my code:


Code:
inet.Execute "https://domain.com/", "GET / HTTP/1.1", , "Host: "domain.com" & vbCrLf & vbCrLf
I don't even know if what I have is correct, but I've been experimenting for hours and the page that I'm sending the request to keeps spitting out errors. I think the problem is that the Inet is sending extra headers that the server doesn't want (it's picky), or the protocol is being set to HTTP/1.0, when it must be HTTP/1.1.

Thanks in advance,
Jared

Using The Internet Transfer Control
I have red some articles about Internet Transfer Control programming but all examples are for downloading files from web addresses, URL-s.

How can i establish a connection to another computer and download files from it?

How To Use Internet Transfer Control
I want a full help(For every methoard and functions) with examples to use Internet Transfer Control. Where can I get it?

Can I run my program which contains Internet Transfer Control on all computers?

Internet Transfer Control
This is a really cheeky question, I only have vb 2005 express edition because it is free from microsoft, an am at the moment, and for the next three months cannot get to a normal version, therefore can not use the inet control. I was wondering if someone could write a basic program that allows you to type a web address in, say www.google.com and searches the text of the page for the $ sign, then lists all the phrases with it in (phrase like from the space before to the next space - "a $1000 dollars is a lot" would become "$1000")
Its not that tricky i dont think, but i would really appreciate it if someone could help
Thanks

Alex

Internet Transfer Control
Hi created an script that visits a page thru proxy

but it's not changing my proxy address

can any help me with this ?

Internet Transfer Control
hello

OpenURL operates synchronously, which means that code following the method call does not execute until the request is complete.

Any method to over come this delay ?

Internet Transfer Control
with the microsoft internet transfer control im using the OpenURL method to download a webpage. Is there anyway I can get the size of this webpage (just the HTML code, not the images or anything else) and how much I have downloaded so far so I can create a progress bar for how much the it has been downloaded so far?

Internet Transfer Control Help
I have a problem here...


VB Code:
Inet1.Execute [some ftp url], "CD example_dir/"    Inet1.Execute , "PUT " & SomeFile & " /" & SomeFile


Apparently the CD command takes too long a time to complete and hence the next statement (PUT) is executed, resulting in an error (number 35764: still executing last request)... how do I resolve this error? Many thanks in advance. This error appears when I use the GET command too...

MS Internet Transfer Control.
Inet isn't working for me:

Text1.Text = Inet1.OpenURL("http://www.vbforums.com/index.php", vbString)

I've tried it with a few other sites also and it just keeps timeing out. Any idea's?

Copyright © 2005-08 www.BigResource.com, All rights reserved