  | 
			
				SoftTree Technologies 
				Technical Support Forums
			 | 
		 
		  | 
	 
	 
	
	
	
		
	
	
	
		| Author | 
		Message | 
	 
	
		
			jayd20 
			 
			
  
			
			
				Joined: 19 Sep 2012 Posts: 1 Country: United Kingdom | 
			 
			  
		 | 
		
			
				  RUNAS - Error #3 Null | 
				     | 
			 
			
				I am trying to use the following to add the logged on user to local admins
 
 
runas mydomain\adminuser password "cmd /c net localgroup administrators %username% /add"
 
 
I get this back
 
 
Logging in as mydomain\adminuser..
 
Setting user environment...
 
Error #1314 loading user profile! Error ignored
 
Logged in.  Impersonating...
 
Starting process cmd /c net localgroup administrators correctusername /add...
 
Error #3: (null)
 
 
The user account thats logged in has no admin rights, and I want to use this as part of a scripted installation process.  Ie image process finishes user logs on with credentials - this runs to add them to local admin and then a final reboot to finish it all off.
 
[/code]
  | 
			 
		  | 
	 
	
		| Wed Sep 19, 2012 8:41 am | 
		          | 
	 
	
		  | 
	 
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7992
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				The error indicates that the specified process couldn't be started. I suggest checking first if any process can be started, for example,
 
 
runas mydomain\adminuser password "cmd /c echo %username%" 
 
 
if that works, then dig into the specific command. If that doesn't, check Windows security event log for the associated messages, perhaps they can shed some light.
 
By the way you don't need cmd /c to start net.exe, net.exe is a program not a DOS command.
  | 
			 
		  | 
	 
	
		| Wed Sep 19, 2012 11:06 am | 
		          | 
	 
	
		  | 
	 
	
		 | 
	 
 
  
	 
	    
	   | 
	
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
  | 
   
 
		 | 
	 
	  |