views:

197

answers:

1

I'm running into an issue where I need to be able to change the target directory path that my IIS 5.0 virtual directory is pointing to from within a Post-Build block in Visual Studio 2008.

If you're not familiar with Post-Build events they basically just take batch commands. So if you know of a batch command for IIS 5.0 in XP Pro that can change the target directory that a virtual directory is pointing to that would really help.

Thanks in advance!

+1  A: 

http://stackoverflow.com/questions/371207/can-i-automate-creating-a-net-web-application-virtual-directory-in-iis-5 to run VBScript in command line, use CScript.

Sheng Jiang 蒋晟
Great! Do you know of a way to specify the language in the post-build event? I know I can type in batch commands without needing to specify anything. For vbscript do I need to put a header or something at the top?
Adam
no, just add the location of cscript to your path. By default it is under C:\Windows\System32.
Sheng Jiang 蒋晟
This is perfect. Thanks! I ended up needing to make some changes so that it would just change the path of the virtual directory instead of creating it each time, but the changes were minor. Thanks!
Adam