/build/static/layout/Breadcrumb_cap_w.png

error 193 reported from script

I have written a script to do both install TightVnc and copy over the regkeys to configure the passwords as one that just does the passwords. Tried just the scripts through the K1000 error 193 when script was running for both scripts. So I took the scripts and placed them in a cmd file they run on the terminals just fine run it back through the K1000 same issue. What am I missing? about to throw something out the window [:@] .

0 Comments   [ + ] Show comments

Answers (9)

Posted by: Ben M 12 years ago
9th Degree Black Belt
2
I experienced this error as well. I finally figured out that the automatic "Script File Name:" setting was set to "scriptname.sh", and Windows doesn't like the ".sh". The fix for me was to change this to ".bat".

Comments:
  • This was the issue I had, thanks for posting it. - mgormsen 10 years ago
Posted by: anonymous_9363 12 years ago
Red Belt
0
Are the registry keys targetted at the HKEY_CURRENT_USER hive? If so, you should consider using Active Setup to distribute them.
Posted by: davidcoomes 12 years ago
Orange Belt
0
No the keys are not in the current user Hkey figured out a way to get that to work. Started on some other scripts and they can run fine all day long on the local box or setting up a container in active directory and pushing them out. But I would much prefer to use my labels on the KACE box or even be able to more closely fine tune the deployment of these scripts. But as soon as I attempt to copy the exact script into a online shell script and push them it comes back with "Error 193 received while executing script". I have tried this with many different types of scripts everything from just copying a file from a network share using a little batch file to create specfic mapped drives for different locations. still no matter what I come back with this 193 error which I can't find out what it even is anywhere.
Posted by: anonymous_9363 12 years ago
Red Belt
0
I should have said earlier...I would consider posting questions about K1000 in the forum dedicated to it.
Posted by: davidcoomes 12 years ago
Orange Belt
0
Well that fixed one problem running into anotherone now running a simple if not exist command as a script and coming back with an error 1. Any ideas?
Posted by: Ben M 12 years ago
9th Degree Black Belt
0
Could you post the script in the forum so we can see it? That would be the easiest way for us to reproduce/debug the error.
Posted by: davidcoomes 12 years ago
Orange Belt
0
the script is a simple little one to create a shortcut to a mapped folder location. because of needing to dive deeper into the share directory then the root. I need to set up 4 different scripts to point each locations users to different folders within the share.My script run as a online shell script looks like this:

if not exist %userprofile%\desktop\msds.lnk copy\\server09v\Locations\Safety\corporate.lnk %userprofile%\desktop\msds.lnk

I made sure to name the script a *.bat instead of the *.sh that kace likes using. The only thing I will be changing in the scripit from location to location will be corporate.lnk to the type of location it is. For me that will be TAS.lnk, TLC.lnk and TAR.lnk .
Posted by: rmeyer 12 years ago
Second Degree Blue Belt
0
depending on how you run this it can have various reasons to fail

if the script is run as "SYSTEM" then %userprofile% will not be the users user profile, you have to set it to run as user logged in

Even if you run it as "user logged in" it's still run with "SYSTEM's" credentials (aka no network authentication, local admin only) so \\server09v\Locations\ will not be allowed unless "Everyone" have NTFS and Share rights to that folder.
since it's a copy then read rights should be plenty tho!

an advice if you need to do tests in the future is to do the following in the bat file:

if not exist %userprofile%\desktop\msds.lnk copy\\server09v\Locations\Safety\corporate.lnk %userprofile%\desktop\msds.lnk >> C:\output.txt

That will give you the result from the command line in the file.

It can also be done from the script it self under the task

Run program:
cmd /c YourBatFile.bat >> C:\output.txt

This way you can do various checks to see how everything works

ie make a bat file with the following content:
-----
echo Enviroment variables:
set
echo.
echo.
echo list content of folder \\server09v\Locations\Safety\
dir \\server09v\Locations\Safety\

echo list content of folder \\server09v\Locations\Safety\ with credentials
net use \\server09v\Locations\Safety /User:domain\dummyuser Passw0rd
dir \\server09v\Locations\Safety\
-----
then add it to a script with the following command "cmd /c YourBatFile.bat >> C:\output.txt" and run it first as SYSTEM, then as User logged in then see the diffrence


I hope it makes sense =)
Posted by: rmeyer 12 years ago
Second Degree Blue Belt
0
oh and by the way, I do not recommend doing a "net use" in a script with user details in it!
that was just ment as a test so you know how it works :)
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ