I have installed Nmap 6.25 and Python 3.3 in my Windows XP SP3 machine. I have written a python script that calls Nmap and writes its output in a file. I have placed the script's shortcut in the Allusers startup folder. When i log in as administrator, the script executes normally. When i log in as a normal user, i can see Nmap starting in the console window but then I get the Runas dialog and nothing gets done unless i manually press OK.

I have disabled the Secondary Logon service but i still get the Runas dialog. Something that puzzles me is that when i re-run the script (as a normal user), no Runas dialog appears and the script executes normally.

Any suggestions on how i can make the Runas dialog disappear on startup?

First of all, there was no Security tab when i right clicked a file to inspect file permissions. This was because my pc belonged to a workgroup. Following Microsoft's directions i enabled the Security tab:

1. Click Start, and then click Control Panel.
2. Click Appearance and Themes, and then click Folder Options.
3. Click the View tab, and then click to clear the Use simple file
sharing [Recommended] check box in the Advanced settings box.

Since the RunAs dialog appeared after the execution of the python script and before the execution of nmap, it was obvious that nmap was the culprit. So, i changed the file permitions of "C:\Program files\Nmap\Nmap.exe" so that the specific user could execute it.

DONE!

Many thanks to Lizz for pointing out the obvious thing that i failed to see.

SOLUTION #2: (Recommended)

Instead of fighting with file permissions, remove shortcut to script from startup folder. Open the console and type:

I'm guessing the shortcut you created in the startup folder was drag'n'drop from the actual script? If so, then I would suggest making a small batch script in the startup folder instead.
–
LizzMar 21 '13 at 4:07

I did the batch script approach but it did not change anything. The RunAs dialog still appears.
–
Don Juan dePythonMar 26 '13 at 17:02

Dumb question: what are the permissions on the shortcut or small batch script? Does it give Users the right to Read & Execute? to Change? If not, then add it and try again. Also, check rights on the NMAP files & folder - same w/Python.
–
LizzMar 27 '13 at 1:50

There was no Security tab when right clicking a file to inspect file permissions. This was because [your] pc belonged to a workgroup. Following Microsoft's directions, [you] enabled the Security tab:

Click Start, and then click Control Panel.

Click Appearance and Themes, and then click Folder Options.

Click the View tab, and then click to clear the Use simple file
sharing [Recommended] check box in the Advanced settings box.

Since the RunAs dialog appeared after the execution of the python script and before the execution of nmap, it was obvious that nmap was the culprit. So, [he] changed the file permissions of "C:\Program files\Nmap\Nmap.exe" so that the specific user could execute it.