|
Looks like you need to look at the PowerShell documentation to see what you can do with BaseObject other than ToString it.
|
|
|
|
|
Update - I was able to achieve this by removing the IF and using the following.
var myvar = shell.Runspace.SessionStateProxy.GetVariable("myvar");
myLabel.Text = Server.HtmlEncode(myvar.ToString());
|
|
|
|
|
How can we disable and enable the internet from inside of our program?
|
|
|
|
|
Fred 34 wrote: disable and enable the internet
It is highly unlikely that you are going to be writing a program that can disable or enable the internet so you must mean something else.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
In fact I want to disable internet for awhile to prevent spyware to access that sensitive portion of program which contains some personal information which is not coded yet. for example account number which is coming from keyboard.
|
|
|
|
|
How is that going to help? My keylogger doesn't send data when it is entered, it sends it at midnight.
Think again.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
An utter waste of time. It doesn't matter if the machine has internet access or not. Malware is still going to get this information and hang onto it until it CAN send it.
|
|
|
|
|
U are right, I did not think about it in this way.
|
|
|
|
|
Well there are 2 crude ways to do it: (if you haven't written drivers for your connectivity interfaces )
1. Enumerate all the network interfaces (non-virtual) and disable them
2. Configure a non-existent proxy server (like 0.0.0.0 port 80) for time being. After you are done with your execution reset this dummy proxy. Ensure you can backup any existent proxy settings if any.
Sunil
|
|
|
|
|
#Define "The Internet".
You could disable every TCP/IP adapter on my machine, if you ran under an administrative account. Then again, maintenance and support might become angry if my internet doesn't work for no good reason.
Keep in mind that Windows Update and the virusscanner would be affected to.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Fred 34 wrote: How can we disable the internet ...
Sorry, I'm not going to hand you that code; would some launch codes for a nuclear missile be sufficient?
For most CP members, life would be quite different without Google, MSDN, CodeProject, and many more.
|
|
|
|
|
Luc Pattyn wrote: would some launch codes for a nuclear missile be sufficient?
I've got a few to share, too. I'm sure that they haven't changed them in the past 20 years. Why bother? They're secret...
Will Rogers never met me.
|
|
|
|
|
How can we Change the date of system (computer ) from inside of our own program?
|
|
|
|
|
|
I appreciate your knowledge. It works properly. thanks
|
|
|
|
|
You're welcome
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
how to add reference to dll in asp project?i download website from ftp accoutn which doesnot conatains the neackend files no solution no projects files so i decompiled the dll to get teh backend files
now i made changes in backend files n when i m runninf it shows dll is missing ,dere is no solution no project file how can i compile the pages............its showing error dll Error 91 The type or namespace name 'Button' could not be found (are you missing a using directive or an assembly reference?)
Plz help
|
|
|
|
|
Member 9066025 wrote: The type or namespace name 'Button' could not be found (are you missing a using directive or an assembly reference?) You have a reference to an object in your code that is not known by the compiler. Add the correct using clause to your source module, probably this one[^], although without seeing your source that is a pure guess.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i didnt not understand ur solution can u explain how to do that
|
|
|
|
|
What more is there to say; make sure the project references include the classes you are trying to use, and make sure your source code includes the correct using statements for those classes or namespaces. If this does not make sense to you then I suggest you consult the documentation[^] on this and other basics of C#.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
For the love of all that is holy learn to write English and actually type the words you are trying to write correctly.
|
|
|
|
|
i decompiled the dll files to get my backend files but still i didnt hav ethe solution files.i m not able to send mails as it says .....dll missing n all
suggest to solve the problem.
|
|
|
|
|
Create a blank solution, drop the codez in there and compile.
What dll is it whining about? Can you post the exact message?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
i created new projects the pasted the code from other files its stills says dll is missing,
|
|
|
|
|
It'll say more than that, please copy/paste the message here.
It's either a missing reference (are you sure you are decompiling "your own code"?), or something else. Prolly the first one.
--edit
I see you opened a new question.
System.Web.UI.WebControls[^]
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|