|
Since the only installer packagers cant do create the kind of setup im after Im going to create my own in C#.The only new thing i need to learn is how to go to the next "Page" of the setup.
Do i need to somehow "link" to a .dll file with the next page or something Also how do i close the app ? at the moment im using the "kill process" approach
oh and its just going to look like an installer it wont use the windows installer service
|
|
|
|
|
Hi there
I hope someone in here can help me with this issue.
I am trying to write a little application that recurses through a folder and sets the appropiate security on the folder, but I can't seem to get the inharitance settings to be correct.
The below code should add a user account to the ACL-list of a specified folder and set the folder security for the added account to "Modify" - applying the settings to "This folder, subfolders and files".
I've tried various combanations of Propagation- and InharitanceFlags but it still wount work like I wan't it to ;o)
I hope anyone in here can help me
// Adds an ACL entry on the specified directory for the specified account.
public static void AddDirectorySecurity(string FileName, string Account, FileSystemRights Rights, InheritanceFlags Inheritance, PropagationFlags Propagation, AccessControlType ControlType)
{
// Create a new DirectoryInfo object.
DirectoryInfo dInfo = new DirectoryInfo(FileName);
// Get a DirectorySecurity object that represents the
// current security settings.
DirectorySecurity dSecurity = dInfo.GetAccessControl();
// Add the FileSystemAccessRule to the security settings.
dSecurity.AddAccessRule(new FileSystemAccessRule(Account, Rights,
Inheritance, Propagation, ControlType));
// Set the new access settings.
dInfo.SetAccessControl(dSecurity);
}
Thanks in advance
Niels
|
|
|
|
|
Hi every body i look some example for using dirextX but the compilatro sad that i have not Microsoft.DirectX names space how to get it????
best regards
|
|
|
|
|
papa1980 wrote: have not Microsoft.DirectX names space how
You need to have Managed DirectX installed on your machine
'A programmer is just a tool which converts caffeine into code'
|
|
|
|
|
from where to download it???
|
|
|
|
|
search the MS site for managed directx SDK
Russ
|
|
|
|
|
Well, y'know on the task manager you can see all of the current processes, and it has their 'user name' (SYSTEM, LOCAL SERVICE, NETWORK SERVICE, the current user, etc.)
How do i get a program to have a different user name like SYSTEM, for example.
|
|
|
|
|
The Undefeated wrote: How do i get a program to have a different user name like SYSTEM
By launching the process as that user.
The SYSTEM process is the highest level privilege in Windows - it has more rights than Administrator. To start a program as SYSTEM you have to be extremely confident it cannot compromise, or be used to compromise, the security of your system.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
How do i do that, you can do run as and whatnot, but how do you get it to be run by the system, puting the username as SYSTEM, doesnt quite work.
|
|
|
|
|
You can't "Run As..." SYSTEM.
You can create windows services that can run under the system account. However, the question is, what do you want to do that requires that level of priviledge? There are very few legitimate needs to run a program with that level of access.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
I have a application that has is develop using c#
B4 this all my data processing is done thourgh the tsql statment, now i want to switch the thing to stored procedure..
1.) but my management wnt to know is they any way we can hide the code in stored from the database administrator like the 1 in the trigger where we can encrypt the trigger..
2.) one more thing can we populate the stored procedure from c#..
so every update i will create 1 EXE for them to run and i will update the stored procedure without using any sql util...
thanks...
Jalil
Jalil
|
|
|
|
|
|
i'm trying t exncrypt the code inside stored procedure.
so that when anyone open the stored procedure they can not read it
or is the any where we can prevent the user from access the stored procedure
even administratr cannt see the code..
|
|
|
|
|
Abdul Jalil Mohamed wrote: we can hide the code in stored from the database administrator like the 1 in the trigger where we can encrypt the trigger
Yes, you can encrypt stored procedures.
Abdul Jalil Mohamed wrote: can we populate the stored procedure from c#..
Yes, you can put your creation script in a SqlCommand object and ExecuteNonQuery()
Does this help?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
how do we encrypt stored procedure
an example will be gooo
thanks fot the reply
|
|
|
|
|
See the documentation for CREATE PROCEDURE[^]
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Thanks guys
this really help me
thanks a lot
|
|
|
|
|
you can declare your SQL Stored procs using the WITH ENCRYPTION statement, this will encrypt them in SysComments and they should execute fine. I have never tried using this but i have it on good authority that it works.
Using WMI for SQL server you should be able to create stored procedures; create a management object and the execute your SP text using it.
HTH
Russ
|
|
|
|
|
Hello
I have a datagrid that is filled using the dataadapter. The datagrid that can be edited. Once the customer has completed the editing l want to update the new contents of the datagrid. This is what l have so far:
<br />
da.SelectCommand = cmd;<br />
da.Fill(ds,"Product");<br />
<br />
this.grdCustomerPurchase.SetDataBinding(ds,"Product");<br />
<br />
<br />
Many thanks in advance,
Steve
|
|
|
|
|
How can I open a web page(url string) from a web forms button that I've placed on my web.aspx application?
|
|
|
|
|
Well you can do:
this.Response.Redirect(name of web page / file to download etc)
or
this.Server.Transfer(url or whatever - will not work when linking to a file for downloading etc.)
The first one is better, but with the second, it doesnt change the url in the address bar on the browser so if you wanted to keep the full url a secret...
|
|
|
|
|
Thank you!
this.Response.Redirect(name of web page) works well, but I need it to open in its own window.
I think my prasing was incorrect...
|
|
|
|
|
Well, i asked that a short while back as well, you'll have to use a html button and in the onclick bit put:
window.open("website url","one_word_id_type_thing","resizable=0,width=550,height=400")
resizable=0 means you cant resize it 1 means that you can.
Just thought, to open a page in a new window, and keep the web forms button, add:
using System.Diagnostics;
then in the button put:
Process.Start("website url");
that should open it in a new window.
|
|
|
|
|
Hi.. I would like to ask about C# web application.I have created a calendar. I would like to ask that if i click the date on the calendar,how can i retrieve the database ?? I have tried butit seem like is not working. Below is the code, could anyone help me with it as i'm totally lost?? Thanks!! The code:
private void Radcalendar2_SelectionChanged(object sender, System.EventArgs e)
{
TBDate1.Text = CAL1.SelectedDate.ToLongDateString();
SqlConnection conn=new SqlConnection("my connection string");
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM Particulars WHERE DateField = @Date";
cmd.Parameters.Add("@Date", SqlDbType.DateTime).Value = DateTime.Parse(TBDate1.Text);
}
I just want to retrieve(view) the user's login/logout time of date we have click on the calendar. Anyone who can help me..You can also edit from here or a new code... Thanks!!
Cheers!
|
|
|
|
|
I'm sorry to say this, but your question is not very clear. Is English not your native language?
Here's what I *think* the problem is:
If you have a DateTime value, do NOT use the ToLongDateString() method as it formats the date depending on the user's Windows settings. Rather, use DateTime.ToString("yyyy-MM-dd") or whatever format the database accepts the date string in.
HTH.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|