cant get task from TipsNTricks section to work- ShellExecute

nnCron and nnCron LITE discussion

cant get task from TipsNTricks section to work- ShellExecute

Postby LuckMan212 » Tue, 13 Sep 2005, 01:32

Code: Select all
#( test_shortcut
NoActive
Action:
    5 0 0 Z" c:\temp\cmd.exe.lnk" Z" open" 0 ShellExecuteA DROP
    5 0 0 Z" c:\temp\notepad.exe.lnk" Z" open" 0 ShellExecuteA DROP
)#

this does absolutely nothing on my box. No errors in log either. and Yes I am manually running the task. Using latest beta nncron.
I need to use this functionality so please can you help me get it working.
thanks.
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Postby LuckMan212 » Tue, 13 Sep 2005, 01:42

oh and also script versions did not work either:
Code: Select all
#( test_shortcut_authorized1
NoActive
AsLoggedUser
Action:
    <JScript>
        var WshShell = new ActiveXObject("WScript.Shell");
        WshShell.Run("c:/temp/cmd.exe.lnk");
        WshShell.Run("c:/temp/notepad.exe.lnk");
    </SCRIPT>
)#

fails, it looks like:
Image

and I tried also putting the slashes ( / ) the other way ( \ ) it did not help.... :roll:
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Postby VK » Tue, 13 Sep 2005, 12:10

I'm pretty sure this is easy enough to answer. Read the error carefully: 'Can not find the file'. So, I think you should check the filenames of your lnk-files. Mayby they are just 'cmd.lnk' and 'notepad.lnk'?
CU
VK
User avatar
VK
 
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17

Postby LuckMan212 » Tue, 13 Sep 2005, 12:17

yes thank you I have solved the problem.
as it turns out my shortcut files are ending in ".url" so therein was the problem.... :wink:
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 0 guests