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
1,648 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 250 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 3

Assisted Solution

by:berniep
berniep earned 250 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

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

636 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