cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Aaron_Barnett
Level 5

LaunchAppAndWait - Encrypt Web.config file.

if (LaunchAppAndWait("%WinDir%\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis", "-pe \"connectionStrings\" -app \"//ERA8\" -prov \"DataProtectionConfigurationProvider\"", WAIT) < 0) then

MessageBox ("Failed to encrypt web.config",SEVERE);

endif;


The above code should run:
LaunchAppAndWait("%WinDir%\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis"
With the following command line parameters:
pe \"connectionStrings\" -app \"//ERA8\" -prov \"DataProtectionConfigurationProvider\"

But every time the install runs this .... (OnFirstUIAfter) ... the result is -1
and it doesn't work..

If i run this app with the command line params manually - it works fine.

Any ideas? has anyone come across this issue?
Labels (1)
0 Kudos
(1) Reply
RobertDickau
Flexera Alumni

For a start, LaunchAppAndWait might not like %WINDIR% inside the string; perhaps start the argument with WINDIR ^ "Microsoft.NET\\etc."? You might also want to include the .exe extension on the executable argument.
0 Kudos