Inno Setup: How to automatically run program after /verysilent install? - automation

How to automatically run my program after performing a /verysilent install?
I can automatically run my program after a normal install by using DisableFinishedPage=yes in the [Setup] section (that disables the finish page and will run the program immediately after install, without user intervention).
However if I use the /verysilent parameter that won't work: my program installs but won't automatically run afterwards.
Thanks in advance for any help.

Apparently it's working fine now. I just removed skipifsilent flag from the Run section!

Related

WSL can't detect VS code

At first, I tried to fix my problem of npm instruction
so I added
[interop]
appendWindowsPath = false
to /etc/wsl.conf
It works, but another problem happen.
When I type code .
Command 'code' not found, did you mean:
command 'node' from deb nodejs (12.22.9~dfsg-1ubuntu3)
command 'cdde' from deb cdde (0.3.1-1build1)
command 'ode' from deb plotutils (2.6-11)
command 'tcode' from deb emboss (6.6.0+dfsg-11ubuntu1)
command 'cde' from deb cde (0.1+git9-g551e54d-1.2)
Try: sudo apt install <deb name>
The above Error message appear.
I tried the following instruction
export PATH=$PATH:"/mnt/c/Users/%USERNAME%/AppData/Local/Programs/Microsoft VS Code/bin"
It also works properly.
Whenever I restarted WSL, npm instruction still worked well, but code instruction lost its function again.
What should I do to fix the problem?
Thanks in advance!
My main suggestion would be to not use appendWindowsPath = false to fix your NPM problem. That's like using a sledgehammer as a flyswatter. As I said in this answer:
Please do not follow the recommendations (like this answer) to completely remove all Windows paths from WSL, as that will severely limit your ability to run Windows applications in WSL (one of its great features).
You'll also lose access to the ability to run PowerShell scripts and commands in WSL easily. You won't have direct access to wsl.exe itself from inside WSL (which comes in handy).
You can type the full paths to these commands, of course, but most instructions and other answers you find here are going to assume that you've left the Windows path intact.
Instead, figure out where npm is installed in your WSL distribution and then determine why it is further toward the end of the PATH than your Windows directories. Windows paths are added at the end of the Linux PATH for a reason. If something in your startup files is adding to the path, it should put it at the beginning, so it has precedence. E.g.:
export PATH="newdir:$PATH"
Note that I'm not saying that you should change your export statement above since, as mentioned, that Windows path would normally come at the end anyway. It's really not going to matter unless you put another code executable somewhere else in your path.
Whenever I restarted WSL, npm instruction still worked well, but code instruction lost its function again.
If you do want the "quick and dirty" (not recommended) solution, then you can simply add that export command that "makes it work" to your ~/.bashrc. That file is processed each time the Bash shell starts interactively.

WMIC:Auto reply "Y" when wmic command runs through list of computers in .txt document to install program

I am currently pushing a .msi to multiple (500+) computers. My WMIC command
/node:#"c:\#complist.txt" product call install true,"", "C:\Program.msi" /nointeractive
successfully goes through and discards the nodes that wont work. However, once it start the install of the program with the /nointeractive switch, it only installs to the first node(computer). After that, the command stops. Without the /nointeractive switch, it continues after the first install but I have to hit "y" to execute it each time. Is there a way to automate this so that I'm not pressing "Y" 500+ times today or in the future? Any help would be appreciated. Thank you.

The only way to start server sides (back end) is running them with a command line like "npm start"?

...is there like compiling the project and make it run to be autoexecutable?
Sorry for the general question. I have been doing little projects with server side and I find that always I need to write "npm start" or so to make the whole start working.
My doubt is, Do these projects need to be compiled somehow or it is just as is, a simple line runs the coded files and that works like a server side?
Also, should not a server side able to run by itself (by definition) when the system restarts? So far, I needed to create bat files/start folder in windows to make then run in case of restart.
According to NPM documentation:
npm start
This runs an arbitrary command specified in the package’s "start" property of its "scripts" object. If no "start" property is specified on the "scripts" object, it will run node server.js.
To start the server you have to start a process and that process is started by npm start. If processes are killed they cannot be brought back to life by themselves. If the process is killed (eg when you restart) you have to make sure a new process is automatically spawned. You can accomplish this in multiple ways. You could use services (for example systemctl in Debian). You could also use tools like Kubernetes which can automatically restart a container in case of a crash.
Another possbile solution to use something like Respawn which allows you to respawn a process if it crashes from NodeJS code. Of course, it can also be accomplished with plain NodeJS.

Pamac will not load any apps

So I did a fresh install of Arch Linux on my desktop and installed i3wm with it. After updating the repo's following the first reboot I began to add some packages I am familiar with that I can remember off the top of my head. After making sure my wireless internet was working I began to add apps to install to get me all set up and 'pamac-aur' was one of them. After I couldn't remember anymore apps to install I turned to pamac to help me with the rest, only it wouldn't start. I got a "Authentication failed" error. So I did some research and 95% of the posts I read mentioned adding 2 lines to my i3 startup config.
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
I currently have tried both of those lines and each one separately as well since they are almost identical and pamac is still giving me the "Authentication failed" error message. I can 'sudo pacman -Syu' and 'yay -Syu' from the command line but since I am still new with i3 and linux in general, I like referring to an application that shows pictures of different packages and a 'one-stop-shop' to install everything in one go.
So beyond those two lines in my i3 config, I don't know what else to try. Any help is greatly appreciated!
Have you already checked if you have polkit-gnome installed?
This is the package that provides the binary you are trying to execute with the lines you mentioned in you config:
pacman -Syu polkit-gnome
After installing it I would check if it works when starting the agent manually by executing the following in the terminal:
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
Then run pamac and try to install/remove/update a package with it. When a popup appears that wants you to authenticate yourself it was a success.
Then you can add the line to your i3 config.
Also the the second line without the ampersand at the end is enough for your i3 config:
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
For the new line in the config to take effect you would have to, after saving the file, logout and login again.

Running a program at login as admin

I have a program I wrote in Visual Basic Express 2013 to put a classification banner at the top of the screen. I set up a scheduled task using ngen.exe which makes it run at login. The problem is that it doesn't run as admin so any non-privileged user can kill the task.
This program is to replace another program called Netbanner because there are a few issues with Netbanner. The program I wrote resolves all of these issues except for the admin issue. Netbanner is implemented exactly the same way (ngen.exe) but it won't let a non-privileged user kill the task.
I don't know if it is something in the program itself or I missed something in the deployment process.
This is the command used to deploy Netbanner which I duplicated to deploy mine:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe install "C:\Program Files\Microsoft\NetBanner\NetBanner.exe"
Also, these are the files in C:\Program Files\Microsoft\NetBanner:
NetBanner.exe
NetBanner.InstallState
NetBanner.pdb
NetBannerSchTask.xml
Any ideas?
Thanks.
You could try to go into the properties->Compatibility->Run this program as an administrator for the application.
Alternatively, you could do the same thing for a batch file that you can schedule to run on startup.