windows run command

Windows specific questions.
Merick
Posts: 1038
Joined: May 28, 2007 1:52

windows run command

Postby Merick » Jul 02, 2016 20:03

does anyone know if there is a way to use FB to access the windows run command - win+r ?

I'm trying to set up something to activate my virus scanner. Although you can do this with the "run" or "shell" FB commands, these work with the windows command shell and you need to either hard code in the path to the exe, or add the path to the windows path variable. The problem with this is that each time norton updates itself it changes the folder name where the exe is located, which breaks the hard-coded path info.

However, I've noticed that if you use win+r to bring up the windows run command, you can just type in navw32 and it will start norton without needing to put in the folder path. If there was a way to access this from FB it would allow me to activate the virus scanner without needing to re-code the path every time norton updates
marcov
Posts: 2824
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: windows run command

Postby marcov » Jul 02, 2016 20:41

Run and shell are probably portable functions. Search for something called ShellExecute in the winapi.
Zippy
Posts: 1295
Joined: Feb 10, 2006 18:05

Re: windows run command

Postby Zippy » Jul 02, 2016 20:42

Have you tried start:

Code: Select all

dim as string sp="start navw32"
shell(sp)
Merick
Posts: 1038
Joined: May 28, 2007 1:52

Re: windows run command

Postby Merick » Jul 02, 2016 20:54

thanks Zippy, that was just what I needed

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 2 guests