Calling asp_regiis from VBscript in MSI
I have a VBscript to call the aspnet_regiis utility that is part of the dot net framework to encrypt an xml file. This command runs fine when called at a cmd prompt or batch file but is failing without error when run from a vbscript in an msi. Is there a special way I need to call this command in a VBscript to use within an MSI?
StrMessage = "Current install variable: EncryptionCmd ->" & StrDotNetBinFolder &"aspnet_regiis -pef ""connectionStrings"" """&StrInstallFolder&""""
WriteLog LogFilePath, StrMessage
'Encrypt connection strings: wait for it to complete before moving onto next step
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("cmd /c"&StrDotNetBinFolder &"aspnet_regiis -pef ""connectionStrings"" """&StrInstallFolder&"""")
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
anonymous_9363
15 years ago
- Does the script execute OK outside of the MSI?
- Why bother calling CMD.EXE? Just call the EXE directly.
- Does 'StrDotNetBinFolder' have a trailing backslash? If not, add one. Or better yet, add code to make sure there is one.
Also, you'll find your code easier to read if you enclose only actual strings in quotes and use Chr(34) instead where lines require quotes.
- Why bother calling CMD.EXE? Just call the EXE directly.
- Does 'StrDotNetBinFolder' have a trailing backslash? If not, add one. Or better yet, add code to make sure there is one.
Also, you'll find your code easier to read if you enclose only actual strings in quotes and use Chr(34) instead where lines require quotes.
Posted by:
captain_planet
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.