473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Vista difficulties

Under Vista, the Dev Studio program installer adds a desktop shortcut
to the Desktop. (.Net application.) The shortcut does not have a
context menu item to run as administrator. However, if you create a
shortcut manually from the exe file it does have a context menu item
to run as administrator. Why are they different?

The big question is, why does the program only run if you run as
admin???

May 21 '07 #1
9 2644
On Mon, 21 May 2007 10:22:31 -0700, Bruce <br********@columbus.rr.com>
wrote:
Under Vista, the Dev Studio program installer adds a desktop shortcut
to the Desktop. (.Net application.) The shortcut does not have a
context menu item to run as administrator. However, if you create a
shortcut manually from the exe file it does have a context menu item
to run as administrator. Why are they different?
Good question. This is a pet-peeve of mine: the Windows shortcut file
format allows for customing the right-click menu, including not including
the "Run As..." item. And Windows provides no way to go in and change the
shortcut. I haven't looked too closely at the specifics, but I've always
been able to find the target application for the shortcut and run that
directly with "Run As...", or create a new, more conventional shortcut
that I can use the "Run As..." from.

Now, that said...assuming you're talking about running Visual Studio, it
should run just find without you being an admin. You do have to run it
once as an admin, to make sure some things are initialized properly, but
even that isn't strictly necessary (as near as I can tell, it's some
indexes that make certain things work better).

I think it's poor design to do it that way: the installer should
initialize whatever things need to be initialized so that non-admin users
can run the program immediately after installation. But the work-around
is pretty direct and harmless. Just run as admin once, and then you're
good to go. No "Run As..." necessary.

Pete
May 21 '07 #2
I should have made it clear that this was not Dev Studio but an
application we develop
and trying to get the kinks worked out under Vista. We cannot get it
to run under a
normal user account unless we run as admin. Any ideas about that?

On May 21, 1:58 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 21 May 2007 10:22:31 -0700, Bruce <brucewo...@columbus.rr.com>
wrote:
Under Vista, the Dev Studio program installer adds a desktop shortcut
to the Desktop. (.Net application.) The shortcut does not have a
context menu item to run as administrator. However, if you create a
shortcut manually from the exe file it does have a context menu item
to run as administrator. Why are they different?

Good question. This is a pet-peeve of mine: the Windows shortcut file
format allows for customing the right-click menu, including not including
the "Run As..." item. And Windows provides no way to go in and change the
shortcut. I haven't looked too closely at the specifics, but I've always
been able to find the target application for the shortcut and run that
directly with "Run As...", or create a new, more conventional shortcut
that I can use the "Run As..." from.

Now, that said...assuming you're talking about running Visual Studio, it
should run just find without you being an admin. You do have to run it
once as an admin, to make sure some things are initialized properly, but
even that isn't strictly necessary (as near as I can tell, it's some
indexes that make certain things work better).

I think it's poor design to do it that way: the installer should
initialize whatever things need to be initialized so that non-admin users
can run the program immediately after installation. But the work-around
is pretty direct and harmless. Just run as admin once, and then you're
good to go. No "Run As..." necessary.

Pete

May 21 '07 #3
<snipped>
>
The big question is, why does the program only run if you run as
admin???
That's because of UAC and escalated user privileges, and in some cases, even
a user that has Admin rights is forced to a Standard user model to protect
the O/S, for what that's worth, the privileges must be escalated by using
Run As Admin.

You can always disable UAC, but in doing that where applications are looking
at UAC, it may cause said application to terminate.

http://www.winsupersite.com/showcase...sta_ff_uac.asp

May 21 '07 #4
you need a manifest to "Make" your executable run as Adminstrator:

<?xml version="1.0" encoding="utf-8" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" >
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="someExecName"
type="win32" />
<description>Program description</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
If you search in this group, Willy DeNoyette has a much more detailed post
on this which the above was extracted from.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Bruce" wrote:
I should have made it clear that this was not Dev Studio but an
application we develop
and trying to get the kinks worked out under Vista. We cannot get it
to run under a
normal user account unless we run as admin. Any ideas about that?

On May 21, 1:58 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 21 May 2007 10:22:31 -0700, Bruce <brucewo...@columbus.rr.com>
wrote:
Under Vista, the Dev Studio program installer adds a desktop shortcut
to the Desktop. (.Net application.) The shortcut does not have a
context menu item to run as administrator. However, if you create a
shortcut manually from the exe file it does have a context menu item
to run as administrator. Why are they different?
Good question. This is a pet-peeve of mine: the Windows shortcut file
format allows for customing the right-click menu, including not including
the "Run As..." item. And Windows provides no way to go in and change the
shortcut. I haven't looked too closely at the specifics, but I've always
been able to find the target application for the shortcut and run that
directly with "Run As...", or create a new, more conventional shortcut
that I can use the "Run As..." from.

Now, that said...assuming you're talking about running Visual Studio, it
should run just find without you being an admin. You do have to run it
once as an admin, to make sure some things are initialized properly, but
even that isn't strictly necessary (as near as I can tell, it's some
indexes that make certain things work better).

I think it's poor design to do it that way: the installer should
initialize whatever things need to be initialized so that non-admin users
can run the program immediately after installation. But the work-around
is pretty direct and harmless. Just run as admin once, and then you're
good to go. No "Run As..." necessary.

Pete


May 21 '07 #5
"Bruce" <br********@columbus.rr.comwrote in message
news:11**********************@n15g2000prd.googlegr oups.com...
Under Vista, the Dev Studio program installer adds a desktop shortcut
to the Desktop. (.Net application.) The shortcut does not have a
context menu item to run as administrator. However, if you create a
shortcut manually from the exe file it does have a context menu item
to run as administrator. Why are they different?

The big question is, why does the program only run if you run as
admin???

In top of what peter said, the program runs when not running as an admin,
all you get is a dialog that it is "recommended" to run as administrator,
but for most of the development tasks it's safe to run as admin.
If you don't get that dialog, make sure you have installed SP1 and the
update for SP1 for VS2005 for Vista.

Willy.

May 21 '07 #6
"Bruce" <br********@columbus.rr.comwrote in message
news:11**********************@36g2000prm.googlegro ups.com...
>I should have made it clear that this was not Dev Studio but an
application we develop
and trying to get the kinks worked out under Vista. We cannot get it
to run under a
normal user account unless we run as admin. Any ideas about that?
That means that your tries to execute some API or API's that needs
"administrator" privileges, that also means that this code needs an
administrator account to run on XP. What exactly are you doing in this
application, is this an administrative application or not?

Willy.

May 21 '07 #7
On Mon, 21 May 2007 12:34:01 -0700, Peter Bromberg [C# MVP]
<pb*******@yahoo.yabbadabbadoo.comwrote:
you need a manifest to "Make" your executable run as Adminstrator:
[...]
If you search in this group, Willy DeNoyette has a much more detailed
post on this which the above was extracted from.
I don't suppose VS provides a more user-friendly way to edit the manifest
than copying and pasting that example into the XML file?

For example, a little checkbox that says "Require Administrator". :)

Pete
May 21 '07 #8
"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Mon, 21 May 2007 12:34:01 -0700, Peter Bromberg [C# MVP]
<pb*******@yahoo.yabbadabbadoo.comwrote:
>you need a manifest to "Make" your executable run as Adminstrator:
[...]
If you search in this group, Willy DeNoyette has a much more detailed
post on this which the above was extracted from.

I don't suppose VS provides a more user-friendly way to edit the manifest
than copying and pasting that example into the XML file?

For example, a little checkbox that says "Require Administrator". :)

This (and some other issues) is taken care of in Orcas, for the time being
you can do this from a post build step.

Willy.
May 21 '07 #9
It has to do with the way Vista interprets the install, which was created
prior to Vista. With SP1 and the Vista patch installed, it will bring up a
dialog box that informs you to run as admin. I believe this fixes the
shortcut, as well, but I am not certain.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Bruce" <br********@columbus.rr.comwrote in message
news:11**********************@n15g2000prd.googlegr oups.com...
Under Vista, the Dev Studio program installer adds a desktop shortcut
to the Desktop. (.Net application.) The shortcut does not have a
context menu item to run as administrator. However, if you create a
shortcut manually from the exe file it does have a context menu item
to run as administrator. Why are they different?

The big question is, why does the program only run if you run as
admin???

May 22 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: salad | last post by:
Due to an earlier posting I read in this newsgroup regarding Office 2007 beta, I downloaded it. After I DL'd it, I got an invitation from MS to get WinVista. I am now wondering if, since both...
13
by: Mark Rae | last post by:
Hi, On Friday I attended the Microsoft EVO conference in London where they talked about Vista, Office 2007 and Exchange 2007 and how they all work together beautifully, how they were all...
56
by: Squishy | last post by:
I tried installing my VS2005 Pro on Vista Ultimate 32 bit RTM today and got errors stating that VS2005 was not compatible with Vista. Microsoft......please pull your finger out of my ass and tell...
6
by: j2ee.singh | last post by:
Hi, I'm looking to buy a new laptop primarily to learn & practice .NET and C#. My Question is: Is there any requirement for .NET and C# in terms of the following Operating Systems: -...
2
by: Mike P | last post by:
I've heard rumours that VS 2003 is not supported by Vista, is this correct? I have just purchased a new laptop with Vista OS, does this mean I cannot work on any of my VS 2003 projects on it? ...
2
by: John Kotuby | last post by:
Hi all, I have been working on transferring my development environments to a new Vista ultimate machine (from XP) and am running into difficulties. After patching both SQL Server 2005 and VS 2005,...
0
by: WiFiUser | last post by:
Hello ALL, I am writing a site survey application using wifi api supported by Windows Vista. I want to show current wireless connection attributes like SSID, BSSID, Signal Strength(dBm) etc. ...
2
by: 13Rockes | last post by:
I am in the process of writing programs using VB6 in XP Pro. However, I am thinking about starting over using VB2005 as my company is migrating to Vista. Two questions... What kinds of...
11
by: idoublepress | last post by:
Hi all, I've been struggling with an issue that I hope you can comment on or provide suggestions to. Our .NET 2.0 (VS2005) based product is crashing (when the user selects a particular feature on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.