Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to install windows service on windows 7 and vista by disabling user account control or some other way

Posted on 2010-09-08
9
Medium Priority
?
1,663 Views
Last Modified: 2013-11-27
Hey guys..

I really need your help in the my problem.

I developed a windows service based on .net framework 2.0. Till now I tested it on windows XP. Now it is ready to go to production. So eventually I need to test it on other windows versions also right. So I tried to test on windows 7.

I use batch file to execute my installation files(.exe, .dll etc). So when try it on windows 7, it is not allowing me to install. The error I am getting is:

Access to the path C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.InstallLog is denied

The problem I figured is User Account Control. How can I add my application as an exception to user account control or what is the other way to do it.

I guess I am going to face same kind of problem in windows vista also.

I developed my windows service in C# using .NET Framework 2.0

I really need it as soon as possible. Thanks guys for your help.

Rakhy...
0
Comment
Question by:rakhy_rakey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
9 Comments
 
LVL 3

Expert Comment

by:berniep
ID: 33632994
There's quite a good write-up on UAC here:
http://technet.microsoft.com/en-us/library/cc709691(WS.10).aspx

But I don't think it will allow you to automate your install.  Can you automate changing the directory permissions to everyone/full control for that log file?
0
 

Author Comment

by:rakhy_rakey
ID: 33633233
Thanks for the reply...I will try to change the directory permissions.
0
 
LVL 10

Accepted Solution

by:
joriszwaenepoel earned 1000 total points
ID: 33633889
Have you tried to run your batch file with "Run As Administrator"?  It has worked for me on a Windows Server 2008, I haven't tried it on a Windows 7.
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 3

Assisted Solution

by:berniep
berniep earned 1000 total points
ID: 33634106
or using the command line "runas" :

C:\>runas
RUNAS USAGE:

RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ]
        /user:<UserName> program

RUNAS [ [/noprofile | /profile] [/env] [/savecred] ]
        /smartcard [/user:<UserName>] program

RUNAS /trustlevel:<TrustLevel> program

   /noprofile        specifies that the user's profile should not be loaded.
                     This causes the application to load more quickly, but
                     can cause some applications to malfunction.
   /profile          specifies that the user's profile should be loaded.
                     This is the default.
   /env              to use current environment instead of user's.
   /netonly          use if the credentials specified are for remote
                     access only.
   /savecred         to use credentials previously saved by the user.
                     This option is not available on Windows Vista Home or Windows Vista Starter Editions
                     and will be ignored.
   /smartcard        use if the credentials are to be supplied from a
                     smartcard.
   /user             <UserName> should be in form USER@DOMAIN or DOMAIN\USER
   /showtrustlevels  displays the trust levels that can be used as arguments
                     to /trustlevel.
   /trustlevel       <Level> should be one of levels enumerated
                     in /showtrustlevels.
   program         command line for EXE.  See below for examples

Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

NOTE:  Enter user's password only when prompted.
NOTE:  /profile is not compatible with /netonly.
NOTE:  /savecred is not compatible with /smartcard.

Except that I find it needs a password:

C:\>runas /user:administrator cmd
Enter the password for administrator:
Attempting to start cmd as user "BERNIEP\administrator" ...
0
 

Author Comment

by:rakhy_rakey
ID: 33754496
hey I got the answer for this one.

I use microsoft visual studio to build msi set up file. And I used commands to for silent installation. It worked fine in vista and 7. But all we need to do is, we need administrative previleges.

Thanks guys for help..

Rakhy...
0
 
LVL 10

Expert Comment

by:joriszwaenepoel
ID: 33760568
You tell all you need is administrative privileges.
Maybe you could accept my pervious comment as the answer, instead of just closing the question.
0
 
LVL 3

Expert Comment

by:berniep
ID: 33774721
Hi there, I would think that both my comments provided some help to the solution:
http:#a33632994
http:#a33634106
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question