Page 1 of 1 1
Topic Options
#195083 - 2009-07-28 05:44 PM Install Application
wreded Offline
Fresh Scripter

Registered: 2003-11-06
Posts: 28
Loc: Montana, USA
i don't get a chance to use Kix as much as i'd like and i've never tried to install an application, until now. We have a new application that takes two installs, one for connectivity and one for the application itself. Additionally, each user must have a directory in their "\Application Data" (for WinXP) and one in "\AppData" for (WinVista) with one file in it that contains their login credentials (different for each computer user).
i've got all my variables set and tried to install the connectivity portion using the SHELL command and it doesn't appear to start up at all on Vista. On XP i get denied 'cause i'm now running with elevated privileges. The line looks like:
 Code:
Function loadOne
shell "J:\CER\! System Updates\winvue\WIMSV6.03Jul09\CygwinForVUWin603Setup.exe"
    gets $x
Endfunction

Once i get this ironed out (and using elevated privileges!) i can continue on to the next part: getting user input to put their credentials in the file. i've never been good at parsing files and i need to get user input to replace a single string "abc@" with proper credentials.
Thanks for any assistance.
Dave

Top
#195088 - 2009-07-28 11:46 PM Re: Install Application [Re: wreded]
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
You have used SHELL..

Have you tried: RUN?

Couple of other things you can try:
Invoke an environment space..
 Code:
SHELL "%COMSPEC% /E:1024 /C J:\CER\! System Updates\winvue\WIMSV6.03Jul09\CygwinForVUWin603Setup.exe"


Or..
 Code:
RUN "%COMSPEC% /E:1024 /C J:\CER\! System Updates\winvue\WIMSV6.03Jul09\CygwinForVUWin603Setup.exe"


As far as sending "abc@", you will need to either double the @ as it is used by kiz or use the NOVARSINSTRINGS..

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#195089 - 2009-07-29 12:05 AM Re: Install Application [Re: Kdyer]
wreded Offline
Fresh Scripter

Registered: 2003-11-06
Posts: 28
Loc: Montana, USA
Thanks Ken,
i tried run first, but i needed the routine to pause while the first install takes place then i can go into the next one.
i found my main problem with Vista; even though i'm running the script with "admin" rights (or what passes for admin rights around here) i need to have "elevated" privileges to install using a script. If i type the same command line it takes off. Go figure. i am barred from using any of the RUNNAS-type routines so i've got to work with what i've got.
What i can do is try to make a script that creates a directory, copies the existing template file into it and then parses that file to replace the "abc@" string with a user's credentials. i'm including the "@" because "abc" occurs other places within the template file and i want to make the right replacement.
i understand file parsing, but have never done it for real. How would i do it? Pass through the file until a variable containing "abc@" is filled, mark the beginning then replace it with another variable? The actual doing it is where i have problems.
Thanks,
Dave

Top
#195091 - 2009-07-29 05:09 AM Re: Install Application [Re: wreded]
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
What you are going to want to do is to place debug statements on each of the steps and evaluate what the response is. For example:
 Code:
DEBUG ON
MD C:\Some_Directory
?@error + ' RESULT'
?@serror } ' SCRIPT RESULT'


You can find out more about DEBUG, @SERROR, and @ERROR and more from the KiXtart documentation.

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#195288 - 2009-08-05 11:15 PM Re: Install Application [Re: Kdyer]
wreded Offline
Fresh Scripter

Registered: 2003-11-06
Posts: 28
Loc: Montana, USA
The error i get is @error = "740" and @Serror = "The requested operation requires elevation." i'm using my administrative logon so i'm puzzled as to why this should be happening. Using the same logon i can directly type in the executable name and it takes off.
The same thing works like a champ in XP, but under Vista i am stumped.
Things that make You go "hmmmmm."
Dave


Edited by wreded (2009-08-05 11:16 PM)

Top
#195291 - 2009-08-05 11:51 PM Re: Install Application [Re: wreded]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Definitely sounds like the UAC is getting in the way. I always disable it, but that may not be an option for you. Glenn, who is a regular around here may have some suggestions as I believe he took Vista head on.
_________________________
(... better days ahead)

Top
#195295 - 2009-08-06 12:22 AM Re: Install Application [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Better than taking it in the, er, head, I suppose...

I never disable UAC, actually, and have learned to work around it fairly well. Still bugs me (being polite here), though, that a Domain Admin isn't equivelent to the local Administrator. Just today, when testing the new PinIt UDF, I had to run as Administrator, since my domain admin account would not work.

I also never use RunNas with embedded passwords.. so can't be much help there. What I do use, and has been VERY effective, is the task scheduler. I can be a normal user, create a task event that runs with any credentials, and can be configured to run without a trigger and then executed manually. This has been discussed in detail many times in the past few months, so do a quick search for "tclib" and "scheduled task" for more ideas.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#195361 - 2009-08-09 04:02 AM Re: Install Application [Re: Glenn Barnas]
wreded Offline
Fresh Scripter

Registered: 2003-11-06
Posts: 28
Loc: Montana, USA
Thanks for the input. i'll try the scheduled task thing next. i got around it by making two .BAT files to do the installs and calling them from the script. It works, but it seems rather cludgy. As usual i have about 10 irons in the fire so down and dirty at least takes one iron out.
Thanks,
Dave

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

Generated in 0.058 seconds in which 0.03 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