windows - Automating an installation using BAT/PS scripts -
i have been attempting automate installation of 1 of applications have run few roadblocks , need help.
currently using dell's kace technology push installer local machines. installer run system user meaning not , can not have direct access network shares (relevant later).
the application installation workflow follows:
stop local security services allow software install
remove mapped drive letter x
map network drive x \test\test
testapp.exe /s
msiexec /i test.msi /quiet
start local security services allow software install
copy shortcut file desktop
the installation has 1 executable , 1 msi have run. exe installs mainframe application. msi file installs few files locally , registers 6 dll files located on mapped drive.
this issue comes in - because files must on share drive , installer running system -> system account account can't access mapped drive register files installation fails.
i further limited fact can't store username/password in plaintext in batch file.
here code far:
rem stopping mcafee services echo stopping mcafee services. net stop mcshield net stop mcafeeframework rem map network drive echo mapping network drive net use x: /delete /y net use x: \\test\test (here need - there way force username/password prompt here user? want user authenticate x drive mapping, allow installation move forward) echo starting test 1 installation test1.exe /s /v"/qb" echo starting test 2 installation msiexec /i test2.msi /quiet (if drive has not been mapped point, installation fails system account can't access drive) echo. rem restarting mcafee services echo starting mcafee services. net start mcshield net start mcafeeframework echo. rem copy shortcut xcopy "shortcut\*" "c:\users\public\desktop"
alternatively,
could/should convert ps script? know ps more powerful batch, wasn't sure how go it.
if forcing authentication prompt, mean need human input (and aren't running script remotely), line should interact existing login session , ask credentials:
start explorer \\test\test echo after have entered network credentials pause
once user enters valid ones, remaining script can continue
net use x: \\test\test
Comments
Post a Comment