Runas exited on with error code 1

Runas exited on with error code 1 1radminr_server.exe /pass:pass /port:port /install /silence /save» Предложение ввести пароль выводится, но вводить не дает, тут же завершение без останова, естественно сервис не устанавливается. Причем если делать это локально, то все работает! Попробовал и через PsExec и на конструкцию вида: PsExec Удаленная_машина -u administrator -p pass c:progra 1radminr_server.exe […]
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Dmi3yD

Цитата:

нужно установить на удаленных машинах в сети RAdmin

Чёй-то я не понял. Судя по этому:

Цитата:

c:progra

1radminr_server.exe

он уже установлен.

Добавлено:
Через telnet не пробовали?

Добавлено:
Если уже установлен и нужно запустить, то можно попробовать через запуск службы:

Источник

hello, i tried to understand how to use runAs with psexec but i always get:
«Starting cmd on X . n X. ing to Y.
cmd exited on Y with error code 0.

and i didnt get the shell.

i’m using command:

JetBrains.runAs.exe -p:[PASS] -u:[DOMAIN][USER] PsExec.exe [Destination IP] cmd

The text was updated successfully, but these errors were encountered:

@Th3LionH3ad could you add ‘-l:debug` and attach the output?

1AppDataLocalTemp» (from API results) DEBUG: SET «TMP=C:UsersADMINI

1AppDataLocalTemp» (from API results) DEBUG: SET «USERDOMAIN=SA-Computer» (from API results) DEBUG: SET «USERDOMAIN_ROAMINGPROFILE=SA-Computer» (from API results) DEBUG: SET «USERNAME=Administrator» (from API results) DEBUG: SET «USERPROFILE=C:UsersAdministrator» (from API results) DEBUG: SET «windir=C:windows» (from API results) DEBUG: Environment::Override DEBUG: Environment::Copy environment variables from base environment DEBUG: SET «=::=::» (set value) DEBUG: SET «=C:=C:Test» (set value) DEBUG: SET «=ExitCode=FFFE795D» (set value) DEBUG: SET «=F:=F:» (set value) DEBUG: SET «ALLUSERSPROFILE=C:ProgramData» (set value) DEBUG: SET «APPDATA=C:UsersAdministratorAppDataRoaming» (set value) DEBUG: SET «CommonProgramFiles=C:Program FilesCommon Files» (set value) DEBUG: SET «CommonProgramFiles(x86)=C:Program Files (x86)Common Files» (set value) DEBUG: SET «CommonProgramW6432=C:Program FilesCommon Files» (set value) DEBUG: SET «COMPUTERNAME=SA-Computer» (set value) DEBUG: SET «ComSpec=C:windowssystem32cmd.exe» (set value) DEBUG: SET «DriverData=C:WindowsSystem32DriversDriverData» (set value) DEBUG: SET «FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer» (set value) DEBUG: SET «FPS_BROWSER_USER_PROFILE_STRING=Default» (set value) DEBUG: SET «HOMEDRIVE=C:» (set value) DEBUG: SET «HOMEPATH=UsersAdministrator» (set value) DEBUG: SET «LOCALAPPDATA=C:UsersAdministratorAppDataLocal» (set value) DEBUG: SET «LOGONSERVER=\SA-Computer» (set value) DEBUG: SET «NUMBER_OF_PROCESSORS=4» (set value) DEBUG: SET «OneDrive=C:UsersAdministratorOneDrive» (set value) DEBUG: SET «OS=Windows_NT» (set value) DEBUG: SET «Path=C:windowssystem32;C:windows;C:windowsSystem32Wbem;» (set value) DEBUG: SET «PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC» (set value) DEBUG: SET «PROCESSOR_ARCHITECTURE=AMD64» (set value) DEBUG: SET «PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel» (set value) DEBUG: SET «PROCESSOR_LEVEL=6» (set value) DEBUG: SET «PROCESSOR_REVISION=3a09» (set value) DEBUG: SET «PROG27B48B2C051=1» (set value) DEBUG: SET «PROG27B48B2C056=1» (set value) DEBUG: SET «ProgramData=C:ProgramData» (set value) DEBUG: SET «ProgramFiles=C:Program Files» (set value) DEBUG: SET «ProgramFiles(x86)=C:Program Files (x86)» (set value) DEBUG: SET «ProgramW6432=C:Program Files» (set value) DEBUG: SET «PROMPT=$P$G» (set value) DEBUG: SET «PSModulePath=C:Program FilesWindowsPowerShellModules;C:windowssystem32WindowsPowerShellv1.0Modules» (set value) DEBUG: SET «PUBLIC=C:UsersPublic» (set value) DEBUG: SET «SESSIONNAME=Console» (set value) DEBUG: SET «SystemDrive=C:» (set value) DEBUG: SET «SystemRoot=C:windows» (set value) DEBUG: SET «TEMP=C:UsersADMINI

1AppDataLocalTemp» (set value) DEBUG: SET «TMP=C:UsersADMINI

1AppDataLocalTemp» (set value) DEBUG: SET «USERDOMAIN=SA-Computer» (set value) DEBUG: SET «USERDOMAIN_ROAMINGPROFILE=SA-Computer» (set value) DEBUG: SET «USERNAME=Administrator» (set value) DEBUG: SET «USERPROFILE=C:UsersAdministrator» (set value) DEBUG: SET «windir=C:windows» (set value) DEBUG: Environment::Override environment variables from source environment DEBUG: Environment::CreateFormList DEBUG: Environment::Apply DEBUG: ::CreateProcess DEBUG: Runner::Run failed DEBUG: Runner::Run error code: 3 DEBUG: Runner::Run error description: The system cannot find the file specified. DEBUG: Runner::Run finished DEBUG: main::Run finished DEBUG: main::Create resultsJetBrains RunAs x64 1.0.0.061 Copyright (C) 2017 JetBrains. All rights reserved. Runs a process under the specified windows user account. Argument(s): -l:debug psexec \10.10.0.100 cmd Settings: user_name: domain: working_directory: C:Test exit_code_base: -100000 integrity_level: auto inheritance_mode: auto show_mode: hide self_testing: 0 executable: psexec command_line_args: \10.10.0.100 cmd Error code: -100003

Источник

Can anyone point me to the error codes of RunAs or Run?

Recommended Posts

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!

Sign in

Already have an account? Sign in here.

Recently Browsing 0 members

No registered users viewing this page.

Similar Content

I have a script that seems to launch perfectly fine with IECreate, however, I want to launch the Browser and a specific URL with the RunAs command. I fairly new to AutoIT and wanted to know if someone can point me in the right direction.
Local $surl = «http://somewebsite.com/DODA/admin/job.aspx»
Local $oIE = _IECreate($sURL)
The above launches the website correctly with the correct URL, however, I have tried the below and this fails to load and browser?
#include
;========================
$oSleep = «200»
Local $surl = «http://somewebsite.com/DODA/admin/job.aspx»
Local $oIE = RunAs($args(«username»), $args(«domain»), $args(«logonpassword»), «», «C:Program Files (x86)Internet Exploreriexplore.exe http://somewebsite.com/DODA/admin/job.aspx»)
_IELoadWait($oIE)

I get the following error back?
—> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidDataType
—> IE.au3 T3.0-2 Error from function _IEGetObjById, $_IESTATUS_InvalidDataType
—> IE.au3 T3.0-2 Error from function _IEGetObjById, $_IESTATUS_InvalidDataType

Hello,
You guys helped me years ago to address logging in with a different account than the user. I have sense modified it over the years due to laptops syncing with AD which is why you will see 3 different passwords. So, this script snippet has worked for me in many things i have written but I am all the sudden having an issue getting it to work. I have verified that the password i am using for the local user account is $pass. Verified by doing a run as different user on Chrome and cut and pasted the password out of the script just to make sure i was not fat fingering something.
I get a fail back from RunAs every time.
Any chance you guys see something i am doing wrong?

#include #include ;#RequireAdmin If $CmdLine[0] > 0 Then If $CmdLine[1] = «/Install» Then RunUpdate() Exit EndIf ;;Will check users account to determine if admin, if not will Run with admin rights ————————————————————— ;;Varables Start Local $user = «.user» Local $pass = «password1» Local $pass2 = «password2» Local $pass3 = «password3″ Local $filetorun = @ScriptFullPath & » /Install» ;;Varables End If IsAdmin () = 0 Then If RunAs ( $user, @CompterName, $pass, $RUN_LOGON_NOPROFILE,$filetorun) = 0 Then ;If RunAs ( $user, @ComputerName, $pass2, 0,$filetorun) = 0 Then ;If RunAs ( $user, @ComputerName, $pass3, 0,$filetorun) = 0 Then ;MsgBox (0,»Installation Error», «This installation was interrupted due to an incorrect Admin Password») ;Exit ;EndIf ;EndIf EndIf Exit Else Run ($filetorun) EndIf Func RunUpdate() MsgBox(0,»worked»,»worked») EndFunc

Im trying to launch a .exe file that is nested within the program files (x86) folder structure. i have already used the standard RunAs Syntax and found that it fails to launch the application. I have switched to Run and that seems to work. My issue is I have to use RunAs as the applicaton would need to run under a completely different account. The Current logged in user is a Local User on the machine, however, the application must be run as a domain user. The Machine is domain connected.

Источник

I was turned on to pstools and psexec by a fellow spicer. It sounds and looks like it will work great; however, I’m not getting very far.

What I need is for domainuser to be able to execute Z:folder1folder2execute.bat. I need this to be executed from a remote system (WS1), but need it to run on the server (FS1).

Since the folder resides at Z:folder1folder2execute.bat the following should be understood about the Z drive.

With that said, one could execute the file by browsing to:

From WS1 I have tried using the following syntax from CMD:

1. «psexec \FS1 -u domainuser -p password Z:folder1folder2execute.bat»

— Result: «psExec could not start Z:folder1folder2execute.bat on FS1: The system cannot find the path specified.»

— Result: «LocalDrivedataappsfolder1folder2execute.bat exited on wtndc02 with error code 1.»

3. «psexec \FS1 -u domainuser -p password \domainfolder3appsfolder1folder2execute.bat»

I have tried multiple domain accounts including the domain administrator. I have also tried without using «domain» before the user names.

Any help would be greatly appreciated.

Featured in the Community

2 Replies

It seems that PSexec is looking for execute.bat on the Z drive of the workstation, not the server. If you put the execute.bat in the windows folder of the workstation, tell psexec to execute that one, and then add the -c switch, it will copy the execute.bat file to the file server in a spot where it can run. Or put the execute .bat in the %systemroot%windows folder.

For anyone else reaching this page

Here is what the user was trying to do:

Here are two other options to achieve the same thing:

Either move the batch file to a local folder and run this:

psexec \FS1 -u domainuser localdrv:folderexecute.bat

psexec \FS1 cmd -u domainuser (enter)
you are asked for a password. Enter the password (enter)

Once connected to the remote machine do this:
cd z:folder1folder2 (enter)
execute.bat (enter)

BTW — if you run either of these with the /s switch (not a -s), this will hide any operations that might otherwise be seen by a locally logged on on user (on the remote).

You will also notice that I left the password off of all options. Doing this will force psexec to ask you for your password and hides it from prying eyes when you type it.

This topic has been locked by an administrator and is no longer open for commenting.

To continue this discussion, please ask a new question.

Read these next.

How do you like to learn?

There is a lot of buzz and actually also controversy about learning styles and multiple intelligences in the way that we think about learning, so not taking a side here and saying that it is a magical code that will unlock our ability to do all things. T.

poor wifi, school’s third floor

I work as a help desk technician at a high school for a school district. Teachers/students on the building’s third floor have been reporting poor wifi, with their Chromebooks/laptops etc experiencing slow connectivity and random disconnections. We hav.

Need help crafting a job posting for an IT Pro

I’d really appreciate some thoughts and advice. I’m looking to hire an IT pro to be our resident go-to for all things IT (device support, SQL Server, network admin, etc) but who also is interested in learning — or even has some experience in — the.

Snap! — AI Eye Contact, Mine Batteries, Headset-free Metaverse, D&D Betrayal

Your daily dose of tech news, in brief. Welcome to the Snap! Flashback: January 13, 1874: Adding Machine Patented (Read more HERE.) Bonus Flashback: January 13, 1990: Astronauts awakened to the song Attack of the Killer Tomatoes (Read mor.

Spark! Pro series – 13th January 2023

Happy Friday the 13th! This day has a reputation for being unlucky, but I hope that you’ll be able to turn that around and have a great day full of good luck and good fortune. Whether you’re superstitious or not, .

Источник

Adblock
detector

I made an application and a dll, which are working this way:
I have to register the dll. After registering the dll if i right click on an .exe file, the pop-up menu appears, and i have inserted into this menu one line («Start MyApp»), and if i click there, it should start MyApp. MyApp has one parameter which is the full path of the selected .exe file. After starting MyApp with this path it should create a process with CreateProcessWithLogonW(). This application reads the username, password and the domain from an .ini file. My problem is, that after MyApp starts, it fails always, because it can’t find the ini file. Errorcode is: 1 (Incorrect function).
If i start MyApp manually, than it works fine.

Does anyone has any idea why is this, and how could i fix this problem?

Thanks in advance!

kampi

Update1:

Here is the code which reads from the ini file.

int main ( int argc, char *argv[] )  
{    
  int i, slash = 0, j;  
  char application[size];  
  wchar_t wuser[65], wdomain[33], wpass[129];  

  memset( user, 0, sizeof ( user ) );
  memset( password, 0, sizeof ( password ) );
  memset( domain, 0, sizeof ( domain ) );

  file_exists( "RunAs.ini" );
  readfile( "RunAs.ini" );  
  ....
  ....
  ....
}  
void file_exists( const char * filename )  
{  
  if (FILE * file = fopen(filename, "r"))  
  {  
      fclose(file);  
  }  
  else   
  {  
      printf("nCan't find %s!n",filename);  
      getch();  
      exit(1);  
  }   
}//file_exists    

void readfile( char * filename )
{  
     FILE *inifile;  
    char tmp[256], buf[256], what[128];  
    int i, j;  

    inifile = fopen( "RunAs.ini", "r" );  

    while ( fgets(tmp, sizeof tmp, inifile) != NULL )  
    {     
        if ( tmp[ strlen(tmp) - 1 ] == 'n' )  
         {  
            tmp[ strlen(tmp) - 1 ] = '';  
        }//if  

        memset ( buf, 0, sizeof( buf ) );  

        for ( i = 0; tmp[i]!= '='; i++ )  
         {  
             buf[i] = tmp[i];  
         }  
        buf[i] = '';  
        i++;  

    //  memset ( what, 0, sizeof( what ) );  
        SecureZeroMemory( what, sizeof(what) * 128 );  

        for ( j = 0; i != strlen(tmp); i++ )   
         {  
             what[j] = tmp[i];  
            j++;  
         }  
        what[j] = '';  
        upcase( buf );  
        removespace( what );  

        if ( strcmp( buf, "USERNAME" ) == 0 )  
        {  
            strcpy( user, what );  
        }  
        if ( strcmp( buf, "PASSWORD" ) == 0 )  
        {  
            strcpy( password, what );  
        }  
        if ( strcmp( buf, "DOMAIN" ) == 0 )  
        {  
            strcpy( domain, what );  
        }  
    }//while  
    fclose (inifile);  

}//readfile  

By

SanCon

Greetings,

I’ve found and used @TheDcoder’s ProcessEX UDF, and have found it and invaluable tool in my scripting arsenal. Recently, I found myself needing to create a script which then attempts to run another program as a different user. I was able to heavily borrow from the _Process_RunCommand function to create _Process_RunAsCommand:

; #FUNCTION# ====================================================================================================================
; Name ……….: _Process_RunAsCommand
; Description …: Runs a command or an executable under a different user security privilege.
; Syntax ……..: _Process_RunAsCommand($iMode, $sUserName, $sUserPass, $sUserDomain, $sExecutable [, $sWorkingDir = @TempDir [, $iRunOptFlag = $STDERR_MERGED]])
; Parameters ….: $iMode — Mode in which this function should operate, See Remarks.
; $sUserName — User name under which you would like to run the command/executable.
; $sUserPass — Password for $sUserName.
; $sUserDomain — Domain name to which the $sUserName belongs.
; $sExecutable — The command to run/execute (along with any arguments).
; $sWorkingDir — [optional] The working directroy for the command. Default is @TempDir. $sUserName must have
; privileges to create/modify files on this directory.
; $iRunOptFlag — [optional] The Opt flag for the Run function. Default is $STDERR_MERGED.
; Return values .: Success: Mode $PROCESS_RUN : Will return the process handle & @extended will contain the PID of the command
; Mode $PROCESS_RUNWAIT : Will return the output & @extended will contain the exit code for the function
; Failure: Will return False & @error will contain:
; 1 — If the $iMode flag is invalid
; 2 — If the command is invalid
; Author ……..: J. Sanchez, heavily borrowing from code by TheDcoder
; Modified ……: N/A
; Remarks …….: 1. The ONLY valid modes are: $PROCESS_RUN & $PROCESS_RUNWAIT
; $PROCESS_RUN : Will act similarly to Run function, See Return values
; $PROCESS_RUNWAIT : Will act similarly to RunWait function, See Return values
; If you use $PROCESS_RUN then use _Process_GetExitCode to get the exit code & use StdoutRead to get the output of the command
; 2. Use $PROCESS_COMMAND to run commands like this: $PROCESS_COMMAND & «ping 127.0.0.1»
; 3. Add $PROCESS_DEBUG to $iMode to automagically debug the command, $PROCESS_RUN is equivalent to $PROCESS_RUNWAIT in this case
; Related …….: RunAs, RunWait
; Link ……….: http://bit.ly/ProcessUdfForAutoIt
; Example …….: Yes, see example.au3
; ===============================================================================================================================; Functions
Func _Process_RunAsCommand($iMode, $sUserName, $sUserPass, $sUserDomain, $sExecutable, $sWorkingDir = @TempDir, $iRunOptFlag = $STDERR_MERGED)
Local $iExitCode = 0 ; Declare the exit code variable before hand
Local $sOutput = «» ; Declare the output variable before hand
Local $bDebug = False ; Declare the debug variable before hand
If BitAND($iMode, $PROCESS_DEBUG) Then $bDebug = True
If BitAND($iMode, $PROCESS_RUN) Then
$iMode = $PROCESS_RUN
ElseIf BitAND($iMode, $PROCESS_RUNWAIT) Then
$iMode = $PROCESS_RUNWAIT
Else
Return SetError(1, 0, False)
EndIf
; If Not $iMode = $PROCESS_RUN Or Not $iMode = $PROCESS_RUNWAIT Then Return SetError(1, 0, False) ; If the mode is invalid…
;Local $iPID = Run($sExecutable, $sWorkingDir, @SW_HIDE, $iRunOptFlag) ; Run!!! :P
Local $iPID = RunAs($sUserName,$sUserDomain,$sUserPass,BitAND(0,4),$PROCESS_COMMAND & » » & $sExecutable,$sWorkingDir,@SW_HIDE,$iRunOptFlag)
If @error Then Return SetError(2, @error, False) ; If the command is invalid…
Local $hProcessHandle = _Process_GetHandle($iPID) ; Get the handle of the process
If $iMode = $PROCESS_RUN Then
If Not $bDebug Then Return SetExtended($iPID, $hProcessHandle) ; If the function is in Run mode then return the PID & Process Handle
$sOutput = _Process_DebugRunCommand($hProcessHandle, $iPID) ; Debug the process
$iExitCode = _Process_GetExitCode($hProcessHandle) ; Note the exit code
Return SetExtended($iExitCode, $sOutput) ; Return the output & exit code
EndIf
If Not $bDebug Then
While ProcessExists($iPID)
$sOutput &= StdoutRead($iPID) ; Capture the output
Sleep(250) ; Don’t kill the CPU
WEnd
$sOutput &= StdoutRead($iPID) ; Capture any remaining output
$iExitCode = _Process_GetExitCode($hProcessHandle) ; Note the exit code
Return SetExtended($iExitCode, $sOutput) ; Return the exit code & the output :D
EndIf
$sOutput = _Process_DebugRunCommand($hProcessHandle, $iPID) ; Debug the process
$iExitCode = _Process_GetExitCode($hProcessHandle) ; Note the exit code
Return SetExtended($iExitCode, $sOutput) ; Return the output & exit code
EndFunc

The issue that I currently have is that, regardless of what the errorlevel returned by the program being executed, the errorlevel returned by the _Process_RunAsCommand is 259, which, according to this page it means that there’s no more data (I’m guessing from the STDIO and STDERR?)

Any guidance would be greatly appreciated.

Эта ошибка встречается очень редко, и если вы столкнулись с ней, значит, вы не можете открыть командную строку. Командная строка также известна как cmd, вы можете открыть командную строку из команды run, набрав cmd. Командная строка позволяет запускать несколько команд, а также создавать пакетные файлы для автоматизации нескольких основных задач. Вы можете эффективно использовать командную строку, создав сценарий пакетного файла и автоматизировав его с помощью планировщика задач. Командная строка — это очень мощный инструмент по сравнению с приложениями с графическим пользовательским интерфейсом, кроме того, команды командной строки дают нам прямую линию связи с операционной системой. Вы можете открыть командную строку многими способами, но когда вы сталкиваетесь с этой проблемой, то, сколько бы вы ни пытались, вы не можете открыть командную строку. Недавно в нашей организации один пользователь столкнулся с этой проблемой командной строки, он не мог открыть cmd. Мы перепробовали все возможные способы решения этой проблемы, но следующий метод устранения неполадок помог решить проблему. Следуйте этому руководству, чтобы исправить ошибку cmd Process exited with Code 1 в Windows 11/10.

Содержание

  1. Что вызывает ошибку Process exited with Code 1?
  2. Исправление cmd Процесс завершился с ошибкой Code 1:
  3. Решение 1: Выполните команду:
  4. Удаление ключа реестра вручную:
  5. Решение 2: Пересоздайте профиль пользователя и проверьте:
  6. YouTube video: Исправить ошибку cmd Процесс завершился с кодом 1 в Windows 11/10

Что вызывает ошибку Process exited with Code 1?

В основном эта ошибка возникает у пользователей, которые установили Anaconda на свои системы, Anaconda поставляется с собственным приглашением Anaconda вместе со многими другими инструментами. Даже удаление Anaconda не устраняет проблему, потому что путь к реестру остается прежним.

Исправление cmd Процесс завершился с ошибкой Code 1:

Если вы получили эту ошибку, есть только два решения для устранения этой проблемы, сначала следуйте первому методу решения, если это не устраняет проблему, то попробуйте воссоздать профиль пользователя в качестве окончательного решения.

Решение 1: Выполните команду:

Откройте PowerShell в режиме повышения и выполните следующую команду и нажмите enter.

8199

Эта команда откроет редактор реестра и удалит указанный путь реестра, HKCUSoftwareMicrosoftCommand ProcessorAutoRun.

После успешного выполнения команды перезагрузите систему один раз. В большинстве случаев это устранит проблему.

Удаление ключа реестра вручную:

Откройте команду run, нажав Windows + R и введите Regedit и нажмите enter, эта команда откроет консоль редактора реестра.

Теперь перейдите по следующему пути.

HKCUSoftwareMicrosoftCommand ProcessorAutoRun

Нажмите правой кнопкой мыши на AutoRun и выберите Delete , после удаления просто перезагрузите систему один раз.

Решение 2: Пересоздайте профиль пользователя и проверьте:

Если вы являетесь пользователем входа в домен, то пересоздание профиля пользователя устранит эту проблему. Перейдите по ссылке здесь, чтобы узнать, как удалить профиль пользователя и создать его заново. Если вы используете учетную запись локального пользователя, то вы можете выполнить следующие шаги для воссоздания профиля пользователя.

Откройте команду Run и введите lusrmgr.msc и нажмите enter, эта команда откроет консоль Local users and Groups.

Нажмите на users, щелкните правой кнопкой мыши и создайте новую учетную запись администратора.

YouTube video: Исправить ошибку cmd Процесс завершился с кодом 1 в Windows 11/10


.

1) Создать ярлык к программе — Свойства — Вкладка «Ярлык», Дополнительно — Запускать от имени администратора;
Вкладка «Совместимость» — Запускать от имени администратора.

2) Планировщик
Советы от Microsoft (см. способ № 4)
или скачайте себе CCleaner, и сами посмотрите как он создает в «Планировщике задач» обход режима повышения привилегий.

3)

Скрипт AutoIt

Код

; Set the RunAs parameters to use local adminstrator account
 RunAsSet("Администратор", @Computername, "adminpassword")
 ; Run registry editor as admin
 RunWait("regedit.exe")
 ; Reset user's permissions
 RunAsSet()

При этом удобно будет в скрипте зашифровать пароль учетной записи администратора, сделать это можно специальными утилитами, например Script Encoder (freeware).

4) Сторонней утилитой:
Рекомендую отечественную: AdmiLink
(не путать с платной).

Добавлено через 10 часов 55 минут
5) Вот еще проверил способ через PowerShell:

Code

Код

$ErrorActionPreference = 'Stop'

$si = New-Object System.Diagnostics.ProcessStartInfo
$si.FileName = $args[0]
$si.Arguments = [String]::Join(' ', $args[1..($args.Count - 1)])
$si.Verb = 'RunAs'
$si.UseShellExecute = $true

$process = [System.Diagnostics.Process]::Start($si)

# Very strange code...
# But I spy it in MSBuild...
# I hope these guys know what they are doing! :)

$process.WaitForExit()

do
{
    [System.Threading.Thread]::Sleep(0)
}
while (!$process.HasExited)

Exit $process.ExitCode

//взято с хабрахабр

P.S. Чтобы проверить сохраняем под именем Runas.ps1,
запускаем CMD от имени админа, печатаем (чтобы разрешить политику запуска неподписанных скриптов через Powershell):

Bash
1
2
3
powershell
Set-ExecutionPolicy RemoteSigned
exit

Выходим.
Запускаем любую команду/программу с повышенными правами, например так:

Bash
1
powershell -file e:runas.ps1 regedt32.exe

6) Еще есть такая вещь как Native Shell
Это командная оболочка, запускаемая до входа в систему (там например любит сканировать винт на ошибки Chkdsk).
Так вот, там вообще нет такого понятия как права.
Если кому интересно, можете почитать здесь и здесь.

а) Если программа имеет установщик, переустановите ее из под обычного юзера (от имени администратора) с опцией установки «Для всех пользователей» (если такая имеется).
б) Попробуйте убрать ключ /env из команды Runas.

В крайнем случае попробуйте c помощью PsExec (позволяет запустить программу из-под учетной записи SYSTEM).

Вот еще тема (сохранение пароля runas через программу CPAU).

Bear74, кстати синтаксис CMD кавычку пропускает и не считает за ошибку.

…дополнено:

7) Запуск через команду Runas ссылка

8) Запуск с отображением диалога элевации прав UAC посредством скомбинированного BAT-VBS скрипта ссылка

As it turns out, upon opening up a command prompt window, the “Process exited with code 1” error message is shown. In addition to that, there’s no prompt so users cannot use the command prompt at all. This problem usually comes up when you have Anaconda installed on your system which comes with its own Anaconda Prompt along with many other things. In this article, we are going to show you how to resolve the problem in question quite easily so just follow through with the given guidelines.

Process Exited with Code 1 Error Message

As it turns out, Anaconda is a famous toolkit for data science that mainly uses the Python and R languages. Since this is a toolkit, there are a number of different tools that come packed with Anaconda. While, normally, the command prompt is not used that much, there are still a lot of cases where it can be really helpful. Like we have mentioned above, the error message in question appears usually when you have installed Anaconda on your system and there is quite an easy remedy to the problem at hand. Thus, without any further ado, let us get started and show you how to resolve the “Process exited with code 1” error message. 

Delete Command Processor AutoRun Key

In order to resolve the problem in question, you will have to delete a specific Windows Registry key. As it turns out, it is no surprise that Windows Registry is responsible for how your system behaves and operates. There exists a key inside Windows Registry for Command Processor which essentially refers to the command prompt called AutoRun. 

The key is basically used for running a specific task or program automatically when the command prompt is launched. Thus, the name AutoRun. To fix the error message, you will have to get rid of the mentioned key. 

Now, there are two ways you can achieve this, one is using a simple command that requires it to be entered in a Powershell window. We would recommend this if you are not versed with using or navigating the Windows Registry. Secondly, you can choose to remove the key manually by navigating to the respective path. We will be mentioning both ways so you can choose whichever suits you best. 

Use Powershell

If you wish to go for the simpler approach, simply follow the instructions that are given down below:

  1. First of all, open up the Start Menu and search for Powershell. Right-click on it and from the drop-down menu, choose the Run as administrator option.
    Opening up Powershell as an Administrator
  2. Once the Powershell window is up, type in the following command or simply copy-paste it and then hit the Enter key:
    C:WindowsSystem32reg.exe DELETE "HKCUSoftwareMicrosoftCommand Processor" /v AutoRun /f

    Deleting AutonRun Key via Powershell
  3. After doing that, go ahead and restart your computer.
  4. Once your PC boots up, try opening up a command prompt window to see if the error message still appears.

Manually Delete AutoRun Key

In case you are tech-savvy and wish to go with the manual approach, we would recommend that you create a backup of the Windows Registry before proceeding. This is important because any unwanted mistake can render your PC stuck or something of the sort. With that said, follow the instructions that are given down below to do this:

  1. First of all, open up the Run dialog box by pressing Windows key + R on your keyboard.
  2. In the Run dialog box, type in Regedit and then hit the Enter key.
    Opening up Windows Registry
  3. This will open up the Windows Registry window. 
  4. In the address bar provided at the top, copy and paste the following path:
    ComputerHKEY_CURRENT_USERSoftwareMicrosoftCommand Processor

    Navigating to Command Processor Path in Windows Registry
  5. Once you are there, on the right-hand side, right-click on the AutoRun key provided, and from the drop-down menu, choose the Delete option.
    Deleting AutonRun Key
  6. With that done, go ahead and perform a system restart.
  7. As your PC boots up, open up a command prompt window and see if the error message is still there. 

Create a New User Account

Finally, if the above solution has not fixed the problem for you, then in such a case, you can try creating a new user account on your system. This has been reported by other users facing the same error message and who were able to circumvent the problem by creating a new user account. Once you have created a new user account, you can choose to transfer your data to the new user account

Follow the instructions given down below to create a user account:

  1. First of all, open up the Windows Settings app by pressing Windows key + I on your keyboard.
    Windows Settings
  2. Then, on the Settings app, navigate to Accounts.
  3. On the Accounts page, click on the Family & other users option provided.
    Accounts Settings
  4. Once you are there, click on the Add account button provided in front of Add other user.
    Adding New User Account
  5. Follow the on-screen prompts to create a new user account. 

Photo of Kamil Anwar

Kamil Anwar

Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.

Понравилась статья? Поделить с друзьями:
  • Run time error 10 plugin
  • Runas error unable to run
  • Run time error 10 native error native registerhookchain
  • Run time error r6003
  • Run time error automation error excel vba