Script running a batch file from a button

SOLVED

Hi Forum,

I have a VB Script in a button.  The only thing it does is run a batch file to move files.

the script runs manually but it doesn't do anything when i click on the button.

I've tried the client & server options with no luck.

The following is the command that i have in the VB Script.

CreateObject("Wscript.Shell").Run """\\shp-fin-sage\ACCTG\Yooz_Project\Apps\Manual_process.bat""", 0, True

Any suggestions ?

Regards,

Manuel Roman

Parents
  • +1
    verified answer

    This is from a script I have... not sure if it will work with a button.

    sFTPDirCommand = "%comspec% /c TriggerFTPDirectory.bat"

    Set oShell = CreateObject("Wscript.shell")

    oShell.Run sFTPDirCommand, 0, true

    ...but if you are just moving files, why use a batch file for that?

    Set objFSO = CreateObject("Scripting.FileSystemObject")

    objFSO.MoveFile inFile, inFile & ".DONE"

  • 0 in reply to Kevin M

    Does the user who is clicking on the button need to have admin rights in order for the script to run?

  • 0 in reply to Sage100User

    Not the script, but I am not sure about what the permission considerations are for the .bat file.  For a server side script I assume it would run under the context of the service login, but I am not sure on that.

  • 0 in reply to Sage100User

    If running Advanced and the script is set to execute on the server, the account running the service (whether as an application or service) would need the appropriate NTFS permissions to access the folders. If the folder is a network share or referenced via UNC, the sage 100 application server must be ran under a domain account with appropriate NTFS permissions, you can not run the service under Local System.

    If Standard, the windows user running sage 100 needs to have appropriate NTFS permissions.

Reply
  • 0 in reply to Sage100User

    If running Advanced and the script is set to execute on the server, the account running the service (whether as an application or service) would need the appropriate NTFS permissions to access the folders. If the folder is a network share or referenced via UNC, the sage 100 application server must be ran under a domain account with appropriate NTFS permissions, you can not run the service under Local System.

    If Standard, the windows user running sage 100 needs to have appropriate NTFS permissions.

Children
No Data