473,394 Members | 1,765 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,394 software developers and data experts.

Runtime information

How can i get information in code if exec was execute in cd-rom or in
hard drive ??
My prog should only work from cd-rom so i need to know i code if it was
executed from cd or not.
Ty for any help.

Sep 27 '06 #1
3 1092
Hello, ta*****@tlen.pl!

tHow can i get information in code if exec was execute in cd-rom or in
thard drive ??
tMy prog should only work from cd-rom so i need to know i code if it
twas
texecuted from cd or not.
tTy for any help.


Have a look at GetDriveType(...) win32 API.
See how to call
( http://www.pinvoke.net/search.aspx?s...ype&namespace=[All] )

Why do you put such constraint on your application?

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Sep 27 '06 #2

Vadym Stetsyak napisal(a):
Hello, ta*****@tlen.pl!

tHow can i get information in code if exec was execute in cd-rom or in
thard drive ??
tMy prog should only work from cd-rom so i need to know i code if it
twas
texecuted from cd or not.
tTy for any help.
Have a look at GetDriveType(...) win32 API.
See how to call
( http://www.pinvoke.net/search.aspx?s...ype&namespace=[All] )

Why do you put such constraint on your application?
Customer want it, so i must implement it ;)

Sep 27 '06 #3
Hello, ta*****@tlen.pl!

tCustomer want it, so i must implement it ;)

Is it security measure? If it is then other methods must be applied to ensure
that the app is launched from the disk it was written to...

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Sep 27 '06 #4

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

Similar topics

2
by: Raquel | last post by:
How do I know whether the 'runtime client' and the 'application development client' are installed on my machine? When I issue the command "db2licm -l", it gives the following output: Product...
5
by: summerwind | last post by:
I have distributed my app to a few users without problems (Not too many anyway) using the packaging wizard. I now have a problem that it causing me a great deal of concern. My client has no MS...
8
by: Nanda | last post by:
hi, I am trying to generate parameters for the updatecommand at runtime. this.oleDbDeleteCommand1.CommandText=cmdtext; this.oleDbDeleteCommand1.Connection =this.oleDbConnection1;...
24
by: ekz | last post by:
Hi guys I have a very weird bug and will welcome gracefully any help We developed ASP.Net application that run on production server, Net Framework 1.1 , IIS 6.0, the application is huge, having...
7
by: wazdakka | last post by:
I'm confused about what is necessary to distribute an Access 2003 application to people that don't have MS Access (or don't have the right version) installed on their PCs. I have done some...
0
by: Anbu | last post by:
Hello All, I have developed an Win 32 application using .NET 2.0 Framework. This application uses the cassini dll provided by one of the Microsoft groups. While using this component, I'm getting...
6
by: rn5a | last post by:
The different Page events in the page life cycle like Page_PreInit, Page_Init, Page_Load etc. - are they different stages of the runtime process? Does a server send back the HTML output of an...
2
by: obladi | last post by:
I have run MATLAB at Windows XP SP2. After several weeks of not using MATLAB, I found my MATLAB does not start up any more. When I double-click MATLAB icon, the error message says: Microsoft...
0
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
14
by: Adam Sandler | last post by:
I have a class with a method which returns a panel. The panel was not created with the visual editor, I coded it by hand -- because some of the content on the panel can be dynamic and thus I chose...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...

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.