473,795 Members | 2,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\Micr osoft\Windows\C urrentVersion\R un") .

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 1322
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\Micr osoft\Windows\C urrentVersion\R un") .

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
5789
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 interpreter to start up very quickly (<1 second on a Windows box). Is there a way to have a 'stripped' down Python interpreter which can start up very quickly on a windows box. Once thing I was thinking of was to use PyExe to make a quick startup (does...
3
3051
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 buttons work. The form's name ('frmMain') is selected from in the Startup dialog box.
6
5046
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 adavance. with regards
12
2030
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, if they have been tampered then I will restore the original settings from the backup files I store in some hidden place. However now a guy said he has a tool that able to modify the Windows XP registry without even login to window - that means...
0
996
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 reference to an .XLA file and links to 2 .XLS files. However, when I use C# to open up my excel file, only the .XLA file got open up but the 2 .XLS files didn't. So now I've a lot of #VALUE and #NAME errors in my excel file. Can anyone help me...
12
5745
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. Here's the issue. While I'm working on my app, I'm linked to the backend on my computer. When I distribute the app, the backend file is obviously in a different location (on the client server). But the first time my app is started up at...
6
2692
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 startup.bat,shutdown.bat -MSDOS files). What additional path settings i have to do?. please help.
0
2167
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 database, and based on the URL of the site, displays different content. Currently there are 30 different sites in IIS, all in the same Application Pool, and all pointing at the same code-base. The performance issue is, when we have to make an...
3
1799
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 intermittent failure on startup - no errors or warnings are generated (including in the EventVwr). Once running there are no issues. The process is started either manually or spawned via a Windows service. The dll is compiled with the following compiler...
0
9673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10216
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10002
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.