| |

VerySource

 Forgot password?
 Register
Search
View: 1641|Reply: 13

Two super depressing questions

[Copy link]

1

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-7 19:30:01
| Show all posts |Read mode
Question one:
How to programmatically delete all cookies of this machine under winfrom (c #)?

Question two:
How to replace the IP (ADSL) of the current machine with a program under winfrom (c #)
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-5-27 21:15:01
| Show all posts
Local cookies are stored in C:\Documents and Settings\Administrator\Cookies, just clear this folder
Reply

Use magic Report

1

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-5-28 13:15:01
| Show all posts
The storage path of local cookies is not necessarily C:\Documents and Settings\Administrator\Cookies, right?
What if the current user is not an Administrator?
Reply

Use magic Report

1

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-5-28 19:45:01
| Show all posts
The index.dat in the cookie folder cannot be deleted, what file is this?
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-5-29 14:00:01
| Show all posts
Cookie, the current user's address can be found from the registry, there is an address directory under Current User, I do not know the specific.
Reply

Use magic Report

1

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-5-29 19:45:01
| Show all posts
How can I get the path of the current user's cookie? Who can specifically talk about it.
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-6-4 00:45:01
| Show all posts
I have a file command to delete a directory, but I saw some instructions and tried it,
1. Delete directory
   System.io.directory.delete (path)
2. Command to delete the specified file name
   System.io.file.delete (path + file name + suffix)

But if you delete files like *.txt, it won't work, I am solving this problem. That's all for now.
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-6-5 14:15:02
| Show all posts
There is an answer, the specific idea is: use loop to achieve, first take out the files in the directory one by one, and then use the delete command, the specific code is:
foreach(string strFileName in Directory.Getfiles(strPath))
{
   File.Delete(strFileName);
}
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-6-6 22:15:01
| Show all posts
The storage address of cookies is generally: C:\Documents and Settings\username\Cookies
The user name can be obtained through the system code: string UserName=System.Environment.UserName;
This way you don't have to worry.
Reply

Use magic Report

1

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-6-8 23:00:02
| Show all posts
Oh, let me try it first.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list