Here's the code.
Detecting what mode IIS is running on:
Code: Select all
~InstallAware Clipboard Data~
~End~
~{A1D72AA6-ADBD-4282-8C16-CCAAB6A019AA}~
~End~
~{64CEE5BC-6EF5-4EBB-B2F0-8EA78BA3C390}~
~Set Variable~
~{DD0BF621-C0C3-40AE-AFFC-F7123EFAFCEE}~
~IIS64$MYAH$MYAH$FALSE~
~True~
~If~
~{F21E2880-5A03-43A9-8389-53EADCA38ABD}~
~CHECK32ON64~
~0~
~Enable32bitAppOnWin64 : (BOOLEAN) False~
~FALSE~
~End~
~{2D7665C8-9023-439B-98E1-C83D0DF952F0}~
~Set Variable~
~{9A763A9A-87AC-4C77-A634-E97BC1C5020F}~
~IIS64$MYAH$MYAH$FALSE~
~False~
~If~
~{5F7531F0-76B2-4E94-A2CA-CB2E0680AAFF}~
~CHECK32ON64~
~0~
~Enable32bitAppOnWin64 : (BOOLEAN) True~
~FALSE~
~Run Program~
~{C308B1CF-BB05-4406-B499-FD91D9BBE01F}~
~del~
~TRUE~
~/q /f "$MYTEMPDIR$\\check32on64.tmp"~
~FALSE~
~~
~Read from Text File~
~{186FCA93-D214-42A2-B92B-CA872DFAAD2A}~
~$MYTEMPDIR$check32on64.tmp~
~CHECK32ON64~
~~
~Run Program~
~{46A02A2F-21EB-4F22-8CA3-47363EB9082C}~
~cmd~
~TRUE~
~/c $TEST$~
~TRUE~
~a32BITON64~
~Set Variable~
~{722B7B7E-925E-4CCD-9CEB-7AE1FFF26B0E}~
~TEST$MYAH$MYAH$FALSE~
~cscript /Nologo "$MYROOT$\\inetpub\\adminscripts\\adsutil.vbs" GET W3SVC/AppPools/Enable32bitAppOnWin64 > "$MYTEMPDIR$check32on64.tmp"~
~Get Folder Location~
~{790EFF44-159B-49AC-9843-60355ACCA5CF}~
~MYROOT~
~9~
~TRUE~
~If~
~{A4B54EE9-9C0A-45BE-82E4-183003C85A9E}~
~CHECKSYSTEM~
~0~
~TRUE~
~FALSE~
~Get System Settings~
~{49B7E0C7-744F-43C9-9E45-24842DE38F00}~
~CHECKSYSTEM~
~53~
~Comment~
~{01DE5418-73DD-4CE3-84A8-3FF06B046957}~
~Detect 64bit IIS ASP.NET~
Notice that I had to use a temporary variable before running the command. This is because for some reason, the run command would not successfully run the command with all those variables. This was so frustrating to figure out. So I had to use an intermediate variable.
This is how to use it afterwards (to register ASP.NET to IIS):
Code: Select all
~InstallAware Clipboard Data~
~End~
~{186335F3-5301-4671-95EC-806B3E60A7BA}~
~Run Program~
~{DBAB2ECB-85FE-4212-9551-6DEC2D144C89}~
~$WINDIR$Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis.exe~
~FALSE~
~-i~
~FALSE~
~~
~Else~
~{4741BD40-ADE5-4BB6-892E-1E46C7D46D60}~
~Run Program~
~{94447E62-9D18-4732-AFF1-A0F6AB25884F}~
~$WINDIR$\\Microsoft.NET\\Framework64\\v2.0.50727\\aspnet_regiis.exe~
~FALSE~
~-i~
~FALSE~
~~
~If~
~{B792AAA6-D25F-4551-A935-4AEABAF008F4}~
~IIS64~
~0~
~True~
~FALSE~
~Comment~
~{5CE82005-A761-4F53-96CD-8576A67F48A0}~
~ASP.NET Registering with IIS~
Hope it helps someone. Or if someone has a better version, please let me know.
Kenneth