Start up macro

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Dolan
Newbie
Posts: 5
Joined: Fri Jan 10, 2003 11:59 am

Start up macro

Post by Dolan » Mon Sep 08, 2003 4:29 pm

Hi all. Is it possible to make so a macro runs automaticly when windows start? Just so I don't have to open the program and choose run macro.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Sep 08, 2003 4:42 pm

Hi,

Yes, there are a number of ways to do this:

1) If Macro Scheduler already runs on startup just edit the macro properties click the Run When tab, click Advanced and check 'Run Immediately Anyway' under 'When System Restarts...'.

2) This one will work whether or not Macro Scheduler runs on startup. Make a shortcut to the macro in your Startup folder, two ways to do this:

i. c:\program files\mjt net ltd\macro scheduler\msched.exe macroname
(or ...msched.exe filename.scp)

ii. If during setup you allowed the installer to create file associations for .scp files, just set the shortcut to:
c:\bla bla bla\yourscriptfile.scp

3) If you have the PRO version compile the script to an executable and make a shortcut to this in the Startup folder.
MJT Net Support
[email protected]

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Sep 08, 2003 4:55 pm

Easy to do. There are a number of ways. Here are three:
A.
1. Right click on the macro title, then left click on Desktop Shortcut. This will place a Shortcut icon on your Desktop
2. Move the shortcut icon from your Desktop into your StartUp Folder: C:\WINDOWS\Start Menu\Programs\StartUp

B.
1. Copy the macro script (*.scp) from its folder (C:\Program Files\MJT Net Ltd\Macro Scheduler)? into your StartUp Folder: C:\WINDOWS\Start Menu\Programs\StartUp

C.
1. Right click on the macro title, then left click on Properties.
2. Go to the tab for Run When.
3. Click on Advanced Options.
4. In the section for Recovery, activate the button for "Run Immediately Anyway"
5. Click OK to close Advanced Options.
6. Click OK to close Properties.
Hope this helps................good luck,
Bob

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Sep 08, 2003 4:56 pm

Wow that's 5 ways in total now :-)
MJT Net Support
[email protected]

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Sep 08, 2003 5:53 pm

Four more? :?: :?: :?: :?:
I suppose we could also add the *.scp or compiled version to windows.ini file
on the :idea: Load line, or
on the :idea: Run line.

OR

:idea: Edit the Registry, adding a new string value to Run:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

OR

:idea: Add a batch file to StartUp folder with
"C:\Program Files\Path\msched.exe" MacroName

Just a quick reactionary thought..............Hope it helps......

Guest

Post by Guest » Tue Sep 09, 2003 12:41 am

Hi, according to the HELP file, an example was provided as follows:
RegistryWriteKey>HKEY_CURRENT_USER,MyStuff,MyName,Fred Bloggs

So, following Bob's suggestion, would statement like this would work? (did not have the courage to test it without asking first, lol). And this is for winXP pro:

RegistryWriteKey>HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Run ,MSChedPro,C:\Work\MyEXE.exe

Thanks for advise.

Dave1

Post by Dave1 » Tue Sep 09, 2003 12:44 am

Oops,

Or with Options:

RegistryWriteKey>HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Run,MSChedPro,"C:\Work\MyEXE.exe /HIDE /NOSYSTRAY"

Thanks again,

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Sep 09, 2003 12:59 am

I think you are talking about the RegistryWriteKey>
command? That wouold typically be used on the fly to modify registry settings. Not to be used here. It would be much easier to manually edit the registry than to write the one time lines of code.

I am talking about a one time manual change to the registry.

But if you are not comfortable there, stay away......there are many other ways listed here to start automatically.

kmorse
Newbie
Posts: 6
Joined: Tue Sep 23, 2003 4:28 pm

Post by kmorse » Tue Sep 23, 2003 9:51 pm

I've been through the forums and haven't found a specific answer to this one but this looks like at least a similar issue.

I have written a script that will shut down windows (last line) and give users five minutes of warnings. This is intended to run at 3 a.m. each day when, theoretically no one is working.

I have put this in the startup folder of a PC and restarted the machine and logged on. The macro begins running immediately, no matter what time of day it is.


Message>Shutdown will occur in five minutes
Wait>60
Message>Shutdown will occur in four minutes
Wait>60
Message>Shutdown will occur in three minutes
Wait>60
Message>Shutdown will occur in two minutes
Wait>60
Message>Shutdown will occur in one minute
Wait>30
Message>Shutdown will occur in thirty seconds
Wait>30
ShutDownWindows>4

This happens no matter what other scheduler settings I apply: number of days per week, repetition, recovery, etc.

I'm using ver. 7.2.038 on Windows 2000

Am I missing something obvious here?

Thanks in advance for any guidance you can provide.

Keith

Lumumba

Post by Lumumba » Tue Sep 23, 2003 10:17 pm

Looks like you wanna reinvent the weel ... :wink:

ActiveSaver for Windows XP/2k/NT/Me/98/95 (Freeware)
- has been replaced with ActiveExit (Shareware).

Attention system administrators: do users of your network
forget to log off before leaving? ActiveSaver may be of
help: you can set it up as a screen saver, and when the time
is up, ActiveSaver would logoff, restart, or even shut down
the computer. You can make it display a warning message before
performing the action, or run a program (for example, to clean
the system up after the last user).

I've googled for the freeware and have found it on a hungarian webpage !

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Sep 23, 2003 10:22 pm

This is your problem:
I have put this in the startup folder of a PC and restarted the machine and logged on. The macro begins running immediately, no matter what time of day it is.
Don't put the macro script in the Startup folder. Anything that is in the startup folder will run right away.

What you want to put in your startup folder is a shortcut to msched.exe, like "C:\Program Files\MJT Net Ltd\Macro Scheduler\msched.exe"

In Macro Scheduler, open the properties of the script. Go to the Tab for Run When, and enter your days/times. Put check marks in Monday through Sunday. In the Time section, enter 3:00, no repeats. OK your way out.

Hope this was helpful...................good luck,
Bob

kmorse
Newbie
Posts: 6
Joined: Tue Sep 23, 2003 4:28 pm

startup macro

Post by kmorse » Tue Sep 23, 2003 10:23 pm

Well, I guess I am trying to reinvent the wheel -- after paying 153 bucks for the whelel-invention kit. :D

So ... why doesn't the macro run when I schedule it to?

Lumumba

Post by Lumumba » Tue Sep 23, 2003 10:27 pm

Here we go ...

ActiveSaver

FYI. File will be offered for download automatically (windows standard). Not necessary to be able to read hungarian :D

kmorse
Newbie
Posts: 6
Joined: Tue Sep 23, 2003 4:28 pm

Post by kmorse » Tue Sep 23, 2003 10:32 pm

Do I need to put Macro Scheduler on every machine I install this macro on if I have converted the macro into an .exe file?

Lumumba

Post by Lumumba » Tue Sep 23, 2003 10:32 pm

If you use that tool (freeware) it won't cost you an additional cent.

But it could save you live time (those which you won't find anywhere to buy, remember this while you're getting older - day by day by day by ...)

Work smart - not hard.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts