#180001 - 2007-08-30 07:58 PM
Running .exe, .bat., .msi and such out of kix
|
akolos
Fresh Scripter
Registered: 2007-08-27
Posts: 10
|
Hello. I want to run the following out of .kix: .exe - to install a program .bat - to apply update to it .msi - to install another program to work with first one .reg - to add reg_hack into registry to make it all work
As i understand: .exe <-- SHELL .bat <-- CALL or INCLUDE .msi <-- not sure here, call msiexex.exe and pass the parameter to it .reg <-- ??? no clue at all. Found a function to read the key, how to right into it, how to add new value or new key
i may have another question about error check some time down the road, but not before i try and fail to figure it out myself
|
|
Top
|
|
|
|
#180005 - 2007-08-30 09:58 PM
Re: Running .exe, .bat., .msi and such out of kix
[Re: Les]
|
akolos
Fresh Scripter
Registered: 2007-08-27
Posts: 10
|
so, for .reg file it will be SHELL "\\path_to_file\file.reg" ?
|
|
Top
|
|
|
|
#180008 - 2007-08-30 10:50 PM
Re: Running .exe, .bat., .msi and such out of kix
[Re: Les]
|
akolos
Fresh Scripter
Registered: 2007-08-27
Posts: 10
|
.exe <-- SHELL "\\path_to_file\program.exe .bat <-- CALL or INCLUDE. CALL is "to start another .kix script", INCLUDE to "treat the contents of a specified file as if those contents had appeared in the script at the point where INCLUDE appears". Is INCLUDE becoming absolete now? .msi <-- SHELL "%SystemRoot%\whatever\msiexec.exe /parameters" .reg <-- SHELL "%SystemRoot%\whatever\regedit.exe \\path_to_file\file.reg /parameters"
Is that how it's done?
|
|
Top
|
|
|
|
#180015 - 2007-08-31 09:54 AM
Re: Running .exe, .bat., .msi and such out of kix
[Re: Allen]
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Try to get into the habit of quoting any file path that is going to be passed to the command line - it'll save the aggravation caused by spaces in paths.
shell '"'+%COMSPEC%+'" /c "x:\path to \filename.bat"'
|
|
Top
|
|
|
|
#181302 - 2007-10-08 06:35 PM
Re: Running .exe, .bat., .msi and such out of kix
[Re: Glenn Barnas]
|
MEldridge
Fresh Scripter
Registered: 2007-02-12
Posts: 5
Loc: Michigan
|
I am trying to run a bat file myself, what is the "%comspec%" ???
when I try it like that it says Error in expression...
Edited by MEldridge (2007-10-08 06:37 PM)
|
|
Top
|
|
|
|
#181307 - 2007-10-08 07:07 PM
Re: Running .exe, .bat., .msi and such out of kix
[Re: eriqjaffe]
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
NoBreak On
Run 'c:\script\HelloWorld.bat'
Shell 'c:\script\HelloWorld.bat'
Get $
|
|
Top
|
|
|
|
#181390 - 2007-10-09 05:26 PM
Re: Running .exe, .bat., .msi and such out of kix
[Re: Witto]
|
RomanB
Fresh Scripter
Registered: 2006-10-20
Posts: 15
Loc: Bonn, Germany
|
Hi Akolos! Could you post your code, please? I'm interested in your error.
To Glenn: I always use "cmd /c" in my shell commands. What's the advantage of using %comspec%?
Regards, Roman
|
|
Top
|
|
|
|
#181395 - 2007-10-09 06:20 PM
Re: Running .exe, .bat., .msi and such out of kix
[Re: Witto]
|
akolos
Fresh Scripter
Registered: 2007-08-27
Posts: 10
|
RomanB
Hey, i check my posts, i didnt mention any errors. Besides, it was about 2 months ago. Anyway, the reason i was asking whatever it was that i asked: i had to deploy quite a few new systems in our office. One of the programs needed reg file run on system to change certain things. I was just finishing the logon script (basic things - shares and printer mapping), and i wanted to implement that reg file in script. Since then we upgraded the software, and reg. file no longer needed.
As of now i dont call anything outta my script. it may change since we are planning our domain/forest rebuild. if you still want my code i could paste it, but it is really only about 10 CASE statements, with "addprinterconnection" and "use Z:\ "share""
|
|
Top
|
|
|
|
#181456 - 2007-10-10 09:33 PM
Re: Running .exe, .bat., .msi and such out of kix
[Re: akolos]
|
RomanB
Fresh Scripter
Registered: 2006-10-20
Posts: 15
Loc: Bonn, Germany
|
OK Akolos, don't mind, forget it.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2419 anonymous users online.
|
|
|