Interactive session the easy way

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
dobbelina
Posts: 6
Joined: Fri Dec 28, 2012 12:41 pm

Interactive session the easy way

Post by dobbelina » Sat Jan 12, 2013 12:39 am

Hi all!

I noticed that the PRINT command doesn't work well when running scripts from the task scheduler.
The reason for that is because it's running in batchmode.
http://wiki.imacros.net/Windows_Logon_Types

What you want is an interactive session.
Here's how, the easy way without the annoying RDP stuff:

Download PsExec from Microsoft here:
http://technet.microsoft.com/en-us/sysi ... 97553.aspx

Drop the executable into your system32 folder (or other executable path)

Using notepad, create a new file with the following text. Save as C:\runtask.cmd

Code: Select all

imacros -macro YourMacroToRun
1.Using the Start menu, type 'Task Scheduler'
2.Right click on the 'Task Scheduler' application and select 'Run as administrator'
3.Using the 'Action' pane select 'Create Task'
4.Under 'Name' enter an appropriate name (for example, "Run My Macro")
5.Click on the Change User or Group button
6.Enter the name of Users and click OK
7.Select the 'Triggers' tab
8.Click on the 'New' button
9.Enter in the appropriate time (for example, daily - 6pm)
10.Select the 'Actions' tab
11.Click on the New button
12.Under Program/script enter psexec
13.Under Add arguments enter -i C:\runtask.cmd
*(I added the -i switch, opposed to the picture below as i think it's correct)

Image

14.Click 'OK'
15.You can confirm the settings by right clicking on the new task and selecting 'Run'

If setup correctly the application will run at the specified time (assuming the computer is turned on and a user is logged on). The application will appear on the screen for the logged on user.

*All credit for this info goes to Adrian at mockbox.net:
http://www.mockbox.net/windows-7/473-wi ... eractively
Last edited by dobbelina on Sun Jan 13, 2013 5:05 am, edited 1 time in total.
dobbelina
Posts: 6
Joined: Fri Dec 28, 2012 12:41 pm

Re: Interactive session the easy way

Post by dobbelina » Sat Jan 12, 2013 3:23 am

I found a great little freewareutility that definitively gives you an interactive session, as it doesn't
start iimrunner in batchmode.
Only 828k in size, no install needed, it even creates a batchfile for you that you can put in
the autostartfolder so it starts when you reboot automatically:
http://www.dennisbabkin.com/wosb/
Tom, Tech Support
Posts: 3481
Joined: Mon May 31, 2010 4:59 pm

Re: Interactive session the easy way

Post by Tom, Tech Support » Sat Jan 12, 2013 2:08 pm

Hi dobbelina,

Thanks for the tips! I've added a link to this post to the iMacros Wiki.
Regards,

Tom, iMacros Support
Post Reply