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?
Microsoft's way did not disable RunAs in my system.
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.
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:
Go to Computer Configuration -> Windows Settings -> Scripts (Startup/Shutdown).
In the details pane, double-click Startup.
In the Startup Properties dialog box, click Add.
In the Add a Script dialog box:
Script Name: c:\pythonXX\python.exe Script Parameters: c:\path\to\python\script
Replace pythonXX with the version of python you are using.
Click OK. DONE!