473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Run at startup with dependent files?

Greetings,

I'm trying to have an application resume after a reboot, by making an entry
into the Run registry key ("SOFTWARE\Microsoft\Windows\CurrentVersion\Run ") .

This works great, and my application starts up after a successfull reboot.
However, my application needs to read a text file in the same directory as
the executable, and for some reason, it cannot access this file when the
program is started by the Run registry key. If I run the executable manually,
it can find the text file just fine. Is there a way to allow my application
to access other dependent files when being run in this manner? Any ideas
would be appreciated.

Thanks,
Peter
Dec 13 '05 #1
6 1302
I answerd my own question. It turns out all I needed to do was give my
program the full path the text file, instead of allowing it to assume it is
in the same directory, and that solved it.
"Pyerwoh" wrote:
Greetings,

I'm trying to have an application resume after a reboot, by making an entry
into the Run registry key ("SOFTWARE\Microsoft\Windows\CurrentVersion\Run ") .

This works great, and my application starts up after a successfull reboot.
However, my application needs to read a text file in the same directory as
the executable, and for some reason, it cannot access this file when the
program is started by the Run registry key. If I run the executable manually,
it can find the text file just fine. Is there a way to allow my application
to access other dependent files when being run in this manner? Any ideas
would be appreciated.

Thanks,
Peter

Dec 13 '05 #2
Are you building in program logic to handle a situation when something
like adaware prevents you from adding an entry to the startup registry
key?

Dec 13 '05 #3
No, i haven't built in anything like that yet, but I would love some
suggestions if you have any.

Thanks,
Peter

"gr***********@gmail.com" wrote:
Are you building in program logic to handle a situation when something
like adaware prevents you from adding an entry to the startup registry
key?

Dec 13 '05 #4
I've only had one app that needed a reboot to continue the
installation. In order to get around the inability to add items to the
\Run reg key (it took me 20 mins to remember I had adaware blocking it
on my own machine) I added my own application registry key and used a
ContinueInstall flag which was cleared by the finishing setup in the
\Run reg key.

If the main app was started with the ContinueInstall still set true I
would either a) warn the user to allow the install to continue through
rebooting or b) finish the upgrade/install from the main application if
it's allowed by the system.

I've found a series of apps that prevent \Run keys other that adaware.
Symantec will do it, Mcafee can prevent it and MS's spyware app can
prevent it as well.

Dec 13 '05 #5
I try to use the \Run reg key and check to see if it failed by using
the application launcher to check the ContinueInstall flag. If the
flag is set I can warn the user that the install didn't finalize and
they need to perform another reboot while allowing the \Run key to be
set.

Now, 99% of end users will end up calling when you tell them that the
\Run key was blocked by their system as they wont know what blocked it
or how to allow it but with spyware what it is these days it's a very
common issue we run into where app installs wont get access to the \run
key.

One thing we've added to our installer is a check to make sure the key
is in the \runonce key before rebooting the machine. This gives the
user the chance to allow the program to be given access to the \runonce
key before the reboot takes place. We still have the issue where users
who've installed blocking software still have no idea *how* to allow
access but thats a different post.

Dec 13 '05 #6
So if you don't use Run or RunOnce, what mechanism do you use to start the
program after the reboot?
"gr***********@gmail.com" wrote:
I've only had one app that needed a reboot to continue the
installation. In order to get around the inability to add items to the
\Run reg key (it took me 20 mins to remember I had adaware blocking it
on my own machine) I added my own application registry key and used a
ContinueInstall flag which was cleared by the finishing setup in the
\Run reg key.

If the main app was started with the ContinueInstall still set true I
would either a) warn the user to allow the install to continue through
rebooting or b) finish the upgrade/install from the main application if
it's allowed by the system.

I've found a series of apps that prevent \Run keys other that adaware.
Symantec will do it, Mcafee can prevent it and MS's spyware app can
prevent it as well.

Dec 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Neil Benn | last post by:
Hello, I'm looking at a small app which would need a very quick startup time for the Python interpreter. It doesn't do much (copying and caching of files, no GUI) but I need the Python...
3
by: Douglas Buchanan | last post by:
Buttons don't work if form is opened on startup A2k If 'frmMain' is set to open by default at startup none of the buttons work. If 'frmMain' is opened from the database window then all the...
6
by: Ramaraj | last post by:
Hi All, I am very interest to know the c-startup routine (like GNU gcc C-startup routine). and it s working principle and How this function is attached to operating system Thanks in...
12
by: chinkuang | last post by:
Hi Everyone: I have a question here: I used a startup object to protect my application - whenever PC starts up, I will check the setting of my application like registry, program files and so on,...
0
by: e'kong.tse | last post by:
Hi All, I'm trying to use C# to open up an Excel file that has a bunch of dependent files. Inside Excel, you can specify the startup files in Tools->Options->General Tab. My excel file has a...
12
by: rdemyan via AccessMonster.com | last post by:
I'm having a complicated linking problem. Before I get into the particulars, I'd like to know how Access links to the back-end file at startup, AFTER I've distributed my application to the client....
6
by: shaileshkumar | last post by:
iam able to startup & shutdown tomcat server from the bin directory. But when i have copied the same files on to the desktop,iam unable to do so. my operating system is xp. (i have copied...
0
by: ccrocetti | last post by:
Hello, I am having some trouble with performance issues using ASP.NET. We have a single code-base that is used as a wrapper for multiple sites. The data for the site is populated from the...
3
by: =?Utf-8?B?RVF1QWw=?= | last post by:
Hi, We have an application developed in VC2005 with mixed code, primarily C++ but using a C# dll for database access (DBUploader), the dll exposes a C++ interface. We are experiencing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.