26

(12 replies, posted in General)

humblelion wrote:
DriveSoft wrote:

Hello.



Please provide more details, what exactly do you mean?

Thank you very much for your response

Some codes in my project will need administrative rights to work effectively. Eg.

if ping('google.com')

. I don't want the user to right click the exe file and choose "Run as Administrator" but instead on double click User Account Control will pop-up for the user to select YES before the application can run. In simple words, I want my application to run as administrator

Hi Humblelion,

I believe that if you right-click on your application and go to the security tab you can set "run as admin" and hit apply.  This will make sure
that your application runs with administrative privileges.  Hope that solves your issue.

smile

27

(187 replies, posted in General)

What I'd really love to see in version 6.0 final is the ability to add your own application icon without the need to use external
programs to modify the resources.  I think is something that's not much overhead or complicated to include and it will
enhance MVD even further.  smile

28

(187 replies, posted in General)

sibprogsistem wrote:
tcoton wrote:

How about opening MyVisualDatabase to plugins developed by the community? With a very strong validation process to make sure that data and privacy cannot be compromised, I think that would bring some awesome features.

 
это обязательно повысить популярность MVDB,  но я считаю, что еще рано это делать.



Я не согласен, я думаю, что на ранних этапах это лучшее время, чтобы открыть и приветствовать сообщество программистов и разработчиков, которые могут способствовать расширению MVD. Это будет отличным дополнением к работе, которую DriveSoft проделал до сих пор.

29

(6 replies, posted in Script)

This works great with small .txt files but if you try to load a 60MB text file for example, the system hangs.  Is there a way to load the
archive in memory first then opening it for editing?  Just curious.

30

(6 replies, posted in Script)

sibprogsistem wrote:

.

Well, gues sibprogsistem went ahead of me and did it better!  Thank you both!

31

(6 replies, posted in Script)

derek wrote:

Hi There,
Is this the sort of thing you're after (see attached)?
Regards,
Derek.

yes!!  Excellent Derek thank you.  I'm just goint to replace the part of the .txt file with an OpenDialog so that is
not specific to a particular archive.  Appreciate it.

32

(6 replies, posted in Script)

Hello all MVD,

I need help figuring out a script to open a text document (notepad) and searching for a particular string and then replacing with
a given string, then saving the new text document.  If you have any samples that can point to the right direction I'd appreciate
it.


Thanks!!

33

(2 replies, posted in General)

hotice546 wrote:

hello MVD users

I want a program to check if computer is connected to internet or not?

Thanks in advance.


Hi @hotice546,

Try this thread:

http://myvisualdatabase.com/forum/viewt … 109#p24109

That'll give you a head start smile

34

(3 replies, posted in General)

Hello All MVD,

In case the tool may have not worked for some of you, it's my fault.  I noticed that in my code I left a reference pointing to a
shortcut for the batch file, having my computer path as a target.  I have fixed this by pointing to the CMD batch itself. 
Should work accordingly as expected. My apologies.


Download the new file below:

35

(3 replies, posted in General)

Thanks @hotice546, other improvements I forgot to mention could be to allow the user to pick what items are going
to be backed-up.  Maybe using checkboxes so they can check off what they need to save.  The possibilities are endless.

big_smile

36

(3 replies, posted in General)

Hello all MVD,

Here I post this utility, still in the works, just a small tool to do an entire backup of a user's profile to a drive or folder locally (or to a shared drive if mapped beforehand).  It uses the 'OpenFile' function of MVD to invoke a batch file for the copy operations ( uses ROBOCOPY), and one .INI file to store information that the batch file needs.  It's not a great combination but I post it here so that it can be improved and other features added as we progress.  I will appreciate your input and ideas and you're free and welcome to edit it to make it better and come up with other solutions.

*** THINGS THAT I WISH TO SEE **

  • * A progress bar displayed at the bottom showing the progress of the command window

    * A log file created after the backup to review all the operations performed or any errros.

    * Maybe the mapping of a shared drive or shareed resource on the network done from within MVD ** Don't know if that's possible.

    For now I think that's all, I will be making changes and post them here as we go forward.

Thanks and hope you like it.  smile

37

(1 replies, posted in Script)

Found it!

пример с диалогом выбора папки

procedure Form1_Button2_OnClick (Sender: string; var Cancel: boolean);
var
    s: string;
begin
    s := '';
    SelectDirectory('Caption', 'c:\', s); // default dialog
    SelectDirectory('Caption', 'c:\', s, True); // with button create a directory
    SelectDirectory('Caption', 'c:\', s, True, True); // with button create a directory and shows files
    if s<>'' then ShowMessage(s);
end;

Dmitry.

38

(1 replies, posted in Script)

Hello MVD,

Question, is there a function in MVD or a script that can be accomodated to open up a folder browser dialog?  I want to implement
something similar to this C# snippet:

public void ChooseFolder()
{
    if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
    {
        textBox1.Text = folderBrowserDialog1.SelectedPath;
    }
}

Please let me know, thanks!

39

(9 replies, posted in Script)

Wow!  thank you both Derek and k245, both versions are working fine under Win10, I'm going to use k245's version since
it creates de CMD window inside a panel and look borderless, almost as if it were part of the MVD environment. 
Great examples, my deepest thanks and gratitude!

I will post the entire Backup Utility for everyone to use in the projects once completed.

Thanks!

40

(9 replies, posted in Script)

Understand. Thanks anyway for responding.  Dmitry, any thoughts on this? or anybody else?  Derek? I'm making a call out
to all the MVD power users here.  Help me!!

big_smile

41

(9 replies, posted in Script)

ehwagner wrote:

I'm not sure what you mean by pinning a CMD window to a form, but you can do the following within MVD.

Openfile('cmd');

Hi ehwagner,

Thanks, yeah I knew you can run a command window by using the OpenFile function.  What I'm looking for is to 'PIN' that CMD window to a form or a panel, just like the example of the calculator that K245 showed here: http://myvisualdatabase.com/forum/viewt … 60#p32860.   Basically I want to 'redirect' the output of a CMD window into a form or a panel. Say for example I'm running the following command:

Openfile(''c:\*.* e:\backup /S /E", 'robocopy');

.
I want to the outuput of the console to show in a Form (whether it's using a memo field or other control to hold the strings) or a panel inside of MVD and not showing the command window.  That's basically what it it, redirect output to a form in MVD.

smile   Hope that clears out any confusion.

42

(9 replies, posted in Script)

Nobody? sad

43

(9 replies, posted in Script)

Hello All,  MVD users, experts,

I know there's a way to pin an application to a form but is there a way or has someone tried to pin a CMD window to a
form?  or to a panel?  I'm trying to do this and can't seem to get it to work.  If anyone has an example or know the
script to do it, post the snippet please!!!


Thanks in advance!

44

(4 replies, posted in Script)

DriveSoft wrote:

Unfortunately I don't know how to map a network drive, but try this:

OpenFile('use U: \\DC-1\UsersHome$\"'+User+'" /u:,"'+User+'" "Pass"', 'net');

Thank you, I tried it that way too and still couldn't map the drive.  Finally what I did was kind of a crazy detour and probably more work
than needed to make it work but it's working for me without any problems.  Here's the code:

var
ini:TIniFile;


procedure Form1_edUser_OnChange (Sender: TObject);
begin
  ini:=TIniFile.Create(ExtractFilePath (ParamStr (0))+'info.ini');
  ini.WriteString('INFO','USER',Form1.edUser.Text);
end;
procedure Form1_edPass_OnChange (Sender: TObject);
begin
  ini:=TIniFile.Create(ExtractFilePath (ParamStr (0))+'info.ini');
  ini.WriteString('INFO','PASS',Form1.edPass.Text);
end;


procedure Form1_OnShow (Sender: TObject; Action: string);
begin
    Form1.edUser.SetFocus;
end;

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin

       OpenFile('connect.cmd.lnk');
       application.processmessages;
       sleep(600);
       Form1.edStatus.Visible := TRUE;

end;

I'm creating a .INI file, saving the information from the user's input in the form to this INI file, then having a batch file read the contents of
the INI file and executing the mapping.

45

(4 replies, posted in Script)

DriveSoft wrote:
OpenFile('net use U: \\DC-1\UsersHome$\"'+User+'" /u:,"'+User+'" "Pass" net.exe');

Hi Dmitry,


thanks for the quick answer,  unfortunately that still didn't work  sad

It's not mapping the network drive.

46

(4 replies, posted in Script)

Hi All,

I need help with the following action for a button.  When click I want to map a network drive using parameters from user's input boxes, the following code doesn't give me any error but does not map the drive sad     

thanks in advance!

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
User: string;
Pass: string;
begin
    User := Form1.edUser.Text;
    Pass := Form1.edPass.Text;

    OpenFile('net use U: \\DC-1\UsersHome$\"User" /u:,"User" "Pass" net.exe');
end;


begin
 Form1.mniFile.Visible := False;
 Form1.mniOptions.Visible := False;
 Form1.mniSettings.Visible := False;
 Form1.mniReport.Visible := False;
 Form1.mniAbout.Visible := False;
end.

47

(10 replies, posted in General)

madbit71 wrote:

hi, obviously it was my problem. I updated ... rar and I was able to appreciate the excellent work of gonpublic2k. Thanks for sharing ... I love myvdb.

Thank you for the kind comments!  We're all here to learn and support each other, MVD is great!

48

(10 replies, posted in General)

madbit71 wrote:

hello and thanks for sharing, but when I download the file a message tells me that the archive is damaged ... is it just my problem?

Maybe try to upgrade your version of  WinRAR , sounds to me like it's a problem with the compressor, not the archive. 

Cheers.

49

(10 replies, posted in General)

DriveSoft wrote:

Thank you for this example.

No, thank you Dmitry and all MVD community for your help and for teaching me.

50

(10 replies, posted in General)

sibprogsistem wrote:

хорошая идея, спасибо!!

С удовольствием !  -     My pleasure!