Jump to content

RunAsSet on PC and on notebook with XP SP2


Recommended Posts

Hello,

I did not find the solution on this forum, could you help me ?

I have a simple script with the Runasset command :

RunAsSet("toto","","toto")

Run("d:\notepad.exe")

The user toto is a local account.

On my PC this script is ok and on my notebook HP the script is not ok and I have an error : unable to execute the external program.

When I remove the line RunAsSet on the notebook, it's ok.

The two PC have Windows XP SP2, with the same version of AutoIt.

I don't understand the difference.

Did you encounter this problem ?

Thank you for your help.

Toomaya

Link to comment
Share on other sites

error : unable to execute the external program.

a lot of time you need to include the working directory.

Ex:

Run("d:\notepad.exe", @TempDir)
or may be on your notebook you have notepad.exe on drive C:\ Edited by Danny35d
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

RunAsSet("toto","","toto")

Run("d:\notepad.exe")

Either the username and password are different on your notebook or notepad.exe is not located in d:\

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

I try also with the working directory. I try also with the notepad.exe on c:\windows.

On my notebook, I have well the notepad.exe on d:\ and c:\windows.

I read some share that I am not alone to have this probleme on notebook but I do not find any more the article.

If you have another ideas.

Thank you for helping me.

Toomaya

PS : my english is not good, sorry.

Link to comment
Share on other sites

  • Moderators

Do either of these work?

Run('"' & @WindowsDir & '\Notepad.exe"')
If Not ProcessWait('notepad.exe', 5) Then
    Run('"' & @SystemDir & '\Notepad.exe"')
EndIf

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Do either of these work?

Run('"' & @WindowsDir & '\Notepad.exe"')
If Not ProcessWait('notepad.exe', 5) Then
    Run('"' & @SystemDir & '\Notepad.exe"')
EndIf
I try your proposition but that does not work.

I join the error message below :

>Running:(3.1.1.0):C:\Program Files\AutoIt3\autoit3.exe "C:\test.au3"

C:\test.au3 (9) : ==> Unable to execute the external program.:

Run('"' & @WindowsDir & '\Notepad.exe"')

Le service ne peut pas être démarré parce qu'il est désactivé ou qu'aucun périphérique activé ne lui est associé.

Thank you.

Toomaya

Link to comment
Share on other sites

  • 2 weeks later...

Please make sure your service "secondary logon" running on your notebook.

Hello,

I did not find the solution on this forum, could you help me ?

I have a simple script with the Runasset command :

RunAsSet("toto","","toto")

Run("d:\notepad.exe")

The user toto is a local account.

On my PC this script is ok and on my notebook HP the script is not ok and I have an error : unable to execute the external program.

When I remove the line RunAsSet on the notebook, it's ok.

The two PC have Windows XP SP2, with the same version of AutoIt.

I don't understand the difference.

Did you encounter this problem ?

Thank you for your help.

Toomaya

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...