Discussion:
OpenFileDialog.ShowDialog() fails in SUA
(too old to reply)
Tom Setzer
2007-05-17 19:23:45 UTC
Permalink
Hi,

I'm working on an application in VS2003 and deploying it to Vista. The app
is having trouble using the standard OpenFileDialog. I created a simplified
sample to see if it was something else that I was doing:

private void button1_Click(object sender, System.EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
return;
}

When running this through the Standard User Analyzer with "Elevate" turned
off, the dialog box never appeared and I found that the result was coming
back "CANCEL". When I turn "Elevate" on, the dialog appears normally.
When I turn it off, no dialog.

Is the OpenFileDialog or the ShowDialog method accessing something that
requires admin rights? Is there a way to fix this?

Tried this in VS2005 and saw same results.

Thanks

Tom
Yu Chen [MSFT]
2007-05-23 00:39:27 UTC
Permalink
Could you send me the test application or source code? You tested it on
Vista right?

Thanks,
Yu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Tom Setzer
Hi,
I'm working on an application in VS2003 and deploying it to Vista. The
app is having trouble using the standard OpenFileDialog. I created a
private void button1_Click(object sender, System.EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
return;
}
When running this through the Standard User Analyzer with "Elevate" turned
off, the dialog box never appeared and I found that the result was coming
back "CANCEL". When I turn "Elevate" on, the dialog appears normally.
When I turn it off, no dialog.
Is the OpenFileDialog or the ShowDialog method accessing something that
requires admin rights? Is there a way to fix this?
Tried this in VS2005 and saw same results.
Thanks
Tom
Yu Chen [MSFT]
2007-05-23 21:29:49 UTC
Permalink
Tom,

I wasn't able to repro the issue - the open file dialog comes up in both
"elevated" checked and unchecked cases. A few things you want to check:

1. use 32-bit Vista for your test
2. try use the latest AppVerifier (3.4)

Could you attach the exe binary file you have? I only have VS2005 and there
could be some difference in the generated exe file from VS2003.

Thanks,
Yu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Your email bounced when I tried to send it directly to you. Not sure why.
Hi Yu,
Here is the sample code.
I tested it in Vista.
Here are the steps I took.
1. compiled and ran on XP in Visual Studio 2003. Works fine.
2. Moved exe to Vista box with .net 2.0 installed. Run app. Works fine.
3. Installed .net 1.1. Ran app. Works fine.
4. Installed AppVerifier and Application Compatibility Toolkit.
5. Run Standard User Analyzer. Elevate is checked. Launch App. Works
fine.
6. Uncheck Elevate. Launch App. OpenFileDialog never opens. <----- (when
I check the value it is returning from the ShowDialog, it is returning
"CANCEL")
7. Switch users to Standard User. Run app. Works fine.
This is keeping us from being able to move forward with our certification
for Vista. Any help is appreciated.
Thanks
Tom
Post by Yu Chen [MSFT]
Could you send me the test application or source code? You tested it on
Vista right?
Thanks,
Yu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Tom Setzer
Hi,
I'm working on an application in VS2003 and deploying it to Vista. The
app is having trouble using the standard OpenFileDialog. I created a
private void button1_Click(object sender, System.EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
return;
}
When running this through the Standard User Analyzer with "Elevate" turned
off, the dialog box never appeared and I found that the result was coming
back "CANCEL". When I turn "Elevate" on, the dialog appears normally.
When I turn it off, no dialog.
Is the OpenFileDialog or the ShowDialog method accessing something that
requires admin rights? Is there a way to fix this?
Tried this in VS2005 and saw same results.
Thanks
Tom
Tom Setzer
2007-06-08 21:33:20 UTC
Permalink
Any luck with this?
I tried AppVerifier 3.4. Same results.
Here is the exe that I was testing with.
Thanks for your help.
Tom
Post by Yu Chen [MSFT]
Tom,
I wasn't able to repro the issue - the open file dialog comes up in both
1. use 32-bit Vista for your test
2. try use the latest AppVerifier (3.4)
Could you attach the exe binary file you have? I only have VS2005 and there
could be some difference in the generated exe file from VS2003.
Thanks,
Yu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Your email bounced when I tried to send it directly to you. Not sure why.
Hi Yu,
Here is the sample code.
I tested it in Vista.
Here are the steps I took.
1. compiled and ran on XP in Visual Studio 2003. Works fine.
2. Moved exe to Vista box with .net 2.0 installed. Run app. Works fine.
3. Installed .net 1.1. Ran app. Works fine.
4. Installed AppVerifier and Application Compatibility Toolkit.
5. Run Standard User Analyzer. Elevate is checked. Launch App. Works
fine.
6. Uncheck Elevate. Launch App. OpenFileDialog never opens. <----- (when
I check the value it is returning from the ShowDialog, it is returning
"CANCEL")
7. Switch users to Standard User. Run app. Works fine.
This is keeping us from being able to move forward with our
certification
for Vista. Any help is appreciated.
Thanks
Tom
Post by Yu Chen [MSFT]
Could you send me the test application or source code? You tested it on
Vista right?
Thanks,
Yu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Tom Setzer
Hi,
I'm working on an application in VS2003 and deploying it to Vista.
The
app is having trouble using the standard OpenFileDialog. I created a
private void button1_Click(object sender, System.EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
return;
}
When running this through the Standard User Analyzer with "Elevate" turned
off, the dialog box never appeared and I found that the result was coming
back "CANCEL". When I turn "Elevate" on, the dialog appears normally.
When I turn it off, no dialog.
Is the OpenFileDialog or the ShowDialog method accessing something that
requires admin rights? Is there a way to fix this?
Tried this in VS2005 and saw same results.
Thanks
Tom
Yu Chen [MSFT]
2007-06-12 23:23:39 UTC
Permalink
Tom,

Sorry I was out of town last week. I couldn't download the attached exe file
for some reason. I will follow up with you offline.

Thanks,
Yu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Tom Setzer
Any luck with this?
I tried AppVerifier 3.4. Same results.
Here is the exe that I was testing with.
Thanks for your help.
Tom
Post by Yu Chen [MSFT]
Tom,
I wasn't able to repro the issue - the open file dialog comes up in both
1. use 32-bit Vista for your test
2. try use the latest AppVerifier (3.4)
Could you attach the exe binary file you have? I only have VS2005 and there
could be some difference in the generated exe file from VS2003.
Thanks,
Yu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Your email bounced when I tried to send it directly to you. Not sure why.
Hi Yu,
Here is the sample code.
I tested it in Vista.
Here are the steps I took.
1. compiled and ran on XP in Visual Studio 2003. Works fine.
2. Moved exe to Vista box with .net 2.0 installed. Run app. Works fine.
3. Installed .net 1.1. Ran app. Works fine.
4. Installed AppVerifier and Application Compatibility Toolkit.
5. Run Standard User Analyzer. Elevate is checked. Launch App. Works
fine.
6. Uncheck Elevate. Launch App. OpenFileDialog never opens. <----- (when
I check the value it is returning from the ShowDialog, it is returning
"CANCEL")
7. Switch users to Standard User. Run app. Works fine.
This is keeping us from being able to move forward with our
certification
for Vista. Any help is appreciated.
Thanks
Tom
Post by Yu Chen [MSFT]
Could you send me the test application or source code? You tested it on
Vista right?
Thanks,
Yu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by Tom Setzer
Hi,
I'm working on an application in VS2003 and deploying it to Vista.
The
app is having trouble using the standard OpenFileDialog. I created a
private void button1_Click(object sender, System.EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
return;
}
When running this through the Standard User Analyzer with "Elevate" turned
off, the dialog box never appeared and I found that the result was coming
back "CANCEL". When I turn "Elevate" on, the dialog appears normally.
When I turn it off, no dialog.
Is the OpenFileDialog or the ShowDialog method accessing something that
requires admin rights? Is there a way to fix this?
Tried this in VS2005 and saw same results.
Thanks
Tom
Loading...