Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

Question about writing windows apps that write to network drives under vista/uac

microsoft.public.windows.vista.security






Speedup My PC
Reply
  #1 (permalink)  
Old 04-23-2007
fig000
 

Posts: n/a
Question about writing windows apps that write to network drives under vista/uac
Hi,

I am new to vista and uac. We have an app that was written under
vs2003 (windows). When the app runs normally it has a problem creating
and writing to network directories. I've gotten around this to some
extent by having the app run as administrator by default. Of course
this means that I get the UAC prompt asking if I want to allow the app
to run.

I'm wondering if this is the best I can do. I've noticed that other
apps (my program text editor for example) can write to the same
network drives without any trouble and without any prompts from UAC.
So, it seems, can notepad. This makes me wonder about how this is
done. Do these apps have elevated privilages by using a manifest and
AIS (as I've read about) or is there something more standard that
these apps do? We have third party app here that we sell and it will
be running on our customer's desktops. I'd like to use the best
technique to allow it to run and I'm wondering what other commercial
apps such as notepad do.

Any help would be appreciated.

Fig

Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-23-2007
=?Utf-8?B?SmVzcGVy?=
 

Posts: n/a
RE: Question about writing windows apps that write to network drives u
Can you give some more information on how you write to network drives in this
app? What you are describing should not have anything to do with UAC. UAC
being enabled on a client would not impact the token you have on a server.
However, if the server is running Vista with UAC enabled, and you are
connecting to it as an administrator the presence of UAC on the server could
have an impact.

What does the code look like that performs this writing? It sounds to me
like this is related to something else in the code, not UAC.
---
Your question may already be answered in Windows Vista Security:
http://www.amazon.com/gp/product/047...otectyourwi-20


"fig000" wrote:

> Hi,
>
> I am new to vista and uac. We have an app that was written under
> vs2003 (windows). When the app runs normally it has a problem creating
> and writing to network directories. I've gotten around this to some
> extent by having the app run as administrator by default. Of course
> this means that I get the UAC prompt asking if I want to allow the app
> to run.
>
> I'm wondering if this is the best I can do. I've noticed that other
> apps (my program text editor for example) can write to the same
> network drives without any trouble and without any prompts from UAC.
> So, it seems, can notepad. This makes me wonder about how this is
> done. Do these apps have elevated privilages by using a manifest and
> AIS (as I've read about) or is there something more standard that
> these apps do? We have third party app here that we sell and it will
> be running on our customer's desktops. I'd like to use the best
> technique to allow it to run and I'm wondering what other commercial
> apps such as notepad do.
>
> Any help would be appreciated.
>
> Fig
>
>

Reply With Quote
  #3 (permalink)  
Old 04-24-2007
Gerry Hickman
 

Posts: n/a
Re: Question about writing windows apps that write to network drivesunder vista/uac
Hi,

In general, your app will be able to save to a network drive provided
you are logged into the computer with an account that can also access
the network drive, it does NOT need to be an Administrator.

fig000 wrote:
> Hi,
>
> I am new to vista and uac. We have an app that was written under
> vs2003 (windows). When the app runs normally it has a problem creating
> and writing to network directories. I've gotten around this to some
> extent by having the app run as administrator by default. Of course
> this means that I get the UAC prompt asking if I want to allow the app
> to run.
>
> I'm wondering if this is the best I can do. I've noticed that other
> apps (my program text editor for example) can write to the same
> network drives without any trouble and without any prompts from UAC.
> So, it seems, can notepad. This makes me wonder about how this is
> done. Do these apps have elevated privilages by using a manifest and
> AIS (as I've read about) or is there something more standard that
> these apps do? We have third party app here that we sell and it will
> be running on our customer's desktops. I'd like to use the best
> technique to allow it to run and I'm wondering what other commercial
> apps such as notepad do.
>
> Any help would be appreciated.
>
> Fig
>



--
Gerry Hickman (London UK)
Reply With Quote
  #4 (permalink)  
Old 04-27-2007
fig000
 

Posts: n/a
Re: Question about writing windows apps that write to network drives u
Jesper,

Thanks for answering and sorry it took a little while to get back
to you. My boss had to find the code.

Here's what we're using at startup of the program. The code reads a
config file for directories it needs to work. If they're not there it
creates them. That is failing on vista ultimate unless I run as
administrator. On vista home it doesn't work even if I ran as
administrator.

Here's the code and thanks again for answering.

-----------------------------------------
Try
_RootGroupsFolder = AppMain.AppVar.Main.MyFolder
Trace.WriteLineIf(AppMain.AppVar.Trace.Level.Info,
"Message.", Routine)
If bDebugStartup Then MessageBox.Show("Message.")
If Not System.IO.Directory.Exists(_RootGroupsFolder) Then
Viewer_StatusChange("Creating folders...")
System.IO.Directory.CreateDirectory(_RootGroupsFol der)

System.IO.Directory.CreateDirectory(System.IO.Path .Combine(_RootGroupsFolder,
"Folder1"))

System.IO.Directory.CreateDirectory(System.IO.Path .Combine(_RootGroupsFolder,
"Folder2"))

System.IO.Directory.CreateDirectory(System.IO.Path .Combine(_RootGroupsFolder,
"Folder3"))

System.IO.Directory.CreateDirectory(System.IO.Path .Combine(_RootGroupsFolder,
"Folder4"))
End If
Catch ex As Exception
HandleStartupError(ex, String .Concat("Unable to create
group folder '", _RootGroupsFolder, "'", System.Environment.NewLine,
System.Environment.NewLine, ex.Message))
Return
End Try




On Apr 23, 1:56 pm, Jesper <Jes...@discussions.microsoft.com> wrote:
> Can you give some more information on how you write to network drives in this
> app? What you are describing should not have anything to do with UAC. UAC
> being enabled on a client would not impact the token you have on a server.
> However, if the server is running Vista with UAC enabled, and you are
> connecting to it as an administrator the presence of UAC on the server could
> have an impact.
>
> What does the code look like that performs this writing? It sounds to me
> like this is related to something else in the code, not UAC.
> ---
> Your question may already be answered in Windows Vista Security:http://www.amazon.com/gp/product/047...otectyourwi-20
>
> "fig000" wrote:
> > Hi,

>
> > I am new to vista and uac. We have an app that was written under
> > vs2003 (windows). When the app runs normally it has a problem creating
> > and writing to network directories. I've gotten around this to some
> > extent by having the app run as administrator by default. Of course
> > this means that I get the UAC prompt asking if I want to allow the app
> > to run.

>
> > I'm wondering if this is the best I can do. I've noticed that other
> > apps (my program text editor for example) can write to the same
> > network drives without any trouble and without any prompts from UAC.
> > So, it seems, can notepad. This makes me wonder about how this is
> > done. Do these apps have elevated privilages by using a manifest and
> > AIS (as I've read about) or is there something more standard that
> > these apps do? We have third party app here that we sell and it will
> > be running on our customer's desktops. I'd like to use the best
> > technique to allow it to run and I'm wondering what other commercial
> > apps such as notepad do.

>
> > Any help would be appreciated.

>
> >Fig



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB external drives and Vista question =?Utf-8?B?R3VpZG8gQ2F1dHJlZWxz?= microsoft.public.windows.vista hardware devices 2 04-26-2007 16:10
Writing Secure Code for Windows Vista Steve Security News 0 04-23-2007 06:19
Writing an RFP for a Network Access Control Solution Paul Security News 0 02-28-2007 19:03
UAC Manifest for VB6 Apps will f microsoft.public.windows.vista.security 1 02-24-2007 01:32
UAC and network shares question Corey Hildebrandt microsoft.public.windows.vista.networking sharing 1 01-15-2007 00:30




All times are GMT +1. The time now is 11:46.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120