Discussion Locked

Running commands from short cut target

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We have an application which requires a password to grant access for admin rights to make changes to the software configuration. Without the password you get general user access. I created a short cut on the desktop of the admin user. Going to the properties for this short cut the target looks like...

"C:\Program Files\ToolPak\ToolPak.exe"

The password is not asked for by the program it must be included in the command line to gain the admin access. Example, from a command prompt you wouldtype...

"C:\Program Files\ToolPak\ToolPak.exe" password

Then the program starts with the admin access. However, when I add the password to the end of the target line, W2K changes the target line from...

"C:\Program Files\ToolPak\ToolPak.exe" password

to...

""C:\Program Files\ToolPak\ToolPak.exe" password"

Which cause the password to be ignored. Even if I change the targe line to...

"C:\Program Files\ToolPak\ToolPak.exe password"

the password is still ignored.

The workaround I have in place is to run the command line from a batch file. However, this leaves a command window open in the background until the program is closed. We would like to get rid of the command window.

7 replies

by opatzg9

create a batch file in notepad and put the line init and use the batch file instead of the line.
Only thing to get right is "save as" filename.bat

by bbd_itadmin

Created a batch file. Tried having the short cut call the batch file, but the password still does not take.

by joseph moore

In your BAT file, set it up like this:

START toolpak "C:\Program Files\ToolPak\ToolPak.exe" password

What that will do is it will kick off ToolPak.exe with the password parameter, but it will NOT keep the Command Prompt window open. Using START starts processes in separate process windows.

hope this helps

This discussion is closed to new replies.