using Windows Script Host
- by Axarydax
Hello, I am using windows script host for some kind of installer application and I'm creating shortcuts in start menu with it. This problem came up when I switched to x64 environment (win7 ultimate x64+vs2010)
I added a reference to Windows Script Host Object Model (from c:\windows\syswow64\wshom.ocx), it generated Interop.IWshRuntimeLibrary dll.
I added 'using IWshRuntimeLibrary;' to my .cs files, but when I tried to create
WshShell sh = new WshShellClass();
it throws an exception:
Could not load file or assembly 'Interop.IWshRuntimeLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I assume that I would need 64-bit version of that wshom.ocx for this to work, but I don't know what should I try.
Or I'll just dump Windows Script stuff, but I need another way to create start menu shortcuts from .net application. Thanks