Page 1 of 1 1
Topic Options
#212534 - 2017-06-01 04:49 PM Install Software and Auto Start it
fbaumann Offline
Just in Town

Registered: 2017-06-01
Posts: 1
Loc: Switzerland
Dear All

I would like to create a KiXtart wich will do the following thing:
1. Check if a Software is already installed (If not install it)
2. Check if there is a new version available (if yes install the new one)
3. Autostart the Software

I started with the following code:

 Code:
If InGroup('PBX_User')
	If Not Exist $systemdrive+'\program files\Pascom\MobyDickClient\bin\md_mobydick.exe')
		? "Install UC-Client"
		$Install = '\setup.exe /configure configuration-en-64.xml'
	Else
     ? "UC Client already installed"
    EndIf
Else
? "UC Client not available"
EndIf


If someone could help me with solving this, i would apreciate it very much.
Best regards
Fabian

Top
#212544 - 2017-06-13 09:05 AM Re: Install Software and Auto Start it [Re: fbaumann]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Something like this should work. Untested because I do not have your setup but the steps short be more or less what you need.

 Code:
;Check group membership
If InGroup('PBX_User')
	;Check if UC client is installed
	If Not Exist($systemdrive + '\program files\Pascom\MobyDickClient\bin\md_mobydick.exe')
		? "Install UC-Client"
		;Installl UC client
		$Install = '\setup.exe /configure configuration-en-64.xml'
		Shell $install
	Else
		? "UC Client already installed"
		;Check UC client version
		$version = GetFileVersion($systemdrive + '\program files\Pascom\MobyDickClient\bin\md_mobydick.exe', "Productversion")
		If $version <> "1234567890"
			;Install current versiobn of UC client
			$Install = '\setup.exe /configure configuration-en-64.xml'
			Shell $install
		Else
			? "Current version of UC Client already installed"
		EndIf
	EndIf
	;start UC client
	Run $systemdrive + '\program files\Pascom\MobyDickClient\bin\md_mobydick.exe'
Else
	;UC client not needed for current user
	? "UC Client not available"
EndIf
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#212546 - 2017-06-13 02:15 PM Re: Install Software and Auto Start it [Re: Mart]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Forgot to mention that $systemdrive needs to be specified. As it is now it does not contain any data.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

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 1343 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.05 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