Page 1 of 1 1
Topic Options
#212011 - 2016-10-07 05:04 PM run start program not working
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
I can do

run 'notepad.exe' and that will start notepad up, but what I cannot do is run

shell 'START "" /wait c:\windows\notepad.exe' as ultimately I want the program to run minimized so eventually the script should do shell 'START "" /min /wait c:\windows\notepad.exe'

When I run this and I have tried every variation possible including comspec etc, it just doesn't do anything. it works fine if I type it in the command prompt, but will not run from kix script.

Ultimately what I am trying to do is get Firefox to run on very first login so that it creates the profile in appdata folder so that I can change the default homepage settings. And then I want to close firefox after its loaded.

I am probably doing something silly with the syntax as I don't often need to run an exe from script.


Edited by Robdutoit (2016-10-07 05:05 PM)
Edit Reason: Close firefox too

Top
#212012 - 2016-10-07 06:55 PM Re: run start program not working [Re: Robdutoit]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
start REQUIRES the cmd shell...

 Code:
$InstallString='%comspec% /c start "OMFG" /wait "c:\windows\notepad.exe"'
? $InstallString
shell $InstallString
? @serror
? $installstring
_________________________
(... better days ahead)

Top
#212031 - 2016-10-18 02:39 PM Re: run start program not working [Re: Allen]
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
Thanks, I nearly had it right. I think it was because I did not try using the comspec in the shell command. I tried it with the shell command, but could not get it to work. I removed the /wait command as what I was looking for was for the script to wait for the program to load, not wait for the program to close. But I got it working thanks

Sorry to take so long to get back to you, but its been so many disruptions on this end, that I never got a chance to get back to you.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1383 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.054 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org