Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Use of IE in scheduled scripts doesn't work

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,45061
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Use of IE in scheduled scripts doesn't work
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Use of IE in scheduled scripts doesn't work - 3/27/2007 1:22:22 AM   
  zpeter

 

Posts: 2
Score: 0
Joined: 3/6/2007
Status: offline
Hi,

At work i use CADminTools for Flexlm license monitoring. CADminTools is written in ASP and uses VBScript.
Let me underline that I'm not asking for ASP or IIS help.
I'd like to automate a weekly archiving process by using a scheduled .vbs script. I starting with a script launching IE with the path to the asp page out of the script. This works when I run the script manualy or scheduled as long as a user is logged on the machine or the workstation is at least locked.
Now the problem is that the script should also work when no user is logged on the system(!) but it does no't work.
The script always works when I'm logged on or the workstation is locked. No difference if I run it manually or by the task scheduler.
After finding http://www.microsoft.com/technet/scriptcenter/guide/sas_ent_qpyo.mspx?mfr=true on the internet i tried this but my problem remains.
So I wrote a little test script (code see below).


      
  • test.asp does the same as the block beginnig with 'For testing only, writing the date and time into a file on the webserver.

          
  • lic.asp does some calculation, opens 6 pop ups and writes to a .mdb database file.
Results:
  • The writing to the local 'test.txt' works
  • The writing of the remote test.txt works, too
  • lic.asp + params fails
I guess this might be a permission problem but don't know for sure and i have no idea how to fix this.

I hope somebody has an idea how to fix this.

Cheers
Peter

EDIT: corrected reults, added code of test.asp(VBScript)

< Message edited by zpeter -- 3/27/2007 1:42:16 AM >
 
 
Post #: 1
 
 RE: Use of IE in scheduled scripts doesn't work - 3/27/2007 8:26:08 AM   
  Rischip


Posts: 480
Score: 2
Joined: 3/26/2007
Status: offline
There are several possible problems with your script issue. One of which is security rights. Who's account have you specified when you run the scheduled task? The bigger problem you might be encountering is the fact that the script may be running with the correct permissions, but may not be loading the profile. Also when there isn't a user logged in there is no WINSTA0/DEFAULT DESKTOP created. It gets created when a user logs in.

I would try using PSEXEC from sysinternals to debug your script. You can schedule the task to have PSEXEC run your script. The new version of PSEXEC will allow you to run applications on the winlogon desktop. So you will be able to see it even if there isn't a user logged in. The Caveat is it has to run as system account. In order to do this you must have admin rights. Also you might have to enable write permissions on the directory to IUSR_machinename so anonymous access can write to the file. This may only be needed for debugging since the system account won't authenticate to IIS properly.

http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/PsExec.mspx


Rischip

< Message edited by Rischip -- 3/27/2007 8:58:26 AM >

(in reply to zpeter)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Use of IE in scheduled scripts doesn't work Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts