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)
Please log in to answer
Posted by:
Ben M
12 years ago
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 11 years ago
Posted by:
anonymous_9363
12 years ago
Posted by:
davidcoomes
12 years ago
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
I should have said earlier...I would consider posting questions about K1000 in the forum dedicated to it.
Posted by:
davidcoomes
12 years ago
Posted by:
Ben M
12 years ago
Posted by:
davidcoomes
12 years ago
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 .
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
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 =)
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.