/build/static/layout/Breadcrumb_cap_w.png

Batch file install issues.

I am having an issue with installing a something from a Batch file. To understand my dilemma:

I have an install that was created using a Batch scrip. The script installs several MSI files, creates a few registry keys, creates a couple folders(1 in Program files, 1 in Application Data\Program Data) and copies files to those folders. The install works fine in XP, however, on Windows 7 and Vista the programs errors out. It has been determined that it errors out because despite being logged in with an administrator account, it wasn't running with full admins, right clicking and selecting Run as Administrator will run the script just fine. So I tried creating a VB script with "Run as" with a temp account with admin rights username and password imbedded. This still does not work properly, it will install the MSI just fine (after clicking Yes for UAC), but it when it trys the reg key's edit and the folder creations and file copies it error out.

Plan of deployment is to send the users a link in an e-mail that will be a shortcut to the install file. All the users needs to do is run the script and the program will install. It may also be available on a local intranet page. Where again the user just needs to click the install link, and the program will install. The plan was to use the Run as command with a domain account that has local administrator rights, so it as rights to install on the local PC as well as has read access to the network location. (Please ignore the fact that this would require imbedded password in clear text)

So what I am looking for\need is a way to force full administrator rights with a script, preferable using a domain account. As a side note, if I disable UAC on the PC the entire script runs fine with the run as command.

0 Comments   [ + ] Show comments

Answers (13)

Posted by: GrGrGr 13 years ago
Orange Belt
0
Evers_mark
1) Do not use batch files. Embed all the needed changes inside .msi/.mst files.
or
2) Instruct users to right click the batch file and select - run as administrator. If they're local administrators on the PC.
or
3) I'm not completely sure ,but i think the standard windows "run as" does not support specifying the user password in the command-line
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/runas.mspx?mfr=true
You will need to develop your own solution to pass the password (we have one developed internally, for example)
or
Consider a per-user install?
Posted by: Evers_mark 13 years ago
Senior Yellow Belt
0
GrGrGr:

1: Using MST will not work in this case, as there are several MSI files that need to installed, along with the registry keys and folders and files that need to be copied, all the MSIs can be used using InstallLevel, or installing the defaults.
2. Users cannot simply right click and select Run As Admin, as the users do not have Admin rights.
3. Still working on that.
Posted by: GrGrGr 13 years ago
Orange Belt
0
Evers_mark
1. I do not see any limitations that would prevent you from making an .mst to replicate the changes that batch file commands do. Modifying the .msi package directly might be a solution, but I'm not really sure about the legal aspects of this.
2. You're not using any deployment system and deployment through GPO is also not possible?
3. You would have to have a pre-configured local administrator account on the target PCs to make your solution work (and you've already mentioned the open text password part). It seems a bit too much. :)


Hmm, the other thing I've missed is:
The install works fine in XP, however, on Windows 7 and Vista the programs errors out
Please give this a read:
http://msdn.microsoft.com/en-us/library/Aa372870
http://msdn.microsoft.com/en-us/library/aa367533(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/aa370310(v=vs.85).aspx

I've just tried to open a test installation with installshield and changed the Word Count Summary for my test .msi package - worked like a charm under limited user, well, except for the part that some directories in program files could not be created. :)
Posted by: Evers_mark 13 years ago
Senior Yellow Belt
0
ORIGINAL: GrGrGr

Evers_mark
1. I do not see any limitations that would prevent you from making an .mst to replicate the changes that batch file commands do. Modifying the .msi package directly might be a solution, but I'm not really sure about the legal aspects of this.
2. You're not using any deployment system and deployment through GPO is also not possible?
3. You would have to have a pre-configured local administrator account on the target PCs to make your solution work (and you've already mentioned the open text password part). It seems a bit too much. :)


1. The the MSI are not the limitations. The copying of files and regkeys edits are not part of any MSI or exe, they are custom, ex: one of the registry keys adds an ODBC database, another is a Custom shortcut that was created with certain flags.
2. At this time no deployment system is available to us, not even GPO.
3. Not an issue, already done.

ORIGINAL: GrGrGr
I've just tried to open a test installation with installshield and changed the Word Count Summary for my test .msi package - worked like a charm under limited user, well, except for the part that some directories in program files could not be created. :)


Not sure where this is going?
Posted by: GrGrGr 13 years ago
Orange Belt
0
1. You can still add those custom modifications to any .msi file that you are installing.
2. Sad. [8|]


From - http://msdn.microsoft.com/en-us/library/Aa372870
These are combined to give the Word Count Summary property one of the following values that indicate a type of source file image.
8 Elevated privileges are not required to install this package. Use this value when Authoring Packages without the UAC Dialog Box.
Available starting with Windows Installer version 4.0 and Windows Vista or Windows Server 2008.

If this specific property would be set for the .msi's you're installing - they might just work without any elevation like they did on Windows XP.
Posted by: kardock 13 years ago
Second Degree Green Belt
0
i wonder why all the stuff in #1 is not done in a msi file? files, reg keys, odbc, shortcuts... i manage all that in a msi.
Posted by: Evers_mark 13 years ago
Senior Yellow Belt
0
ORIGINAL: kardock

i wonder why all the stuff in #1 is not done in a msi file? files, reg keys, odbc, shortcuts... i manage all that in a msi.


What program do you use? We have no custom msi builder available to us that is not free or open source.

Right now I just installed AutoIT to see if I can convert my batch file and use it that way?
Posted by: anonymous_9363 13 years ago
Red Belt
0
1. As already stated, all that junk can be done in an MST.
2. No GP?!?!? How on God's green earth do you do things like customising IE e.g. to prevent users from adding sites to the 'Trusted Sites' zone?!? Prayer?
Posted by: Evers_mark 13 years ago
Senior Yellow Belt
0
ORIGINAL: VBScab

1. As already stated, all that junk can be done in an MST.
2. No GP?!?!? How on God's green earth do you do things like customising IE e.g. to prevent users from adding sites to the 'Trusted Sites' zone?!? Prayer?



1. How can all this be done in an MST? What programs are you using? Orca, Wise Studio Packaging, autoIT?

2. I never said we had no GP, it's just not an option to install software on the end user's PC.
Posted by: kardock 13 years ago
Second Degree Green Belt
0
wise package studio
Posted by: anonymous_9363 13 years ago
Red Belt
0
How can all this be done in an MST?If you don't have a proper authoring tool, open the MSI in Orca (having first made it read-only, to avoid accidentally saving any changes), make your changes, then save the result as a transform.
it's just not an option to install software on the end user's PC....but a monumental kludge involving AutoIt script is! LOL
Posted by: mayankjohri 13 years ago
Senior Yellow Belt
0
check this link http://www.installsite.org/pages/en/msi/authoring.htm . It has many version which are free and are quite good for normal use. or you can use few non msi packaging tools such as "Inno Setup" or nsis they both are free .

[align=center] [/align]
Posted by: mayankjohri 13 years ago
Senior Yellow Belt
0
or try more detailed list at http://en.wikipedia.org/wiki/List_of_installation_software
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ