Page 1 of 1 1
Topic Options
#193534 - 2009-04-22 01:00 AM Using runnas.exe in script
Curious Offline
Getting the hang of it

Registered: 2004-02-16
Posts: 61
I've been looking at some threads, one where the introduction of runnas.exe was discussed through several pages.

Also I've read runnas with parameters

The last one is doing exactely what I want to do:

implement the /quiet switch into the runnas execution.

I've tried every possibility (I think) I first thought that ver 1.14 of runnas.exe was an old one, but it seems this is the last?

The syntax in the script is as follows:
-----------
$winpath = "c:\delnvc.exe /quiet"
$user = "/user:jen"
$pass = "/pass:xxxx"
$runaspath = "c:\runnas.exe" +' $user' + '" $winpath"' + ' $pass'

Shell $runaspath
----------
The syntax seems to work, no errors, but the delnvc /quiet doesn't appear as a process in the overview, and doesn't run.

If I run the command directly from the cmd, the process appear in the process-overview.

I've tried with and without the /quiet- bit in $winpath, instead using it in the $runpath (as suggested as a solution in the thread mentioned above), like this:
----------
$winpath = "c:\delnvc.exe"
$runaspath = "c:\runnas.exe" +' $user' + '" $winpath /quiet"' + ' $pass'
----------
But the same problem

If I run the runnas directly from cmd like this:
--
runnas.exe /user:jen "c:\delnvc.exe /quiet" /pass:xxxx
same thing happens: No errors, but the process doesn't start
--

If I remove the /quiet in that last sentence: like this:
--
runnas.exe /user:jen-265-6910P\jen "c:\delnvc5_1.exe" /pass:xxx
--
then everything works as intended. But since it doesn't run in the backgroud, it isn't working like I want.

What am I doing wrong, anybody??
Or isn't it possible to make the script do what I want?????

Regards Jon
_________________________
I was placed on earth to do a job. Right now I have so much to do, I will never die..

Top
#193535 - 2009-04-22 01:08 AM Re: Using runnas.exe in script [Re: Curious]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Your link does not appear to be correct. I think you meant this one.
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=189607#Post189607

I've sent an email to Shawn to see if he can stop by and clarify things or not.

Link to main discussion is here:
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=154040#Post154040

Top
#193545 - 2009-04-22 04:23 PM Re: Using runnas.exe in script [Re: NTDOC]
Curious Offline
Getting the hang of it

Registered: 2004-02-16
Posts: 61
I've dug a bit deeper into the problem today, and the solution so far seems to be:
- The delnvc.exe must be on local disk at the computer (not using unc-path)

- I tried using authentication through a user on the domain, instead of using a local admin on the computer.

To sum up:
When the exe-file is placed locally on the computer, along with using a local admin (eg. @wksta\administrator) everything works ok.

Then I guess I gotta make a script which generates a locally user with admin-privileges to use in the script.

Jon
_________________________
I was placed on earth to do a job. Right now I have so much to do, I will never die..

Top
#193550 - 2009-04-22 10:10 PM Re: Using runnas.exe in script [Re: Curious]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Well I can understand the file maybe needing to run locally on the box, but so far I've never ran into an application or executable that would not run with a Domain Admin account.
Top
#193565 - 2009-04-23 02:55 PM Re: Using runnas.exe in script [Re: NTDOC]
Curious Offline
Getting the hang of it

Registered: 2004-02-16
Posts: 61
My mistake:

The computer where I developed the script had deleted the 'domain admin' in the local administrator-group.

This caused all the problems.

The script is now completed, and does what I want.

Jon
_________________________
I was placed on earth to do a job. Right now I have so much to do, I will never die..

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.054 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org