Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 3 posts ]
Author Message
 Post subject: Winstep with Powershell script and parmeters
PostPosted: Wed Aug 07, 2024 11:57 pm 
Offline

Joined: Wed Aug 07, 2024 11:19 pm
Posts: 2
I've just joined this distinguished forum.

I've looked through the posts and found nothing regarding my issue.

I have a Powershell script (METS_MenuCentral.ps1), a collection of smaller scripts. When I call METS_MenuCentral, I pass a parameter (ie: MySQL_Backup_log). This executes that small section of the PS script to perform that function.

METS_MenuCentral has over 40 of these small scripts all in one place. I have been using this PS script for some time with an alternative software package.

I want to add a dock that will call METS_MenuCentral.ps1 and pass the argument of "MySQL_Backup_Log"

My properties for the dock are:

Item Type: program
Label: MySQL runs Log
Filename: METS-MenuCentral.ps1
Argument: "MySQL_Backup_Log"
Start In: d:\menu

The METS-MenuCentral launches, but I get the warning message generated in my script that no argument was passed.

I've changed the Argument:

1. No quotes (ie: MySQL_Backup_Log)
2. -sectionName MySQL_Backup_Log
3. -sectionName "MySQL_Backup_Log"

and I get the same warning message.

Can any of you folks point in the right direction?

Thank you ahead of time.


Back to top
 Profile  
 
 Post subject: Re: Winstep with Powershell script and parmeters
PostPosted: Thu Aug 08, 2024 12:07 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 12281
Hmmm... METS-MenuCentral.ps1 is a script, that is, it is in itself actually an argument to PowerShell.exe.

Try the following instead (no guarantee it will work though):

In Filename use the path to the Powershell executable, e.g.;

C:\system32\WindowsPowerShell\v1.0\powershell.exe

in the Argument field try using instead

METS-MenuCentral.ps1 MySQL_Backup_Log

Let me know if that worked please :D

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Winstep with Powershell script and parmeters
PostPosted: Thu Aug 08, 2024 12:16 am 
Offline

Joined: Wed Aug 07, 2024 11:19 pm
Posts: 2
Bingo.. give that man a cigar or a shot of tequila or both.

Worked like a charm


Back to top
 Profile  
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 3 posts ]
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: