Rrech
asked on
Runas with msiexec
Hello;
I am still rather new to the runas command, so any help would be greatly appreciated.
I would like to start an MSI install under a logon script. The script that I have created is purely in test mode right now, however it does not work:
copy y:\install\NEWica32pkg.msi c:\docume~1\%username%\des ktop\msifi le.msi
path %path%;y:\install
runas /u:%computername%\Administ rator "msiexec /i /package c:\docume~1\%username%\des ktop\NEWic a32pkg.msi "|sanur password
del c:\docume~1\%username%\des ktop\sanur .exe
del c:\docume~1\%username%\des ktop\NEWic a32pkg.msi
When I run this script, everything seems to run fine, except when it gets to the msiexec statement. I receive a window that states that the installation package could not be opened.... If I run the msiexec statement by it's self, then I do not receive an error.
The Sanur statement is a program that I found that will pipe in the password for runas. If I remove the Sanur statement, it seems does not change the error.
Any suggestions are greatly appreciated!
Thank you very much;
Rob
I am still rather new to the runas command, so any help would be greatly appreciated.
I would like to start an MSI install under a logon script. The script that I have created is purely in test mode right now, however it does not work:
copy y:\install\NEWica32pkg.msi
path %path%;y:\install
runas /u:%computername%\Administ
del c:\docume~1\%username%\des
del c:\docume~1\%username%\des
When I run this script, everything seems to run fine, except when it gets to the msiexec statement. I receive a window that states that the installation package could not be opened.... If I run the msiexec statement by it's self, then I do not receive an error.
The Sanur statement is a program that I found that will pipe in the password for runas. If I remove the Sanur statement, it seems does not change the error.
Any suggestions are greatly appreciated!
Thank you very much;
Rob
ASKER
sorry that was a typo on my part. NEWica32pkg was one of the apps that I was trying to push out. I copied the script directly, then renamed the newica32pkg names to msi file.
I tried what you suggested with using the full path..... I still recieved the same error.
I tried what you suggested with using the full path..... I still recieved the same error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are copying the msi file to the desktop and renaming it to "msifile.msi" in the process but later when you call msiexec, you use the original filename of NEWica32pkg.msi. Are you sure this script works fine without the runas?
If that was just a typo on your part, another thing to try is to provide the full path to msiexec which is usually:
%windir%\system32\msiexec.
Try using that ^^^^^^^ instead of just msiexec