Click here to Skip to main content
15,919,613 members
Home / Discussions / C#
   

C#

 
Questionregistration form Pin
AISIDA AKINWALE MAYOMI1-Dec-10 3:34
AISIDA AKINWALE MAYOMI1-Dec-10 3:34 
AnswerRe: registration form Pin
Pete O'Hanlon1-Dec-10 3:43
mvePete O'Hanlon1-Dec-10 3:43 
AnswerRe: registration form Pin
Henry Minute1-Dec-10 3:45
Henry Minute1-Dec-10 3:45 
AnswerRe: registration form Pin
musefan1-Dec-10 3:54
musefan1-Dec-10 3:54 
QuestionWindows Tab Control Flickering Pin
vishnukamath1-Dec-10 1:37
vishnukamath1-Dec-10 1:37 
AnswerRe: Windows Tab Control Flickering Pin
Abhinav S1-Dec-10 1:42
Abhinav S1-Dec-10 1:42 
QuestionSwitching on type Pin
creatiive30-Nov-10 23:44
creatiive30-Nov-10 23:44 
AnswerRe: Switching on type Pin
phil.o1-Dec-10 0:01
professionalphil.o1-Dec-10 0:01 
AnswerRe: Switching on type Pin
Pete O'Hanlon1-Dec-10 0:49
mvePete O'Hanlon1-Dec-10 0:49 
AnswerRe: Switching on type Pin
musefan1-Dec-10 1:01
musefan1-Dec-10 1:01 
GeneralRe: Switching on type Pin
creatiive1-Dec-10 2:34
creatiive1-Dec-10 2:34 
GeneralRe: Switching on type Pin
musefan1-Dec-10 2:55
musefan1-Dec-10 2:55 
AnswerRe: Switching on type Pin
Keith Barrow1-Dec-10 1:18
professionalKeith Barrow1-Dec-10 1:18 
GeneralRe: Switching on type Pin
musefan1-Dec-10 1:24
musefan1-Dec-10 1:24 
GeneralRe: Switching on type Pin
Keith Barrow1-Dec-10 1:52
professionalKeith Barrow1-Dec-10 1:52 
GeneralRe: Switching on type Pin
PIEBALDconsult1-Dec-10 2:26
mvePIEBALDconsult1-Dec-10 2:26 
GeneralRe: Switching on type Pin
Pete O'Hanlon1-Dec-10 2:57
mvePete O'Hanlon1-Dec-10 2:57 
AnswerRe: Switching on type Pin
PIEBALDconsult1-Dec-10 2:28
mvePIEBALDconsult1-Dec-10 2:28 
QuestionCall XP Mode shortcut programmatically [modified] Pin
spif200130-Nov-10 20:36
spif200130-Nov-10 20:36 
Hi
I'm trying to call a XP Mode shortcut programmatically, but I keep getting the same error message:

"problem starting C:\windows\system32\VMCPropertyHandler.dll The specified module could not be found"


I tried with the following:

string startPath = @"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup";<br />
Process p = new Process();<br />
p.StartInfo.FileName = startPath + "\\XPModeInitializer (Windows XP Mode).lnk";<br />
p.StartInfo.UseShellExecute = true;<br />
p.Start();



But I have also done many variants. I even tried making a bat file, that just call the link. The bat file itself works when double-clicked, but when called from within my code like the following snippet, I get the same error message:

Process p = new Process();<br />
p.StartInfo.FileName = Environment.CurrentDirectory + "\\CallXPModeInitializer.bat";<br />
p.StartInfo.UseShellExecute = true;<br />
p.Start();



I also tried taking the shortcut parameters and using them myself like this:

string file = System.Environment.SystemDirectory + @"\rundll32.exe";<br />
string arguments = System.Environment.SystemDirectory + @"\VMCPropertyHandler.dll,LaunchVMSal ""Windows XP Mode"" ""||a9c104ed"" ""XPModeInitializer""";<br />
Process p = new Process();<br />
p.StartInfo.FileName = file;<br />
p.StartInfo.Arguments = arguments;<br />
p.StartInfo.UseShellExecute = true;<br />
p.Start();



But it produces the same error message,
I'm confused at to why a direct use of the bat file works, when the call to the bat file from within C# fails!?

How can I call a XP Mode shortcut from within C# code?
I'm in the high-fidelity first class traveling set.
And I think I need a Lear jet.

modified on Wednesday, December 1, 2010 4:35 AM

AnswerRe: Call XP Mode shortcut programmatically Pin
Rajesh Anuhya30-Nov-10 22:27
professionalRajesh Anuhya30-Nov-10 22:27 
GeneralRe: Call XP Mode shortcut programmatically Pin
spif200130-Nov-10 22:35
spif200130-Nov-10 22:35 
AnswerRe: Call XP Mode shortcut programmatically Pin
Eddy Vluggen1-Dec-10 1:23
professionalEddy Vluggen1-Dec-10 1:23 
GeneralRe: Call XP Mode shortcut programmatically Pin
spif20011-Dec-10 1:52
spif20011-Dec-10 1:52 
GeneralRe: Call XP Mode shortcut programmatically Pin
Eddy Vluggen1-Dec-10 2:32
professionalEddy Vluggen1-Dec-10 2:32 
QuestionMultiple query results on one form. Pin
Joe Stansfield30-Nov-10 18:36
Joe Stansfield30-Nov-10 18:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.