Error message when using: RP_Admin=1

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Error message when using: RP_Admin=1

Post by migro » Fri Feb 29, 2008 2:02 am

Hi together,

I´m trying run commandline Tools with given parameters under windows server 2003 sp2 and getting error messages like this, when I'm using "Let>RP_ADMIN=1":
Windows can´t locate "cmd /c Net stop "SQL Server (MyInstance)"".
If I use it without RP_ADMIN=1 all works nice.
Does anybody got a idea why?

Code: Select all

Label>test
   Let>strAction=MyInstance
   Let>RP_ADMIN=1
   Run Program>cmd /c Net stop "SQL Server (%strAction%)"
   Wait>%WParam%
   Run Program>cmd /c Net start "SQL Server (%strAction%)"

GOTO>MacroEnde
regards
migro

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Feb 29, 2008 8:00 am

This works:

Let>RP_ADMIN=1
Run Program>"cmd.exe" /c Net stop "SQL Server (%strAction%)"

The problem is that with all those spaces it didn't know what the application was it was supposed to run and launch with admin. It was trying to find an app called "cmd /c Net stop "SQL Server (MyInstance)"". By putting quotes around cmd.exe it then knows it needs to run cmd.exe as admin and pass the rest of it to it as parms.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Post by migro » Fri Feb 29, 2008 11:25 pm

Dear Marcus,

thanks for the help.

If I use it as you told me, i get several messages to confirm as shown here:

Image

Image

Image

I like to run the macro self-acting, without any interaction of a user.
Do You got any idea how to avoid these messages?
regards
migro

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sat Mar 01, 2008 8:07 am

Make sure you have the LATEST version: 10.021.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Post by migro » Sat Mar 01, 2008 2:15 pm

Dear Marcus,

thanks for the advice.

With V10.021. the first 2 dialogs are gone, but the dialog from the operating-system (execute as ...) still shows up.
regards
migro

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sat Mar 01, 2008 9:44 pm

Don't think there's much we can do about the OS dialog. Don't you normally get this when right clicking and selecting run as admin?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
migro
Macro Veteran
Posts: 152
Joined: Thu Nov 06, 2003 5:23 pm
Location: Germany
Contact:

Post by migro » Sun Mar 02, 2008 12:14 am

If I do it manually yes, thought You got a override mechanism in MacroScheduler to run the macro without userinteraction.

But if not the macro needs to be carried out with a admin-login.

Thanks for the help.
regards
migro

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