PC Review


Reply
Thread Tools Rate Thread

Current Working Directory of Startup Program

 
 
cccccccccccccc
Guest
Posts: n/a
 
      29th Sep 2009
I created a startup program by putting a registry entry in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Name="my program"
Type=string
Value="C:\some\directory\myProgram.exe"

This program opens a file in the Current Working Directory - say file
C:\some\directory\someFile.txt

When windows starts, it runs "C:\some\directory\myProgram.exe" and
cannot find "C:\some\directory\someFile.txt", I'm guessing because the
when it's executing this command it is from another directory. What
is the current working directory when Windows fires startup commands?
I tried copy "someFile.txt" to c:\windows\system32 with no luck.

Thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB 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
Current Working Directory of a process Blitr Microsoft Dot NET Framework 2 30th Mar 2006 08:54 AM
current working directory problem Jeff Microsoft VB .NET 4 19th Feb 2006 02:59 PM
Current Working Directory =?Utf-8?B?c3dhbWk=?= Microsoft Excel Programming 3 23rd Nov 2004 03:52 PM
getting the filename and the current directory of our program =?Utf-8?B?U3RydWJlbCBHcmVnb3J5?= Microsoft VC .NET 2 17th Feb 2004 11:26 AM
shortcut Start In box is NOT blank but program starts current working directory Percy Windows XP General 0 5th Nov 2003 10:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 PM.