How can i execute my exe file form server - c#-4.0

I want to keep my exe on Sever. And on Client Desktop icon for that application will contain the address of that server whenever user will click on desktop icon it should call from server location on his computer. That exe should run on his computer. what should i use? How can achieve this. Please help me. Thanks in advance

You can use shared folder fo this.
Place exe file in the sared folder and create a shortcut.

It depends on what you are trying to accomplish.
If you are doing this so you can change the actual EXE without updating the users computer, then you would have a simple app on the users computer that would look for the exe on the server. Once it found it, it could execute it via:
Process.Start(exeName) // where exeName is a reference to the executable you want to run, including path.
Once that has started, your app can now exit as it is no longer working.
Using this approach, you can have your app check for the exe of your choice and run that.
If you just want to be able to keep the exe on the server, then just click on the exe in the server (in windows explorer) and drag it to the users desktop as a shortcut and you are good to go.
Enjoy

Related

How to add my nodejs server to startup program of window?

I want the server made with Node.js to start automatically when Windows is operating.
I know that Windows runs the exe files in the StartUp folder when it is run.
But I've never made an exe file. (I am not sure how to do it).
I think there are probably many different ways to accomplish what I'm trying to do.
I'm not sure which way would be more efficient.
Please advise.
I prefer to create automatic commands with the .sh.
It would be great if you could do it this way.

How to create a SnoreToast start menu shortcut with a Working Directory to a .BAT file?

Using node-notifier#7.0.0's SnoreToast on NodeJS v13.13.0, I am trying to create a Start Menu shortcut to use as appID for SnoreToast's notifications, I have a .BAT file that runs the command node "src\index.js", and I'm assigning this .BAT file as the target application of the SnoreToast shortcut as seen below:
"..\node_modules\node-notifier\vendor\snoreToast\snoreToast-x64.exe" -install "SomeAppName\SomeAppName" "c:\Users\Redacted\Desktop\proj\start.bat" "app.someappname"
The shortcut is successfully installed on the Start Menu in a folder named SomeAppName and the shortcut itself named SomeAppName aswell, and when I open the shortcut, it targets the correct start.bat file, but the start.bat is unable to fullfill it's purpose due to the shortcut opening it on C:/WINDOWS/System32 and ultimately wrongly targets C:/WINDOWS/System32/src/index.js, causing it to fail.
By manually editing the shortcut's "Start in" option on the Properties dialog in File Explorer to the correct path of my project (C:/Users/Redacted/Desktop/proj) and saving, it runs perfectly, but obviously I don't want to make my users have to manually do this work + the application should be portable and runnable anywhere it's stored on the FS, so how would I edit the "Start in" (aka Working Directory) of a SnoreToast shortcut on creation? I've already tried to Google it but all the results are unrelated and SnoreToast's documentation doesn't address this issue either.
A solution that does not require any additional npm packages would be preferred, but one that uses an npm package is acceptable aswell. All help is appreciated.

Open and edit code file from remote server in my preferred editor?

I am having a lot of trouble solving a SFTP problem...
I would like to be able to open and edit text files in my preferred editor such that I can execute a command on my remote server and it will open the file in Visual Studio Code. Once that file is opened in VS code, I would like to be able to edit it and, when I save, it will save the changes to the same location on the server.
I know something like this is possible because I have used WinSCP where I can double click a text file from the server through the UI and it will open it in whichever editor I choose. When I save changes, it will update those changes on the server. I really want to know what WinSCP is doing behind the scenes when I do that.
Any help would be appreciated. Thanks!
WinSCP is running on your local machine, so it can open a local editor. So, it's not comparable.
You cannot execute local a application from a remote server.

How do I launch an application from a .sh script?

Help me please with a bash script of a few lines.
I have a MyApplication executable in some folder, and I need to make a launcher script to call that application from it's folder when I click it from a grafical interface.
(I need this because I need my application to be launched from it's folder, so that Qt::currentPath() will return the current folder the executable is in)
Please help me, I just had to power off my linux machine two times in a row, I made fork bombs instead of launchers :(.
P.S. I'm a linux newbie, trying to figure out scripting.
EDIT
More about my current problem: Qt how to open a file in current dir ? or what's wrong with this?
Details: MyApplication is a GUI project compiled in Qt-Creator. It uses .xml files for storage. If I cd manually to the folder the executable is in, and run it, everything works fine, the application knows the path to the .xml files (current directory). But, if I just click the icon of the application it launches from $HOME, and my application is not able to find those .xml files.
That's why, I suppose, I need a .sh launcher, to call it from it's directory when I'll click it.
If its a graphical application, any sort of link will do. That works fine for me, unless you have something I'm not aware of, in which case please explain more.
Ps, fork bombs are limitable - http://forums.debian.net/viewtopic.php?f=10&t=44480&start=0

Running a Qt application at startup

I wrote a Qt application that is going to run on Linux. It supposed to run at startup.
It's supposed to run on every Linux- Suse, RedHat etc.
What script should I write and Where to put it?
I don't know how to write scripts at all, so I would appreciate it if you will attach an example.
You need to create a desktop entry file for your application (see here) and to put it in user's $HOME/.config/autostart directory.
Any desktop entry file in that dir will get executed when a Window Manager starts up (see here).
To do this, usually you'll need to create your desktop entry file by hand (that's it, not via C++ code/script) and to just install in that directory via C++ code.

Resources