Solved

How do I run a shortcut using Task Scheduler?

Posted on 2003-11-10
15
1,300 Views
Last Modified: 2008-02-01
Task Scheduler (Windows XP Pro) will not run a shortcut for me.  I think the problem maybe that it is a VPN connection and a VPN shortcut does not have a specific exe/com/bat etc. program extension.  If there is a way of finding the exe that runs any network connection then that may be the key...

When you use the wizard to browse for program it doesn't let you go into network connections and pick one therefore I dragged a shortcut to my desktop and selected that.  If you do properties on the shortcut it gives you no information as to what the shortcut points to.

Does anyone know how to do this please?

Thanks for any help.
0
Comment
Question by:Robhex
  • 8
  • 5
  • 2
15 Comments
 
LVL 24

Accepted Solution

by:
Kenneniah earned 50 total points
Comment Utility
Even though it's technical not a dial-up rasdial.exe should do this for you. The format would be rasdial.exe ConnectionName
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
You can also specify username and password to it.

USAGE:
        rasdial entryname [username [password|*]] [/DOMAIN:domain]
                [/PHONE:phonenumber] [/CALLBACK:callbacknumber]
                [/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]

        rasdial [entryname] /DISCONNECT
0
 

Author Comment

by:Robhex
Comment Utility
Thank you very much, solved my problem superbly...

Rob.
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
Glad to help!
0
 

Expert Comment

by:etching
Comment Utility
I want to run a Scheduled Task in the background.  That is, without a visible command-shell window on the screen.
I can manually run a shortcut minimized, but I can't get the Task Scheduler to run the shortcut.  What to do?
It's a Tcl script that I want to run on WinNT 4.0.

Thanks,

Eric
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
Hi Eric,
To get answers to this question you should post it as a new question. However, the easiest way to not have a shell show up is to use alternate credentials for the task. If the username you used to schedule the task is not logged in, the window won't be displayed.
0
 

Expert Comment

by:etching
Comment Utility
I didn't post a new question because the rasdial response didn't answer the original point of the question.

Anyway, in the mean time I found out that having Task Scheduler run the "runh.exe" utility freeware program
solved the problem.  It seems to work as I wanted.  Any side effects I should be aware of?

Eric
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
I don't think I can see any side effects that would cause any problems.

"I didn't post a new question because the rasdial response didn't answer the original point of the question."

It doesn't matter whether you thought the answer fit the question or not. It was Robhex's question and it was answered for him. What he was really looking for was a way to schedule a VPN connection and that's what he got. The point it is though that it was HIS points and it was answered to HIS satisfaction. If you want to know more of a solution you need to spend YOUR points as it's not fair to sponge off of his. Also you are off topic, this is a Windows XP forum not NT 4.0.

Don't take this the wrong way, I'm not upset, just trying to explain how EE works a little bit.
0
 

Author Comment

by:Robhex
Comment Utility
I've no problems you "sponging" off my points etching!!!  Just kidding, I hope your problems are solved now too.  EE is a fantastic knowledge base, I use it for work purposes and I might even start paying for the service if I can get my company to shell out...

This isn't a forum for how good EE is and how to use EE so I'll shut up now, sorry and thanks for solving my query.
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
Opps, after rereading what I wrote it sounded harsher than I meant, so sorry for that etching :)

The main thing which I forgot to say, is that posting in a closed question usually won't help you much, since noone browses through closed questions. The only reason Robhex and I read your post is you get an email when someone posts to a question you participated in. It no longer shows up in the waiting to be answered list, so that's really why you should start a new one, so that other people will be able to try and help you.

Robhex - talk about anything you want LOL, I must have been in a bad mood or something yesterday :P Or maybe it was the beer at lunch....
0
 

Expert Comment

by:etching
Comment Utility
Hey no problem...To be honest, I would have posted a new question if I knew there was a distinction between CLOSED
and WAITING TO BE ANSWERED questions (I've seen some posting programs that automatically push replies to a post
to the top of the stack).   Excuse me if I'm blind, but is the question marked CLOSED somewhere on this page?
I didn't see anything, so that's why I posted here...My bad...
And is there a place to see the WAITING TO BE ANSWERED questions?  Sorry, I'm new here :-)

Happy Thanksgiving all!

Eric
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
Yeah it doesn't really say closed, but if it's been answered you'll see a grade in the first post, and one or more of the comments will be marked as accepted or assisted answer.

On the list of topics page it depends which view you are in. In "Expert Mode" there are 2 different lists. One that says Questions awaiting answers and a second one called Previously Answered Questions. In "Normal Mode" there is just the Questions Awaiting Answers.

If you came from a search, then the only way to tell is by looking for the grade or accepted answers. The "Old Look" was a little better for distinguishing. At the top is says Type: and then unlocked for open, and PAQ for previously answered question. If you want to see the old look go to http://oldlook.experts-exchange.com

BTW, is that runh.exe still working good for you? I can't remember how much different NT 4.0's task scheduler was than XP's, but XP's works with most shortcut (lnk files), just usually not with shell shorcuts (ones using CLSID's instead of pointing to a particular file). I just can't remember how well the NT4.0 scheduler handled them.
0
 

Expert Comment

by:etching
Comment Utility
OK, I missed the "Accepted Answer" when I read the question the first time.  I'll post new questions from now on!
Yeah, I'm ran runh.exe from the Task Scheduler a few times already.  Seems to work fine, though my script only takes
a couple seconds to run, so I can't say yet if it would work well for longer scripts.  I couldn't get Task Scheduler to run
the shortcut.  The name of the link is "alert.tcl.lnk".  Maybe it's because I'm running a Tcl file because I get a
"Could not start" when I try to run the filename "alert.tcl.lnk".   Note that running the shortcut manually works perfectly
fine and minimized too.   Also, I'm running on a corporate network, so it's doubtful that I would have access to create
another user account in order to use your suggestion.

Eric

0
 

Expert Comment

by:etching
Comment Utility
Oh, another update...I've been running "runh.exe" from the Task Scheduler every two minutes the past couple days.
Works like a charm with no ill effects (so far anyway)!  Also, the shortcut problem seems to be a bug in NT Task
Scheduler.  I had no problem at all getting NT Outlook 2002 to run a shortcut (thus no need for runh.exe there).

Eric
0
 
LVL 24

Expert Comment

by:Kenneniah
Comment Utility
Cool, thanks for the info. I'll have to remember runh.exe if I run into a similar situation.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now