Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I keep getting the same error with my chocolatey package: Exit code was '-1'. I am not sure if it is something wrong with my chocolateyinstall.ps1 or the setup.exe I am using to make this embedded installer. The image below shows both the chocolateyinstall.ps1 and the cmd when trying to run choco install (packagename). Thanks.
Here is the code:
$packageArgs = #{
packageName = 'armrvds'
fileType = 'exe'
file = "$(Split-Path -parent $MyInvocation.Mycommand.Definition)\setup.exe"
validExitCodes = #(0)
softwareName = 'ARM RVDS 4.1*'
Install-ChocolateyInstallPackage #packageArgs
https://ibb.co/Mpnh0mq
Exit code was '-1' means that the exit code of the installer was -1, and not 0 or another acceptable exit code to be treated as successful. You will need to figure out why your setup.exe is failing. You may be able to find more information about why the installer failed if you look at C:\ProgramData\Chocolatey\logs\chocolatey.log as the error indicates.
One thing I notice is you are not setting the silent installation arguments as part of your arguments to Install-ChocolateyInstallPackage, which at a minimum may cause your package to require interactivity (you don't want this). You should find out what the silent installation arguments are to setup.exe.
In your case, it looks like RVDS uses a different program to install silently (page 7). Note that this is for 3.1, not 4.1, so you should either try to find up to date documentation, or see if setupcli still exists in 4.1 and start looking at the parameters it supports.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How command prompt communicate with hardware
if i give mkdir command it will create the directory
how this command works internally
can i create own commands.
You need to notice the difference between the OS and the shell. Shell is only a user-land program. When you type a command, the command is the name of another program(or some built-in command in shell itself), shell find the corresponding program and execute it.
The operations at this level is much higher than hardware, it's just user-land program call.
For mkdir, you type which mkdir then will find the path of this program named mkdir. If you want to create your own, just compile your own program and run it from shell.
First of all MKDIR doesn't change the Directory it Makes the new directory.
& These program internally runs like a Bash Script/Batch File, which are few predefined codes in the OS.
You can create your own command by creating Batch File, For which you need Notepad, Little Programing Skill & Output Parameters you Want To Achieve.
This Link Might help Creating CMD File
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Is it possible to get hibernation status using shell ?
I am using powercfg.exe to enable/disable it and there doesn't seem to be any way to get the status, even using /Q (query).
I also tried to base that on existence of %SystemDrive%\hiberfil.sys but that requires admin rights.
EDIT
Current solution is outdated:
From version 1809 the registry setting “HibernateEnabled” was renamed “HibernateEnabledDefault”. If you use cmd (powercfg.exe /hibernate off), it is created in addition to the “HibernateEnabledDefault” parameter “HibernateEnabled” with all of the control circuits of the supply.
Setting registry didn't have any effect for me since this version. I had to go to Control Panel\Hardware and Sound\Power Options\System Settings to enable it, after that powercfg options worked again. If both HibernateEnabled and HibernateEnabledDefault are deleted, I still got Hibernate option active.
You could check the registry key:
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Power -name HibernateEnabled
Or remotely using .Net and Remote Registry:
$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', "ExampleComputer")
$RegKey = $Reg.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Power")
$RegKey.GetValue("HibernateEnabled")
Here is an alternative for cmd, based on the registry query by BenH's answer:
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled"
To capture the result and store it into a variable, use this:
for /F "delims=" %V in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled"') do set "Hibernate=%V"
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have written a perl script which running fine in my system but not working in some other system.
It is showing error "can't execute ...... at line 1".
everything is set up. I have tested in version 5.8.2 and working fine. But in 5.8.6 it is not working. While compile this code I got that Archive/Tar.pm is missing.
I have checked in my system perl lib folder there is no such Folder/module. Also I didnt get any result for perldoc -lm Archive::Tar in my system but still it is running fine.
Can you let me know what might be the possible problem ?
First line :: #! C:\system\Perl
This program is for windows
Try running dos2unix on your script. It probably has Carriage Returns in the first line.
dos2unix yourscript
You can check with
cat -vet yourscript
CR shows up as ^M.
Also, try running:
which perl
and make sure that your first line matches the answer.
Try running the script using:
perl yourscript
rather than
./yourscript
Are you sure the first line is terminated correctly for your OS (for example, Linux hates CR+LF line terminators... :-)
If Perl is saying that Archive::Tar is missing then it is probably right. Don't argue with it - just install the module.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I am working in perl. I executed a batch file which will run the exe file. I used PSExec command to run the exe file. But i am getting error as client.exe exited with error code 0. Why this error occurs and where i went wrong and how to fix it?
From the PsExec documentation:
Upon exit, a process specifies an integer that the process's parent process can read. Programs often use the exit code to report the success or failure of their execution. Whenever a process executed with PsExec is completed, PsExec displays the process's exit code and returns the exit code as its own exit code. You should test a program's behavior or check its documentation to determine what that program's specific error codes mean, but an exit code of 0 typically means success. The -s switch specifies that PsExec should execute the command under the System account.
So that is just the return value of the run exe file. And almost every app will return a 0 if everything went smoothly. So unless you have any other reason to believe something went wrong, i would assume your exe to have exited successfully.
And if you have reason to believe an error occured, you will have to check the documentation of your exe to find out what an exit code of zero means it its specific case. And if it means anything but success, write them an angry email, preferably.
I'm currently trying to get this script to work:
https://github.com/mj41/auto-unrar/blob/master/bin/unrar2.pl
The only problem is that I get the following error:
Entering directory 'Series'
Entering directory 'Series/SerieName'
Entering directory 'Series/SerieName/Season2'
Entering directory 'Series/SerieName/Season2/SerieNameS02E21.720p.HDTV.X264-DIMENSION'
Entering directory 'Series/SerieName/Season2/SerieNameS02E21.720p.HDTV.X264-DIMENSION/Sample'
Can't call method "List" on an undefined value at unrar2.pl line 973.
This line is rar_obj->List();
$rar_conf{'-verbose'} = $rar_ver if $rar_ver;
my $rar_obj = Archive::Rar->new( %rar_conf );
$rar_obj->List();
my #files_extracted = $rar_obj->GetBareList();
This is an old script, 3-4 years old and I changed a little like SHA1 to SHA and use Filesys::DfPortable; to Df
Does anyone know how I can fix this error :)?
EDIT:
I contacted the developer and he told me I needed to install a program that can handle rar commands. So how would I do that. I can't seem to be able to install unrar.
EDIT2:
What my problem is now, 2 of the 3 unrar packages aren't in my architecture, armhf.
To install the script yourself::::::::::::
https://github.com/jorricks/UNRAR
You need to pass the -archive parameter into the call to new() otherwise how will $rar_obj know which file it is supposed to be looking at?
I can't seem to be able to install unrar
That's not a particular good explanation of your problem. What did you try? What unexpected behaviour did you see?
From the tags on your question, it looks like you're running Debian. What do you see if you run sudo apt-get install unrar?
Update: My first comment was based on the code extract that you showed us. Looking at the full program code, I can see that %rar_conf has other values set in it (including the -archive option) before the section of code you gave us.
Looking at the source of the Archive::Rar module, it seems to assume that the program to use for dealing with the archives is called rar. So 7-Zip is not going to work.