Re: Startup folder in .NET



This kind of thing depends on the account you're running with (I don't think
SYSTEM has a profile) and whether you're impersonating (which by default
does not load registry hive data for that user). If it's an account which
has never interactively logged on then maybe those folders have never been
set up. It will also depend on whether anyone actually logs on or not. The
Startup folder is not run when Windows starts (for which you need a service)
but when logon occurs.
--
Phil Wilson

"bob laughland" <peter.mcclymont@xxxxxxxxx> wrote in message
news:dcd836f1-abf5-4306-a922-b9ac1c8d7fad@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,

Within our application is some configuration which allows the user to
add a link into the startup folder. That of course will mean our
application would then start automatically when windows starts.

We are using .NET 3.5 C#. So I am using this C# code to get the
startup folder path,

Environment.GetFolderPath(Environment.SpecialFolder.Startup)

That works on my local development machines (windows 2008 server and
vista). But it does not work on our build server, what I mean is it
actually returns an empty string on our build server.

It used to work on our old build server (windows 2003) but when I
rebuilt our build server using windows 2008 it didn't work.

Any ideas? Is it the case that when the startup folder has not been
used before something within the OS has not been initiali


.



Relevant Pages

  • Re: Cannot connect to the Internet
    ... My Windows 2000 pro PC is connected to the internet (Local Area ... Connection 2 Status icon shows "Connected" with a speed of 10..0 ... The master browser has received a server announcement from ... Posted via a free Usenet account from http://www.teranews.com ...
    (microsoft.public.mac.virtualpc)
  • Re: Username and Password boxes keep opening -- then error message
    ... might not have been a POP3 account. ... entered something other than a POP3 server address when setting it up (15 ... MS MVP-IE, Mail, Security, Windows Desktop Experience - since 2002 ... Reinstall Avast & disable email scanning. ...
    (microsoft.public.windows.vista.mail)
  • Re: Using EFS with Network Shares and SFU 3.5
    ... It does not take EFS into account. ... could again use the sharing server audit logs to see if success ... Read extended attribute and Read data, since the NFS client may ... Windows and *nix clients. ...
    (microsoft.public.windows.server.security)
  • Re: Error 10061, 0x800ccc0e, bug?
    ... It's definitely the April Windows update!!!! ... Checked program files after restore and the updates are gone and OE is ... receive mail after changing account in windows. ... Mike, the error indicates that you are failing to connect to the server, ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: IIS 6 CreateObject premissions issue
    ... You have a web application running on Windows 2003. ... This exact same design works on a Windows 2000 server environment. ... LogonMethod metabase property tells IIS how the anonymous user account ... the Anonymous account is configured to run under the IUSR_SERVERNAME ...
    (microsoft.public.inetserver.iis.security)

Loading