Gopher360
Gopher360 copied to clipboard
Run as a service at start up
Would it be possible to set this up as a windows service so it just auto runs at launch and in the background anytime I turn my controller on?
From https://github.com/Tylemagne/Gopher360/releases/tag/v0.98: "Placing this in your computer's startup folder will give you a fully controller-enabled Windows upon boot" I hope it helps.
Is there a way to do it so it doesnt open the GUI?
On Mon, Mar 14, 2016 at 2:46 AM, MrBloodyshadow [email protected] wrote:
From https://github.com/Tylemagne/Gopher360/releases/tag/v0.98: "Placing this in your computer's startup folder will give you a fully controller-enabled Windows upon boot"
— Reply to this email directly or view it on GitHub https://github.com/Tylemagne/Gopher360/issues/21#issuecomment-195982004.
Yes, you can create a visual basic script that runs an application in the background. See http://superuser.com/a/198530/97261
Create a file with extension .vbs with the following content
Dim WinScriptHost
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "Gopher.exe" & Chr(34), 0
Set WinScriptHost = Nothing
You can then put a shortcut to that vbs-script in the startup folder. That should give you the functionality you require.
Regarding the issue, I'm not sure I would like Gopher to run silently in the background. I also use the controller for gaming, and I would not like Gopher to interact with the controller while I play. I think I prefer to turn Gopher on when I want to use it as a mouse, instead of turning Gopher off when I want to play.
On Windows 7, creating a shortcut to Gopher, marking it as 'run as administrator', and specifying it to 'Run' 'Minimized' and then placing it in the startup folder is the closest I could get to a auto-start Gopher that I think you're looking for.
After doing the same thing on Windows 10, the above did not work, I tried the VBS above, using Task Scheduler, creating a service, etc. nothing worked except: a .bat script to launch the shortcut.
echo @off
cd "C:<path_to_folder_containing_above_shortcut>"
start ShortcutName
Place that .bat into the startup folder. My google searches make me think that Win10 does not like programs run as administrator on start for security reasons, so this .bat works around that.
However on start the cursor would not appear. I could move it around and see it highlighting things, but that wasn't very usable. My hypothesis was that because no hardware mouse was detected, Win10 wasn't displaying a cursor. I plugged a hardware mouse into the htpc, which then appeared to force the mouse to appear on startup. That's sufficient for me for now. I imagine if you installed a emulated hardware (virtual) mouse it might remove the need for the hardware mouse above.
@justinlulejian The cursor not appearing is related to Issue #18.
I'm gonna try and get an NSIS installer built and added to the repo soon. I'll see if it's possible to get some "run on startup" options in there (I assume it is).
The solution that worked for me is to use Task Scheduler to run Gopher when my user logs in, and have it "Run with highest privileges". The startup folder method didn't allow it to run as an administrator (Win 8). This does not hide the Gopher window, however.
Old thread I know, but if anyone else is looking to get Gopher to run on boot with the window minimised, this worked for me:
'Create Task' using Task Scheduler
In 'General', tick 'Run with highest privileges'
In 'Triggers', add a trigger for when user logs on
In 'Actions', create an action for 'Start a program' with the following properties:
In 'Program/script': C:\Windows\System32\cmd.exe
Add arguments: /c start "" /min "C:\Program Files (x86)\Gopher.exe"
Click OK
Replace C:\Program Files (x86)\Gopher.exe with wherever you've put the Gopher executable.
It should now start minimised on boot. It flashes the black command window for about half a second before minimising, which I can live with. Working on Windows 11, should also work on Windows 10.
You can hide the window by changing the user account that the task is ran under to SYSTEM.
How do you get this to work? When I try, Gopher runs successfully as a system process, but doesn't actually work. I have no cursor control. Seems to only work if run as the active user.
I don't know.
Old thread I know, but if anyone else is looking to get Gopher to run on boot with the window minimised, this worked for me:
'Create Task' using Task Scheduler In 'General', tick 'Run with highest privileges' In 'Triggers', add a trigger for when user logs on In 'Actions', create an action for 'Start a program' with the following properties: In 'Program/script':
C:\Windows\System32\cmd.exe
Add arguments:/c start "" /min "C:\Program Files (x86)\Gopher.exe"
Click OKReplace C:\Program Files (x86)\Gopher.exe with wherever you've put the Gopher executable.
It should now start minimised on boot. It flashes the black command window for about half a second before minimising, which I can live with. Working on Windows 11, should also work on Windows 10.
Thank you it worked!